-
Notifications
You must be signed in to change notification settings - Fork 121
Add APM agent configuration #1196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
db09c21
Add agent configuration operations to generated client
tobio 6dda031
Add agent configuration resource
tobio 57eb439
Add windsurf rules
tobio 0359a86
make docs-generate
tobio 10cd43e
Patch delete agent policy spec
tobio e819214
Set Elastic API version
tobio bc4e8c2
Changelog
tobio 69a240d
Apply suggestions from code review
tobio 3e0f570
Update internal/apm/agent_configuration/read.go
tobio 528f118
PR feedback
tobio db16c79
Merge branch 'main' into apm-agent-configuration
tobio ce7aefd
Remove spec customisation
tobio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| * The project is a Terraform provider, written in Golang | ||
| * The provider manages Elastic Stack resources | ||
| * There is a mix of SDK, and plugin framework resources | ||
| * New resources should be written with the Terraform plugin framework | ||
| * Plugin framework resources should: | ||
| * Follow the example set in /internal/elasticsearch/security/system_user | ||
| * Be contained within their own module | ||
| * Have the main concepts split across their own files | ||
| * Include acceptance tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| subcategory: "Kibana" | ||
| layout: "" | ||
| page_title: "Elasticstack: elasticstack_apm_agent_configuration Resource" | ||
| description: |- | ||
| Creates or updates an APM agent configuration | ||
| --- | ||
|
|
||
| # Resource: elasticstack_apm_agent_configuration | ||
|
|
||
| Creates or updates a an APM agent configuration. See https://www.elastic.co/docs/solutions/observability/apm/apm-agent-central-configuration | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| provider "elasticstack" { | ||
| elasticsearch {} | ||
| } | ||
|
|
||
| resource "elasticstack_apm_agent_configuration" "test_config" { | ||
| service_name = "my-service" | ||
| service_environment = "production" | ||
| agent_name = "go" | ||
| settings = { | ||
| "transaction_sample_rate" = "0.5" | ||
| "capture_body" = "all" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `service_name` (String) The name of the service. | ||
| - `settings` (Map of String) Agent configuration settings. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `agent_name` (String) The agent name is used by the UI to determine which settings to display. | ||
| - `service_environment` (String) The environment of the service. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `id` (String) Internal identifier of the resource. | ||
|
|
||
| ## Import | ||
|
|
||
| Import is supported using the following syntax: | ||
|
|
||
| ```shell | ||
| terraform import elasticstack_apm_agent_configuration.test_configuration my-service:production | ||
| ``` | ||
1 change: 1 addition & 0 deletions
1
examples/resources/elasticstack_apm_agent_configuration/import.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| terraform import elasticstack_apm_agent_configuration.test_configuration my-service:production |
13 changes: 13 additions & 0 deletions
13
examples/resources/elasticstack_apm_agent_configuration/resource.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| provider "elasticstack" { | ||
| elasticsearch {} | ||
| } | ||
|
|
||
| resource "elasticstack_apm_agent_configuration" "test_config" { | ||
| service_name = "my-service" | ||
| service_environment = "production" | ||
| agent_name = "go" | ||
| settings = { | ||
| "transaction_sample_rate" = "0.5" | ||
| "capture_body" = "all" | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.