github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/logentries/index.html.markdown (about) 1 --- 2 layout: "logentries" 3 page_title: "Provider: Logentries" 4 sidebar_current: "docs-logentries-index" 5 description: |- 6 The Logentries provider is used to manage Logentries logs and log sets. Logentries provides live log management and analytics. The provider needs to be configured with a Logentries account key before it can be used. 7 --- 8 9 # Logentries Provider 10 11 The Logentries provider is used to manage Logentries logs and log sets. Logentries provides live log management and analytics. The provider needs to be configured with a Logentries account key before it can be used. 12 13 Use the navigation to the left to read about the available resources. 14 15 ## Example Usage 16 17 ``` 18 # Configure the Logentries provider 19 provider "logentries" { 20 account_key = "${var.logentries_account_key}" 21 } 22 23 # Create a log set 24 resource "logentries_logset" "host_logs" { 25 name = "${var.server}-logs" 26 } 27 28 # Create a log and add it to the log set 29 resource "logentries_log" "app_log" { 30 logset_id = "${logentries_logset.host_logs.id}" 31 name = "myapp-log" 32 source = "token" 33 } 34 35 # Add the log token to a cloud-config that can be used by an 36 # application to send logs to Logentries 37 resource "aws_launch_configuration" "app_launch_config" { 38 name_prefix = "myapp-" 39 image_id = "${var.ami}" 40 instance_type = "${var.instance_type}" 41 42 user_data = <<EOF 43 #cloud-config 44 write_files: 45 - content: | 46 #!/bin/bash -l 47 export LOGENTRIES_TOKEN=${logentries_log.app_log.token} 48 run-my-app.sh 49 path: "/etc/sv/my-app/run" 50 permissions: 0500 51 runcmd: 52 - ln -s /etc/sv/my-app /etc/service/ 53 EOF 54 55 iam_instance_profile = "${var.instance_profile}" 56 57 lifecycle { 58 create_before_destroy = true 59 } 60 61 root_block_device { 62 volume_type = "gp2" 63 volume_size = "100" 64 } 65 } 66 ``` 67 68 ## Argument Reference 69 70 The following arguments are supported in the `provider` block: 71 72 * `account_key` - (Required) The Logentries account key. This can also be specified with the `LOGENTRIES_ACCOUNT_KEY` environment variable. See the Logentries [account key documentation](https://logentries.com/doc/accountkey/) for more information.