Skip to content

Commit c24ab7b

Browse files
committed
r/aws_bedrockagentcore_agent_runtime_endpoint: Add tagging.
1 parent 1fa81e0 commit c24ab7b

File tree

7 files changed

+376
-291
lines changed

7 files changed

+376
-291
lines changed

internal/service/bedrockagentcore/agent_runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ func (r *agentRuntimeResource) Delete(ctx context.Context, request resource.Dele
370370
conn := r.Meta().BedrockAgentCoreClient(ctx)
371371

372372
input := bedrockagentcorecontrol.DeleteAgentRuntimeInput{
373-
AgentRuntimeId: data.AgentRuntimeID.ValueStringPointer(),
373+
AgentRuntimeId: fwflex.StringFromFramework(ctx, data.AgentRuntimeID),
374374
}
375375

376376
_, err := conn.DeleteAgentRuntime(ctx, &input)

internal/service/bedrockagentcore/agent_runtime_endpoint.go

Lines changed: 145 additions & 172 deletions
Large diffs are not rendered by default.

internal/service/bedrockagentcore/agent_runtime_endpoint_test.go

Lines changed: 209 additions & 79 deletions
Large diffs are not rendered by default.

internal/service/bedrockagentcore/exports_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package bedrockagentcore
66
// Exports for use in tests only.
77
var (
88
ResourceAgentRuntime = newAgentRuntimeResource
9-
ResourceAgentRuntimeEndpoint = newResourceAgentRuntimeEndpoint
9+
ResourceAgentRuntimeEndpoint = newAgentRuntimeEndpointResource
1010

11-
FindAgentRuntimeByID = findAgentRuntimeByID
12-
FindAgentRuntimeEndpointByRuntimeIDAndName = findAgentRuntimeEndpointByRuntimeIDAndName
11+
FindAgentRuntimeByID = findAgentRuntimeByID
12+
FindAgentRuntimeEndpointByTwoPartKey = findAgentRuntimeEndpointByTwoPartKey
1313
)

internal/service/bedrockagentcore/service_package_gen.go

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/service/bedrockagentcore/sweep.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ func sweepAgentRuntimeEndpoints(ctx context.Context, client *conns.AWSClient) ([
5656
}
5757

5858
for _, v := range page.RuntimeEndpoints {
59-
sweepResources = append(sweepResources, framework.NewSweepResource(newResourceAgentRuntimeEndpoint, client,
60-
framework.NewAttribute(names.AttrARN, aws.ToString(v.AgentRuntimeEndpointArn))),
59+
sweepResources = append(sweepResources, framework.NewSweepResource(newAgentRuntimeEndpointResource, client,
60+
framework.NewAttribute("agent_runtime_id", aws.ToString(v.Id)),
61+
framework.NewAttribute(names.AttrName, aws.ToString(v.Name)),
62+
),
6163
)
6264
}
6365
}

website/docs/r/bedrockagentcore_agent_runtime_endpoint.html.markdown

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,10 @@ Manages an AWS Bedrock AgentCore Agent Runtime Endpoint. Agent Runtime Endpoints
1515
### Basic Usage
1616

1717
```terraform
18-
resource "aws_bedrockagentcore_agent_runtime" "example" {
19-
name = "example-agent-runtime"
20-
description = "Example agent runtime"
21-
}
22-
23-
resource "aws_bedrockagentcore_agent_runtime_endpoint" "example" {
24-
name = "example-endpoint"
25-
agent_runtime_id = aws_bedrockagentcore_agent_runtime.example.id
26-
agent_runtime_version = "1.0.0"
27-
description = "Endpoint for agent runtime communication"
28-
}
29-
```
30-
31-
### Agent Runtime Endpoint with Custom Configuration
32-
33-
```terraform
34-
resource "aws_bedrockagentcore_agent_runtime" "example" {
35-
name = "production-agent-runtime"
36-
description = "Production agent runtime"
37-
}
38-
3918
resource "aws_bedrockagentcore_agent_runtime_endpoint" "example" {
40-
name = "production-endpoint"
41-
agent_runtime_id = aws_bedrockagentcore_agent_runtime.example.id
42-
agent_runtime_version = aws_bedrockagentcore_agent_runtime.example.version
43-
description = "Production endpoint with specific version"
44-
client_token = "unique-client-token-123"
19+
name = "example-endpoint"
20+
agent_runtime_id = aws_bedrockagentcore_agent_runtime.example.agent_runtime_id
21+
description = "Endpoint for agent runtime communication"
4522
}
4623
```
4724

@@ -51,21 +28,21 @@ The following arguments are required:
5128

5229
* `name` - (Required) Name of the agent runtime endpoint.
5330
* `agent_runtime_id` - (Required) ID of the agent runtime this endpoint belongs to.
54-
* `agent_runtime_version` - (Required) Version of the agent runtime to use for this endpoint.
5531

5632
The following arguments are optional:
5733

5834
* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference).
35+
* `agent_runtime_version` - (Optional) Version of the agent runtime to use for this endpoint.
5936
* `description` - (Optional) Description of the agent runtime endpoint.
60-
* `client_token` - (Optional) Unique identifier for request idempotency. If not provided, one will be generated automatically.
37+
* `tags` - (Optional) Key-value map of resource tags. 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.
6138

6239
## Attribute Reference
6340

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

66-
* `arn` - ARN of the Agent Runtime Endpoint.
43+
* `agent_runtime_endoint_arn` - ARN of the Agent Runtime Endpoint.
6744
* `agent_runtime_arn` - ARN of the associated Agent Runtime.
68-
* `id` - Unique identifier of the Agent Runtime Endpoint.
45+
* `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).
6946

7047
## Timeouts
7148

@@ -77,7 +54,7 @@ This resource exports the following attributes in addition to the arguments abov
7754

7855
## Import
7956

80-
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Bedrock AgentCore Agent Runtime Endpoint using the `agent_runtime_id` and `endpoint_name` separated by a comma. For example:
57+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Bedrock AgentCore Agent Runtime Endpoint using the `agent_runtime_id` and `name` separated by a comma. For example:
8158

8259
```terraform
8360
import {
@@ -86,7 +63,7 @@ import {
8663
}
8764
```
8865

89-
Using `terraform import`, import Bedrock AgentCore Agent Runtime Endpoint using the `agent_runtime_id` and `endpoint_name` separated by a comma. For example:
66+
Using `terraform import`, import Bedrock AgentCore Agent Runtime Endpoint using the `agent_runtime_id` and `name` separated by a comma. For example:
9067

9168
```console
9269
% terraform import aws_bedrockagentcore_agent_runtime_endpoint.example AGENTRUNTIME1234567890,example-endpoint

0 commit comments

Comments
 (0)