# Splunk Observability Cloud Terraform Provider (signalfx
)
Splunk Observability Cloud is a Software as a Service (SaaS) solution for infrastructure monitoring (Splunk IM), application performance monitoring (Splunk APM), real user monitoring (Splunk RUM), and synthetic monitoring (Splunk Synthetic Monitoring). For more information, see the official documentation.
Use this Terraform provider to automate the configuration of Splunk Observability Cloud.
- Documentation: https://registry.terraform.io/providers/splunk-terraform/signalfx/latest/docs
- Website: https://www.terraform.io
- Mailing list: Google Groups
## Requirements
## Build the provider
To build the provider, follow these steps:
-
Clone the repository to:
$GOPATH/src/github.com/splunk-terraform/terraform-provider-signalfx
:$ git clone [email protected]:splunk-terraform/terraform-provider-signalfx.git $GOPATH/src/github.com/splunk-terraform/terraform-provider-signalfx
-
Enter the provider directory and build the provider:
$ cd $GOPATH/src/github.com/splunk-terraform/terraform-provider-signalfx $ make build
If you're building the provider, follow the instructions to install it as a plugin.. After placing it into your plugins directory, run terraform init
to initialize it.
Further usage documentation is available on the Terraform website.
If you wish to work on the provider, you need the following:
To compile the provider, run make build
. This builds the provider and put its binary inside the $GOPATH/bin
directory:
$ make build
...
$ $GOPATH/bin/terraform-provider-signalfx
...
To test the provider, run the following command:
$ make test
To run the full suite of acceptance tests, run make testacc
.
$ export SFX_API_URL=https://api.signalfx.com # or https://api.eu0.signalfx.com
$ export SFX_AUTH_TOKEN=XXXXXX
$ make testacc
Important
Acceptance tests create real resources, and often cost money to run.
### Run AWS integration tests
To run the AWS integration tests for CloudWatch Metric Streams and AWS logs synchronization, create an AWS IAM user with an access key and secret that Splunk Observability Cloud can use to manage AWS resources, and define the SFX_TEST_AWS_ACCESS_KEY_ID
and SFX_TEST_AWS_SECRET_ACCESS_KEY
environment variables. For example:
export SFX_TEST_AWS_ACCESS_KEY_ID=AKIAXXXXXX
export SFX_TEST_AWS_SECRET_ACCESS_KEY=XXXXXX
Grant the following permissions. Additional permissions may be required to capture logs from specific AWS services.
"cloudwatch:DeleteMetricStream",
"cloudwatch:GetMetricStream",
"cloudwatch:ListMetricStreams",
"cloudwatch:PutMetricStream",
"cloudwatch:StartMetricStreams",
"cloudwatch:StopMetricStreams",
"iam:PassRole",
"logs:DeleteSubscriptionFilter",
"logs:DescribeLogGroups",
"logs:DescribeSubscriptionFilters",
"logs:PutSubscriptionFilter",
"s3:GetBucketLogging",
"s3:GetBucketNotification",
"s3:PutBucketNotification"
See Connect to AWS using the guided setup in Splunk Observability Cloud and Enable CloudWatch Metric Streams in Splunk documentation for more details about creating that IAM policy.
Note
Use an IAM user instead of an IAM role, as the latter requires an External ID that is only known at AWS integration creation time.
The releases are done via Github actions following these steps:
-
Create an pull request with the updated changelog.
-
Merge updated changelog once approved.
-
Pull the last changes on main with merged changelog update.
-
Tag the current commit with the next version.
-
Wait for the CI automation to publish draft release to Github.
-
Go back to the release in github and set "Set as the latest release"