Skip to content
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

Support resources with top-level Id property that isn't the primaryIdentifier #1501

Merged
merged 23 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
431e526
If the resource ahs a top-level 'Id' property, give it an alternative…
ewbankkit Apr 1, 2024
6c97894
Always add an 'id' attribute for resources.
ewbankkit Apr 1, 2024
7fd7897
'WithSyntheticIDAttribute' no longer needed.
ewbankkit Apr 1, 2024
1bf7a17
Run 'make resources'.
ewbankkit Apr 1, 2024
1eee6fe
Always set the 'id' attribute for resources.
ewbankkit Apr 1, 2024
7918b23
Remove generation suppression on 'Top-level Id property is not a prim…
ewbankkit Apr 1, 2024
f3535e8
Run 'make resources'.
ewbankkit Apr 1, 2024
8a9610f
Run 'make singular-data-sources plural-data-sources'.
ewbankkit Apr 1, 2024
9004264
Run 'make docs'.
ewbankkit Apr 2, 2024
d48987c
Add CHANGELOG entries.
ewbankkit Apr 2, 2024
962b70e
Fix golangci-lint 'gomnd'.
ewbankkit Apr 2, 2024
5c08694
Fix analyzer warnings.
ewbankkit Apr 2, 2024
32282cd
Add bugfix CHANGELOG entry.
ewbankkit Apr 2, 2024
7636ba6
Document change in handling of top-level 'id'.
ewbankkit Apr 2, 2024
4a44c09
Correct generation of alternate 'id' attribute.
ewbankkit Apr 2, 2024
fb37593
Run 'make resources singular-data-sources'.
ewbankkit Apr 2, 2024
1db4922
Run 'make docs'.
ewbankkit Apr 2, 2024
83bc93a
Revert "Fix analyzer warnings."
ewbankkit Apr 2, 2024
6010634
Refresh some schemas with top-level 'id'.
ewbankkit Apr 2, 2024
d8f7f02
Run 'make resources singular-data-sources'.
ewbankkit Apr 2, 2024
3e39aaf
Run 'make docs'.
ewbankkit Apr 2, 2024
6c5ee64
Add 'TestAccAWSEC2EgressOnlyInternetGateway_success'.
ewbankkit Apr 2, 2024
6a8e81c
Acceptance test output:
ewbankkit Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
110 changes: 110 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,114 @@
## 0.73.0 (Unreleased)

FEATURES:

