Skip to content

Commit

Permalink
aws_codeguruprofiler_profiling_group: add resource documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonaj committed Dec 1, 2023
1 parent a7d6b53 commit 87162b3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestAccCodeGuruProfilerProfilingGroupDataSource_basic(t *testing.T) {
func testAccProfilingGroupDataSourceConfig_basic(rName string) string {
return fmt.Sprintf(`
resource "aws_codeguruprofiler_profiling_group" "test" {
name = %[1]q
name = %[1]q
compute_platform = "Default"
agent_orchestration_config {
Expand All @@ -60,7 +60,7 @@ resource "aws_codeguruprofiler_profiling_group" "test" {
}
data "aws_codeguruprofiler_profiling_group" "test" {
name = aws_codeguruprofiler_profiling_group.test.name
name = aws_codeguruprofiler_profiling_group.test.name
}
`, rName)
}
8 changes: 4 additions & 4 deletions internal/service/codeguruprofiler/profiling_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func testAccPreCheck(ctx context.Context, t *testing.T) {
func testAccProfilingGroupConfig_basic(rName string) string {
return fmt.Sprintf(`
resource "aws_codeguruprofiler_profiling_group" "test" {
name = %[1]q
name = %[1]q
compute_platform = "Default"
agent_orchestration_config {
Expand All @@ -263,7 +263,7 @@ resource "aws_codeguruprofiler_profiling_group" "test" {
func testAccProfilingGroupConfig_update(rName string, profilingEnabled bool) string {
return fmt.Sprintf(`
resource "aws_codeguruprofiler_profiling_group" "test" {
name = %[1]q
name = %[1]q
compute_platform = "Default"
agent_orchestration_config {
Expand All @@ -276,7 +276,7 @@ resource "aws_codeguruprofiler_profiling_group" "test" {
func testAccProfilingGroupConfig_tags1(rName, key1, value1 string) string {
return fmt.Sprintf(`
resource "aws_codeguruprofiler_profiling_group" "test" {
name = %[1]q
name = %[1]q
compute_platform = "Default"
agent_orchestration_config {
Expand All @@ -292,7 +292,7 @@ resource "aws_codeguruprofiler_profiling_group" "test" {
func testAccProfilingGroupConfig_tags2(rName, key1, value1, key2, value2 string) string {
return fmt.Sprintf(`
resource "aws_codeguruprofiler_profiling_group" "test" {
name = %[1]q
name = %[1]q
compute_platform = "Default"
agent_orchestration_config {
Expand Down
28 changes: 15 additions & 13 deletions website/docs/r/codeguruprofiler_profiling_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,37 @@ Terraform resource for managing an AWS CodeGuru Profiler Profiling Group.

```terraform
resource "aws_codeguruprofiler_profiling_group" "example" {
name = "example"
compute_platform = "Default"
agent_orchestration_config {
profiling_enabled = true
}
}
```

## Argument Reference

The following arguments are required:

* `example_arg` - (Required) Concise argument description. Do not begin the description with "An", "The", "Defines", "Indicates", or "Specifies," as these are verbose. In other words, "Indicates the amount of storage," can be rewritten as "Amount of storage," without losing any information.
* `agent_orchestration_config` - (Required) Specifies whether profiling is enabled or disabled for the created profiling. See [Agent Orchestration Config](#agent-orchestration-config) for more details.
* `name` - (Required) The name of the profiling group to create.

The following arguments are optional:

* `optional_arg` - (Optional) Concise argument description. Do not begin the description with "An", "The", "Defines", "Indicates", or "Specifies," as these are verbose. In other words, "Indicates the amount of storage," can be rewritten as "Amount of storage," without losing any information.
* `compute_platform` - (Optional) The compute platform of the profiling group.
* `tags` - (Optional) A map of tags assigned to the WorkSpaces Connection Alias. If configured with a provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.

## Attribute Reference

This resource exports the following attributes in addition to the arguments above:

* `arn` - ARN of the Profiling Group. Do not begin the description with "An", "The", "Defines", "Indicates", or "Specifies," as these are verbose. In other words, "Indicates the amount of storage," can be rewritten as "Amount of storage," without losing any information.
* `example_attribute` - Concise description. Do not begin the description with "An", "The", "Defines", "Indicates", or "Specifies," as these are verbose. In other words, "Indicates the amount of storage," can be rewritten as "Amount of storage," without losing any information.
* `arn` - ARN of the Profiling Group.
* `tags_all` - A map of tags assigned to the resource, including those inherited from the provider [`default_tags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block).

## Timeouts

[Configuration options](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts):
### Agent Orchestration Config

* `create` - (Default `60m`)
* `update` - (Default `180m`)
* `delete` - (Default `90m`)
* `profiling_enabled` - (Required) Boolean that specifies whether the profiling agent collects profiling data or

## Import

Expand All @@ -52,12 +54,12 @@ In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashico
```terraform
import {
to = aws_codeguruprofiler_profiling_group.example
id = "profiling_group-id-12345678"
id = "profiling_group-name-12345678"
}
```

Using `terraform import`, import CodeGuru Profiler Profiling Group using the `example_id_arg`. For example:
Using `terraform import`, import CodeGuru Profiler Profiling Group using the `name`. For example:

```console
% terraform import aws_codeguruprofiler_profiling_group.example profiling_group-id-12345678
% terraform import aws_codeguruprofiler_profiling_group.example profiling_group-name-12345678
```

0 comments on commit 87162b3

Please sign in to comment.