* **New Data Source:** `awscc_apigateway_base_path_mapping`
* **New Data Source:** `awscc_apigateway_base_path_mappings`
* **New Data Source:** `awscc_appintegrations_application`
* **New Data Source:** `awscc_appintegrations_applications`
* **New Data Source:** `awscc_applicationautoscaling_scalable_target`
* **New Data Source:** `awscc_applicationautoscaling_scalable_targets`
* **New Data Source:** `awscc_cloudfront_key_value_store`
* **New Data Source:** `awscc_cloudfront_key_value_stores`
* **New Data Source:** `awscc_connect_instance`
* **New Data Source:** `awscc_connect_instances`
* **New Data Source:** `awscc_ec2_vpcdhcp_options_association`
* **New Data Source:** `awscc_ec2_vpcdhcp_options_associations`
* **New Data Source:** `awscc_groundstation_config`
* **New Data Source:** `awscc_groundstation_configs`
* **New Data Source:** `awscc_iot_billing_group`
* **New Data Source:** `awscc_iot_billing_groups`
* **New Data Source:** `awscc_iot_thing`
* **New Data Source:** `awscc_iot_thing_group`
* **New Data Source:** `awscc_iot_thing_groups`
* **New Data Source:** `awscc_iot_thing_type`
* **New Data Source:** `awscc_iot_thing_types`
* **New Data Source:** `awscc_iot_things`
* **New Data Source:** `awscc_iotanalytics_channel`
* **New Data Source:** `awscc_iotanalytics_channels`
* **New Data Source:** `awscc_iotanalytics_dataset`
* **New Data Source:** `awscc_iotanalytics_datasets`
* **New Data Source:** `awscc_iotanalytics_datastore`
* **New Data Source:** `awscc_iotanalytics_datastores`
* **New Data Source:** `awscc_iotanalytics_pipeline`
* **New Data Source:** `awscc_iotanalytics_pipelines`
* **New Data Source:** `awscc_ivschat_logging_configuration`
* **New Data Source:** `awscc_ivschat_logging_configurations`
* **New Data Source:** `awscc_ivschat_room`
* **New Data Source:** `awscc_ivschat_rooms`
* **New Data Source:** `awscc_omics_variant_store`
* **New Data Source:** `awscc_omics_variant_stores`
* **New Data Source:** `awscc_opensearchservice_domain`
* **New Data Source:** `awscc_opensearchservice_domains`
* **New Data Source:** `awscc_opsworkscm_server`
* **New Data Source:** `awscc_opsworkscm_servers`
* **New Data Source:** `awscc_proton_environment_account_connection`
* **New Data Source:** `awscc_proton_environment_account_connections`
* **New Data Source:** `awscc_redshift_cluster`
* **New Data Source:** `awscc_redshift_clusters`
* **New Data Source:** `awscc_s3outposts_endpoint`
* **New Data Source:** `awscc_s3outposts_endpoints`
* **New Data Source:** `awscc_sns_topic`
* **New Data Source:** `awscc_sns_topics`
* **New Data Source:** `awscc_synthetics_canaries`
* **New Data Source:** `awscc_synthetics_canary`
* **New Data Source:** `awscc_synthetics_group`
* **New Data Source:** `awscc_synthetics_groups`
* **New Data Source:** `awscc_vpclattice_access_log_subscription`
* **New Data Source:** `awscc_vpclattice_access_log_subscriptions`
* **New Data Source:** `awscc_vpclattice_listener`
* **New Data Source:** `awscc_vpclattice_listeners`
* **New Data Source:** `awscc_vpclattice_rule`
* **New Data Source:** `awscc_vpclattice_rules`
* **New Data Source:** `awscc_vpclattice_service`
* **New Data Source:** `awscc_vpclattice_service_network`
* **New Data Source:** `awscc_vpclattice_service_network_service_association`
* **New Data Source:** `awscc_vpclattice_service_network_service_associations`
* **New Data Source:** `awscc_vpclattice_service_network_vpc_association`
* **New Data Source:** `awscc_vpclattice_service_network_vpc_associations`
* **New Data Source:** `awscc_vpclattice_service_networks`
* **New Data Source:** `awscc_vpclattice_services`
* **New Data Source:** `awscc_vpclattice_target_group`
* **New Data Source:** `awscc_vpclattice_target_groups`
* **New Resource:** `awscc_apigateway_base_path_mapping`
* **New Resource:** `awscc_appintegrations_application`
* **New Resource:** `awscc_applicationautoscaling_scalable_target`
* **New Resource:** `awscc_cloudfront_key_value_store`
* **New Resource:** `awscc_connect_instance`
* **New Resource:** `awscc_ec2_vpcdhcp_options_association`
* **New Resource:** `awscc_groundstation_config`
* **New Resource:** `awscc_iot_billing_group`
* **New Resource:** `awscc_iot_thing`
* **New Resource:** `awscc_iot_thing_group`
* **New Resource:** `awscc_iot_thing_type`
* **New Resource:** `awscc_iotanalytics_channel`
* **New Resource:** `awscc_iotanalytics_dataset`
* **New Resource:** `awscc_iotanalytics_datastore`
* **New Resource:** `awscc_iotanalytics_pipeline`
* **New Resource:** `awscc_ivschat_logging_configuration`
* **New Resource:** `awscc_ivschat_room`
* **New Resource:** `awscc_omics_variant_store`
* **New Resource:** `awscc_opensearchservice_domain`
* **New Resource:** `awscc_opsworkscm_server`
* **New Resource:** `awscc_proton_environment_account_connection`
* **New Resource:** `awscc_redshift_cluster`
* **New Resource:** `awscc_s3outposts_endpoint`
* **New Resource:** `awscc_sns_topic`
* **New Resource:** `awscc_synthetics_canary`
* **New Resource:** `awscc_synthetics_group`
* **New Resource:** `awscc_vpclattice_access_log_subscription`
* **New Resource:** `awscc_vpclattice_listener`
* **New Resource:** `awscc_vpclattice_rule`
* **New Resource:** `awscc_vpclattice_service`
* **New Resource:** `awscc_vpclattice_service_network`
* **New Resource:** `awscc_vpclattice_service_network_service_association`
* **New Resource:** `awscc_vpclattice_service_network_vpc_association`
* **New Resource:** `awscc_vpclattice_target_group`

BUG FIXES:

* Fix `ValidationException: Identifier ... is not valid for identifier` errors ([#1501](https://github.com/hashicorp/terraform-provider-awscc/issues/1501))

## 0.72.1 (March 22, 2024)

BUG FIXES:
Expand Down
4 changes: 2 additions & 2 deletions contributing/docs/resource-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ The Terraform [`RequiresReplace`](https://developer.hashicorp.com/terraform/plug

#### The `id` Attribute

Every Terraform schema generated from a CloudFormation resource schema includes a top-level attribute named `id`. This attribute's value uniquely identifies the underlying AWS resource in the configured AWS account and Region and is used for [Cloud Control API operations](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html) and in [acceptance tests](https://developer.hashicorp.com/terraform/plugin/framework/acctests#no-id-found-in-attributes). The `id` attribute is added during the Terraform resource generation process if necessary.
Every Terraform schema generated from a CloudFormation resource schema includes a top-level attribute named `id`. This attribute's value uniquely identifies the underlying AWS resource in the configured AWS account and Region and is used for [Cloud Control API operations](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html) and in [acceptance tests](https://developer.hashicorp.com/terraform/plugin/framework/acctests#no-id-found-in-attributes). The `id` attribute is added during the Terraform resource generation process.

> [!NOTE]
> If the CloudFormation resource schema does define a top-level `Id` property and that property is _not_ of string type or it's not in the `primaryIdentifier` list then generation of the corresponding Terraform resource (and data sources) is suppressed.
> If the CloudFormation resource schema does define a top-level `Id` property then that property is mapped to a Terraform attribute named `<type>_id` (e.g. `flow_log_id` for the `awscc_ec2_flow_log` resource).

## Interaction With The Cloud Control API

Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/apigateway_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ Data Source schema for AWS::ApiGateway::Account

### Read-Only

- `account_id` (String)
- `cloudwatch_role_arn` (String) The ARN of an Amazon CloudWatch role for the current Account.
27 changes: 27 additions & 0 deletions docs/data-sources/apigateway_base_path_mapping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_apigateway_base_path_mapping Data Source - terraform-provider-awscc"
subcategory: ""
description: |-
Data Source schema for AWS::ApiGateway::BasePathMapping
---

# awscc_apigateway_base_path_mapping (Data Source)

Data Source schema for AWS::ApiGateway::BasePathMapping



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Uniquely identifies the resource.

### Read-Only

- `base_path` (String) The base path name that callers of the API must provide as part of the URL after the domain name.
- `domain_name` (String) The domain name of the BasePathMapping resource to be described.
- `rest_api_id` (String) The string identifier of the associated RestApi.
- `stage` (String) The name of the associated stage.
21 changes: 21 additions & 0 deletions docs/data-sources/apigateway_base_path_mappings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_apigateway_base_path_mappings Data Source - terraform-provider-awscc"
subcategory: ""
description: |-
Plural Data Source schema for AWS::ApiGateway::BasePathMapping
---

# awscc_apigateway_base_path_mappings (Data Source)

Plural Data Source schema for AWS::ApiGateway::BasePathMapping



<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `id` (String) Uniquely identifies the data source.
- `ids` (Set of String) Set of Resource Identifiers.
1 change: 1 addition & 0 deletions docs/data-sources/apigateway_usage_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Data Source schema for AWS::ApiGateway::UsagePlan
- `quota` (Attributes) The target maximum number of permitted requests per a given unit time interval. (see [below for nested schema](#nestedatt--quota))
- `tags` (Attributes List) The collection of tags. Each tag element is associated with a given resource. (see [below for nested schema](#nestedatt--tags))
- `throttle` (Attributes) A map containing method level throttling information for API stage in a usage plan. (see [below for nested schema](#nestedatt--throttle))
- `usage_plan_id` (String)
- `usage_plan_name` (String) The name of a usage plan.

<a id="nestedatt--api_stages"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/apigateway_usage_plan_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ Data Source schema for AWS::ApiGateway::UsagePlanKey
- `key_id` (String) The Id of the UsagePlanKey resource.
- `key_type` (String) The type of a UsagePlanKey resource for a plan customer.
- `usage_plan_id` (String) The Id of the UsagePlan resource representing the usage plan containing the UsagePlanKey resource representing a plan customer.
- `usage_plan_key_id` (String)
1 change: 1 addition & 0 deletions docs/data-sources/appconfig_extension_association.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Data Source schema for AWS::AppConfig::ExtensionAssociation

- `arn` (String)
- `extension_arn` (String)
- `extension_association_id` (String)
- `extension_identifier` (String)
- `extension_version_number` (Number)
- `parameters` (Map of String)
Expand Down
55 changes: 55 additions & 0 deletions docs/data-sources/appintegrations_application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_appintegrations_application Data Source - terraform-provider-awscc"
subcategory: ""
description: |-
Data Source schema for AWS::AppIntegrations::Application
---

# awscc_appintegrations_application (Data Source)

Data Source schema for AWS::AppIntegrations::Application



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Uniquely identifies the resource.

### Read-Only

- `application_arn` (String) The Amazon Resource Name (ARN) of the application.
- `application_id` (String) The id of the application.
- `application_source_config` (Attributes) Application source config (see [below for nested schema](#nestedatt--application_source_config))
- `description` (String) The application description.
- `name` (String) The name of the application.
- `namespace` (String) The namespace of the application.
- `tags` (Attributes List) The tags (keys and values) associated with the application. (see [below for nested schema](#nestedatt--tags))

<a id="nestedatt--application_source_config"></a>
### Nested Schema for `application_source_config`

Read-Only:

- `external_url_config` (Attributes) (see [below for nested schema](#nestedatt--application_source_config--external_url_config))

<a id="nestedatt--application_source_config--external_url_config"></a>
### Nested Schema for `application_source_config.external_url_config`

Read-Only:

- `access_url` (String)
- `approved_origins` (List of String)



<a id="nestedatt--tags"></a>
### Nested Schema for `tags`

Read-Only:

- `key` (String) A key to identify the tag.
- `value` (String) Corresponding tag value for the key.
21 changes: 21 additions & 0 deletions docs/data-sources/appintegrations_applications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_appintegrations_applications Data Source - terraform-provider-awscc"
subcategory: ""
description: |-
Plural Data Source schema for AWS::AppIntegrations::Application
---

# awscc_appintegrations_applications (Data Source)

Plural Data Source schema for AWS::AppIntegrations::Application



<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `id` (String) Uniquely identifies the data source.
- `ids` (Set of String) Set of Resource Identifiers.
63 changes: 63 additions & 0 deletions docs/data-sources/applicationautoscaling_scalable_target.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_applicationautoscaling_scalable_target Data Source - terraform-provider-awscc"
subcategory: ""
description: |-
Data Source schema for AWS::ApplicationAutoScaling::ScalableTarget
---

# awscc_applicationautoscaling_scalable_target (Data Source)

Data Source schema for AWS::ApplicationAutoScaling::ScalableTarget



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) Uniquely identifies the resource.

### Read-Only

- `max_capacity` (Number) The maximum value that you plan to scale in to. When a scaling policy is in effect, Application Auto Scaling can scale in (contract) as needed to the minimum capacity limit in response to changing demand
- `min_capacity` (Number) The minimum value that you plan to scale in to. When a scaling policy is in effect, Application Auto Scaling can scale in (contract) as needed to the minimum capacity limit in response to changing demand
- `resource_id` (String) The identifier of the resource associated with the scalable target
- `role_arn` (String) Specify the Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role that allows Application Auto Scaling to modify the scalable target on your behalf.
- `scalable_dimension` (String) The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property
- `scalable_target_id` (String) This value can be returned by using the Ref function. Ref returns the Cloudformation generated ID of the resource in format - ResourceId|ScalableDimension|ServiceNamespace
- `scheduled_actions` (Attributes Set) The scheduled actions for the scalable target. Duplicates aren't allowed. (see [below for nested schema](#nestedatt--scheduled_actions))
- `service_namespace` (String) The namespace of the AWS service that provides the resource, or a custom-resource
- `suspended_state` (Attributes) An embedded object that contains attributes and attribute values that are used to suspend and resume automatic scaling. Setting the value of an attribute to true suspends the specified scaling activities. Setting it to false (default) resumes the specified scaling activities. (see [below for nested schema](#nestedatt--suspended_state))

<a id="nestedatt--scheduled_actions"></a>
### Nested Schema for `scheduled_actions`

Read-Only:

- `end_time` (String)
- `scalable_target_action` (Attributes) specifies the minimum and maximum capacity (see [below for nested schema](#nestedatt--scheduled_actions--scalable_target_action))
- `schedule` (String)
- `scheduled_action_name` (String)
- `start_time` (String)
- `timezone` (String)

<a id="nestedatt--scheduled_actions--scalable_target_action"></a>
### Nested Schema for `scheduled_actions.scalable_target_action`

Read-Only:

- `max_capacity` (Number)
- `min_capacity` (Number)



<a id="nestedatt--suspended_state"></a>
### Nested Schema for `suspended_state`

Read-Only:

- `dynamic_scaling_in_suspended` (Boolean)
- `dynamic_scaling_out_suspended` (Boolean)
- `scheduled_scaling_suspended` (Boolean)
21 changes: 21 additions & 0 deletions docs/data-sources/applicationautoscaling_scalable_targets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_applicationautoscaling_scalable_targets Data Source - terraform-provider-awscc"
subcategory: ""
description: |-
Plural Data Source schema for AWS::ApplicationAutoScaling::ScalableTarget
---

# awscc_applicationautoscaling_scalable_targets (Data Source)

Plural Data Source schema for AWS::ApplicationAutoScaling::ScalableTarget



<!-- schema generated by tfplugindocs -->
## Schema

### Read-Only

- `id` (String) Uniquely identifies the data source.
- `ids` (Set of String) Set of Resource Identifiers.
1 change: 1 addition & 0 deletions docs/data-sources/backup_backup_selection.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Data Source schema for AWS::Backup::BackupSelection

- `backup_plan_id` (String)
- `backup_selection` (Attributes) (see [below for nested schema](#nestedatt--backup_selection))
- `backup_selection_id` (String)
- `selection_id` (String)

<a id="nestedatt--backup_selection"></a>
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/batch_job_definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Data Source schema for AWS::Batch::JobDefinition
- `container_properties` (Attributes) (see [below for nested schema](#nestedatt--container_properties))
- `ecs_properties` (Attributes) (see [below for nested schema](#nestedatt--ecs_properties))
- `eks_properties` (Attributes) (see [below for nested schema](#nestedatt--eks_properties))
- `job_definition_id` (String)
- `job_definition_name` (String)
- `node_properties` (Attributes) (see [below for nested schema](#nestedatt--node_properties))
- `parameters` (String)
Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/cloudfront_cache_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Data Source schema for AWS::CloudFront::CachePolicy
### Read-Only

- `cache_policy_config` (Attributes) (see [below for nested schema](#nestedatt--cache_policy_config))
- `cache_policy_id` (String)
- `last_modified_time` (String)

<a id="nestedatt--cache_policy_config"></a>
Expand Down
Loading
Loading