diff --git a/CHANGELOG.md b/CHANGELOG.md index f8e396d78..b43236322 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/contributing/docs/resource-behavior.md b/contributing/docs/resource-behavior.md index 6b80129dd..1be77b722 100644 --- a/contributing/docs/resource-behavior.md +++ b/contributing/docs/resource-behavior.md @@ -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 `_id` (e.g. `flow_log_id` for the `awscc_ec2_flow_log` resource). ## Interaction With The Cloud Control API diff --git a/docs/data-sources/apigateway_account.md b/docs/data-sources/apigateway_account.md index 4c214ad4b..77b4ab0d1 100644 --- a/docs/data-sources/apigateway_account.md +++ b/docs/data-sources/apigateway_account.md @@ -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. diff --git a/docs/data-sources/apigateway_base_path_mapping.md b/docs/data-sources/apigateway_base_path_mapping.md new file mode 100644 index 000000000..0c04d9282 --- /dev/null +++ b/docs/data-sources/apigateway_base_path_mapping.md @@ -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 + +### 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. diff --git a/docs/data-sources/apigateway_base_path_mappings.md b/docs/data-sources/apigateway_base_path_mappings.md new file mode 100644 index 000000000..d247be340 --- /dev/null +++ b/docs/data-sources/apigateway_base_path_mappings.md @@ -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 + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/apigateway_usage_plan.md b/docs/data-sources/apigateway_usage_plan.md index d2b4054b7..124024e17 100644 --- a/docs/data-sources/apigateway_usage_plan.md +++ b/docs/data-sources/apigateway_usage_plan.md @@ -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. diff --git a/docs/data-sources/apigateway_usage_plan_key.md b/docs/data-sources/apigateway_usage_plan_key.md index 0f1d0cc1d..ac1226b43 100644 --- a/docs/data-sources/apigateway_usage_plan_key.md +++ b/docs/data-sources/apigateway_usage_plan_key.md @@ -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) diff --git a/docs/data-sources/appconfig_extension_association.md b/docs/data-sources/appconfig_extension_association.md index d809e8edf..b8f1a8e35 100644 --- a/docs/data-sources/appconfig_extension_association.md +++ b/docs/data-sources/appconfig_extension_association.md @@ -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) diff --git a/docs/data-sources/appintegrations_application.md b/docs/data-sources/appintegrations_application.md new file mode 100644 index 000000000..80e2e6b0b --- /dev/null +++ b/docs/data-sources/appintegrations_application.md @@ -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 + +### 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)) + + +### Nested Schema for `application_source_config` + +Read-Only: + +- `external_url_config` (Attributes) (see [below for nested schema](#nestedatt--application_source_config--external_url_config)) + + +### Nested Schema for `application_source_config.external_url_config` + +Read-Only: + +- `access_url` (String) +- `approved_origins` (List of String) + + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) A key to identify the tag. +- `value` (String) Corresponding tag value for the key. diff --git a/docs/data-sources/appintegrations_applications.md b/docs/data-sources/appintegrations_applications.md new file mode 100644 index 000000000..788314f1c --- /dev/null +++ b/docs/data-sources/appintegrations_applications.md @@ -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 + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/applicationautoscaling_scalable_target.md b/docs/data-sources/applicationautoscaling_scalable_target.md new file mode 100644 index 000000000..043dc0c24 --- /dev/null +++ b/docs/data-sources/applicationautoscaling_scalable_target.md @@ -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 + +### 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)) + + +### 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) + + +### Nested Schema for `scheduled_actions.scalable_target_action` + +Read-Only: + +- `max_capacity` (Number) +- `min_capacity` (Number) + + + + +### Nested Schema for `suspended_state` + +Read-Only: + +- `dynamic_scaling_in_suspended` (Boolean) +- `dynamic_scaling_out_suspended` (Boolean) +- `scheduled_scaling_suspended` (Boolean) diff --git a/docs/data-sources/applicationautoscaling_scalable_targets.md b/docs/data-sources/applicationautoscaling_scalable_targets.md new file mode 100644 index 000000000..124a48e2a --- /dev/null +++ b/docs/data-sources/applicationautoscaling_scalable_targets.md @@ -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 + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/backup_backup_selection.md b/docs/data-sources/backup_backup_selection.md index 2c43240da..a3f92f471 100644 --- a/docs/data-sources/backup_backup_selection.md +++ b/docs/data-sources/backup_backup_selection.md @@ -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) diff --git a/docs/data-sources/batch_job_definition.md b/docs/data-sources/batch_job_definition.md index dbf60e2c7..f1d322df4 100644 --- a/docs/data-sources/batch_job_definition.md +++ b/docs/data-sources/batch_job_definition.md @@ -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) diff --git a/docs/data-sources/cloudfront_cache_policy.md b/docs/data-sources/cloudfront_cache_policy.md index 0e0b04899..2a14a2d37 100644 --- a/docs/data-sources/cloudfront_cache_policy.md +++ b/docs/data-sources/cloudfront_cache_policy.md @@ -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) diff --git a/docs/data-sources/cloudfront_cloudfront_origin_access_identity.md b/docs/data-sources/cloudfront_cloudfront_origin_access_identity.md index a83f0222a..9f8a7f52d 100644 --- a/docs/data-sources/cloudfront_cloudfront_origin_access_identity.md +++ b/docs/data-sources/cloudfront_cloudfront_origin_access_identity.md @@ -22,6 +22,7 @@ Data Source schema for AWS::CloudFront::CloudFrontOriginAccessIdentity ### Read-Only - `cloudfront_origin_access_identity_config` (Attributes) (see [below for nested schema](#nestedatt--cloudfront_origin_access_identity_config)) +- `cloudfront_origin_access_identity_id` (String) - `s3_canonical_user_id` (String) diff --git a/docs/data-sources/cloudfront_continuous_deployment_policy.md b/docs/data-sources/cloudfront_continuous_deployment_policy.md index c4c214412..c61a4ceb9 100644 --- a/docs/data-sources/cloudfront_continuous_deployment_policy.md +++ b/docs/data-sources/cloudfront_continuous_deployment_policy.md @@ -22,6 +22,7 @@ Data Source schema for AWS::CloudFront::ContinuousDeploymentPolicy ### Read-Only - `continuous_deployment_policy_config` (Attributes) (see [below for nested schema](#nestedatt--continuous_deployment_policy_config)) +- `continuous_deployment_policy_id` (String) - `last_modified_time` (String) diff --git a/docs/data-sources/cloudfront_distribution.md b/docs/data-sources/cloudfront_distribution.md deleted file mode 100644 index 5df799a2a..000000000 --- a/docs/data-sources/cloudfront_distribution.md +++ /dev/null @@ -1,577 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_cloudfront_distribution Data Source - terraform-provider-awscc" -subcategory: "" -description: |- - Data Source schema for AWS::CloudFront::Distribution ---- - -# awscc_cloudfront_distribution (Data Source) - -Data Source schema for AWS::CloudFront::Distribution - - - - -## Schema - -### Required - -- `id` (String) Uniquely identifies the resource. - -### Read-Only - -- `distribution_config` (Attributes) The distribution's configuration. (see [below for nested schema](#nestedatt--distribution_config)) -- `domain_name` (String) -- `tags` (Attributes List) A complex type that contains zero or more ``Tag`` elements. (see [below for nested schema](#nestedatt--tags)) - - -### Nested Schema for `distribution_config` - -Read-Only: - -- `aliases` (List of String) A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution. -- `cache_behaviors` (Attributes List) A complex type that contains zero or more ``CacheBehavior`` elements. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors)) -- `cnames` (List of String) -- `comment` (String) A comment to describe the distribution. The comment cannot be longer than 128 characters. -- `continuous_deployment_policy_id` (String) The identifier of a continuous deployment policy. For more information, see ``CreateContinuousDeploymentPolicy``. -- `custom_error_responses` (Attributes List) A complex type that controls the following: - + Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer. - + How long CloudFront caches HTTP status codes in the 4xx and 5xx range. - - For more information about custom error pages, see [Customizing Error Responses](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--custom_error_responses)) -- `custom_origin` (Attributes) (see [below for nested schema](#nestedatt--distribution_config--custom_origin)) -- `default_cache_behavior` (Attributes) A complex type that describes the default cache behavior if you don't specify a ``CacheBehavior`` element or if files don't match any of the values of ``PathPattern`` in ``CacheBehavior`` elements. You must create exactly one default cache behavior. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior)) -- `default_root_object` (String) The object that you want CloudFront to request from your origin (for example, ``index.html``) when a viewer requests the root URL for your distribution (``https://www.example.com``) instead of an object in your distribution (``https://www.example.com/product-description.html``). Specifying a default root object avoids exposing the contents of your distribution. - Specify only the object name, for example, ``index.html``. Don't add a ``/`` before the object name. - If you don't want to specify a default root object when you create a distribution, include an empty ``DefaultRootObject`` element. - To delete the default root object from an existing distribution, update the distribution configuration and include an empty ``DefaultRootObject`` element. - To replace the default root object, update the distribution configuration and specify the new object. - For more information about the default root object, see [Creating a Default Root Object](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) in the *Amazon CloudFront Developer Guide*. -- `enabled` (Boolean) From this field, you can enable or disable the selected distribution. -- `http_version` (String) (Optional) Specify the maximum HTTP version(s) that you want viewers to use to communicate with CF. The default value for new distributions is ``http1.1``. - For viewers and CF to use HTTP/2, viewers must support TLSv1.2 or later, and must support Server Name Indication (SNI). - For viewers and CF to use HTTP/3, viewers must support TLSv1.3 and Server Name Indication (SNI). CF supports HTTP/3 connection migration to allow the viewer to switch networks without losing connection. For more information about connection migration, see [Connection Migration](https://docs.aws.amazon.com/https://www.rfc-editor.org/rfc/rfc9000.html#name-connection-migration) at RFC 9000. For more information about supported TLSv1.3 ciphers, see [Supported protocols and ciphers between viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html). -- `ipv6_enabled` (Boolean) If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify ``true``. If you specify ``false``, CloudFront responds to IPv6 DNS requests with the DNS response code ``NOERROR`` and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution. - In general, you should enable IPv6 if you have users on IPv6 networks who want to access your content. However, if you're using signed URLs or signed cookies to restrict access to your content, and if you're using a custom policy that includes the ``IpAddress`` parameter to restrict the IP addresses that can access your content, don't enable IPv6. If you want to restrict access to some content by IP address and not restrict access to other content (or restrict access but not by IP address), you can create two distributions. For more information, see [Creating a Signed URL Using a Custom Policy](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) in the *Amazon CloudFront Developer Guide*. - If you're using an R53AWSIntlong alias resource record set to route traffic to your CloudFront distribution, you need to create a second alias resource record set when both of the following are true: - + You enable IPv6 for the distribution - + You're using alternate domain names in the URLs for your objects - - For more information, see [Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) in the *Developer Guide*. - If you created a CNAME resource record set, either with R53AWSIntlong or with another DNS service, you don't need to make any changes. A CNAME record will route traffic to your distribution regardless of the IP address format of the viewer request. -- `logging` (Attributes) A complex type that controls whether access logs are written for the distribution. - For more information about logging, see [Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--logging)) -- `origin_groups` (Attributes) A complex type that contains information about origin groups for this distribution. (see [below for nested schema](#nestedatt--distribution_config--origin_groups)) -- `origins` (Attributes List) A complex type that contains information about origins for this distribution. (see [below for nested schema](#nestedatt--distribution_config--origins)) -- `price_class` (String) The price class that corresponds with the maximum price that you want to pay for CloudFront service. If you specify ``PriceClass_All``, CloudFront responds to requests for your objects from all CloudFront edge locations. - If you specify a price class other than ``PriceClass_All``, CloudFront serves your objects from the CloudFront edge location that has the lowest latency among the edge locations in your price class. Viewers who are in or near regions that are excluded from your specified price class may encounter slower performance. - For more information about price classes, see [Choosing the Price Class for a CloudFront Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) in the *Amazon CloudFront Developer Guide*. For information about CloudFront pricing, including how price classes (such as Price Class 100) map to CloudFront regions, see [Amazon CloudFront Pricing](https://docs.aws.amazon.com/cloudfront/pricing/). -- `restrictions` (Attributes) A complex type that identifies ways in which you want to restrict distribution of your content. (see [below for nested schema](#nestedatt--distribution_config--restrictions)) -- `s3_origin` (Attributes) (see [below for nested schema](#nestedatt--distribution_config--s3_origin)) -- `staging` (Boolean) A Boolean that indicates whether this is a staging distribution. When this value is ``true``, this is a staging distribution. When this value is ``false``, this is not a staging distribution. -- `viewer_certificate` (Attributes) A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. (see [below for nested schema](#nestedatt--distribution_config--viewer_certificate)) -- `web_acl_id` (String) A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example ``arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a``. To specify a web ACL created using WAF Classic, use the ACL ID, for example ``473e64fd-f30b-4765-81a0-62ad96dd167a``. - WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, and lets you control access to your content. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, CloudFront responds to requests either with the requested content or with an HTTP 403 status code (Forbidden). You can also configure CloudFront to return a custom error page when a request is blocked. For more information about WAF, see the [Developer Guide](https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). - - -### Nested Schema for `distribution_config.cache_behaviors` - -Read-Only: - -- `allowed_methods` (List of String) A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices: - + CloudFront forwards only ``GET`` and ``HEAD`` requests. - + CloudFront forwards only ``GET``, ``HEAD``, and ``OPTIONS`` requests. - + CloudFront forwards ``GET, HEAD, OPTIONS, PUT, PATCH, POST``, and ``DELETE`` requests. - - If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin. -- `cache_policy_id` (String) The unique identifier of the cache policy that is attached to this cache behavior. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``CacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. -- `cached_methods` (List of String) A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices: - + CloudFront caches responses to ``GET`` and ``HEAD`` requests. - + CloudFront caches responses to ``GET``, ``HEAD``, and ``OPTIONS`` requests. - - If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly. -- `compress` (Boolean) Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the *Amazon CloudFront Developer Guide*. -- `default_ttl` (Number) This field is deprecated. We recommend that you use the ``DefaultTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `field_level_encryption_id` (String) The value of ``ID`` for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior. -- `forwarded_values` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. For more information, see [Working with policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to include values in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to send values to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``CacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. - A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--forwarded_values)) -- `function_associations` (Attributes List) A list of CloudFront functions that are associated with this cache behavior. CloudFront functions must be published to the ``LIVE`` stage to associate them with a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--function_associations)) -- `lambda_function_associations` (Attributes List) A complex type that contains zero or more Lambda@Edge function associations for a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--lambda_function_associations)) -- `max_ttl` (Number) This field is deprecated. We recommend that you use the ``MaxTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `min_ttl` (Number) This field is deprecated. We recommend that you use the ``MinTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - You must specify ``0`` for ``MinTTL`` if you configure CloudFront to forward all headers to your origin (under ``Headers``, if you specify ``1`` for ``Quantity`` and ``*`` for ``Name``). -- `origin_request_policy_id` (String) The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. -- `path_pattern` (String) The pattern (for example, ``images/*.jpg``) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution. - You can optionally include a slash (``/``) at the beginning of the path pattern. For example, ``/images/*.jpg``. CloudFront behavior is the same with or without the leading ``/``. - The path pattern for the default cache behavior is ``*`` and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior. - For more information, see [Path Pattern](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) in the *Amazon CloudFront Developer Guide*. -- `realtime_log_config_arn` (String) The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see [Real-time logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) in the *Amazon CloudFront Developer Guide*. -- `response_headers_policy_id` (String) The identifier for a response headers policy. -- `smooth_streaming` (Boolean) Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify ``true``; if not, specify ``false``. If you specify ``true`` for ``SmoothStreaming``, you can still distribute other content using this cache behavior if the content matches the value of ``PathPattern``. -- `target_origin_id` (String) The value of ``ID`` for the origin that you want CloudFront to route requests to when they match this cache behavior. -- `trusted_key_groups` (List of String) A list of key groups that CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. -- `trusted_signers` (List of String) We recommend using ``TrustedKeyGroups`` instead of ``TrustedSigners``. - A list of AWS-account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer's AWS-account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. -- `viewer_protocol_policy` (String) The protocol that viewers can use to access the files in the origin specified by ``TargetOriginId`` when a request matches the path pattern in ``PathPattern``. You can specify the following options: - + ``allow-all``: Viewers can use HTTP or HTTPS. - + ``redirect-to-https``: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL. - + ``https-only``: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). - - For more information about requiring the HTTPS protocol, see [Requiring HTTPS Between Viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) in the *Amazon CloudFront Developer Guide*. - The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects' cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see [Managing Cache Expiration](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - - -### Nested Schema for `distribution_config.cache_behaviors.forwarded_values` - -Read-Only: - -- `cookies` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see [How CloudFront Forwards, Caches, and Logs Cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--forwarded_values--cookies)) -- `headers` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include headers in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send headers to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies the ``Headers``, if any, that you want CloudFront to forward to the origin for this cache behavior (whitelisted headers). For the headers that you specify, CloudFront also caches separate versions of a specified object that is based on the header values in viewer requests. - For more information, see [Caching Content Based on Request Headers](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) in the *Amazon CloudFront Developer Guide*. -- `query_string` (Boolean) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of ``QueryString`` and on the values that you specify for ``QueryStringCacheKeys``, if any: - If you specify true for ``QueryString`` and you don't specify any values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin. - If you specify true for ``QueryString`` and you specify one or more values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. - If you specify false for ``QueryString``, CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters. - For more information, see [Configuring CloudFront to Cache Based on Query String Parameters](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) in the *Amazon CloudFront Developer Guide*. -- `query_string_cache_keys` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that contains information about the query string parameters that you want CloudFront to use for caching for this cache behavior. - - -### Nested Schema for `distribution_config.cache_behaviors.forwarded_values.query_string_cache_keys` - -Read-Only: - -- `forward` (String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of cookies specified in the ``WhitelistedNames`` complex type. - Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the ``Forward`` element. -- `whitelisted_names` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Required if you specify ``whitelist`` for the value of ``Forward``. A complex type that specifies how many different cookies you want CloudFront to forward to the origin for this cache behavior and, if you want to forward selected cookies, the names of those cookies. - If you specify ``all`` or ``none`` for the value of ``Forward``, omit ``WhitelistedNames``. If you change the value of ``Forward`` from ``whitelist`` to ``all`` or ``none`` and you don't delete the ``WhitelistedNames`` element and its child elements, CloudFront deletes them automatically. - For the current limit on the number of cookie names that you can whitelist for each cache behavior, see [CloudFront Limits](https://docs.aws.amazon.com/general/latest/gr/xrefaws_service_limits.html#limits_cloudfront) in the *General Reference*. - - - - -### Nested Schema for `distribution_config.cache_behaviors.function_associations` - -Read-Only: - -- `event_type` (String) The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function. -- `function_arn` (String) The Amazon Resource Name (ARN) of the function. - - - -### Nested Schema for `distribution_config.cache_behaviors.lambda_function_associations` - -Read-Only: - -- `event_type` (String) Specifies the event type that triggers a Lambda@Edge function invocation. You can specify the following values: - + ``viewer-request``: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache. - + ``origin-request``: The function executes only when CloudFront sends a request to your origin. When the requested object is in the edge cache, the function doesn't execute. - + ``origin-response``: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute. - + ``viewer-response``: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache. - If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute. -- `include_body` (Boolean) A flag that allows a Lambda@Edge function to have read access to the body content. For more information, see [Accessing the Request Body by Choosing the Include Body Option](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) in the Amazon CloudFront Developer Guide. -- `lambda_function_arn` (String) The ARN of the Lambda@Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST. - - - - -### Nested Schema for `distribution_config.custom_error_responses` - -Read-Only: - -- `error_caching_min_ttl` (Number) The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ``ErrorCode``. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available. - For more information, see [Customizing Error Responses](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) in the *Amazon CloudFront Developer Guide*. -- `error_code` (Number) The HTTP status code for which you want to specify a custom error page and/or a caching duration. -- `response_code` (Number) The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example: - + Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute ``200``, the response typically won't be intercepted. - + If you don't care about distinguishing among different client errors or server errors, you can specify ``400`` or ``500`` as the ``ResponseCode`` for all 4xx or 5xx errors. - + You might want to return a ``200`` status code (OK) and static website so your customers don't know that your website is down. - - If you specify a value for ``ResponseCode``, you must also specify a value for ``ResponsePagePath``. -- `response_page_path` (String) The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the HTTP status code specified by ``ErrorCode``, for example, ``/4xx-errors/403-forbidden.html``. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true: - + The value of ``PathPattern`` matches the path to your custom error messages. For example, suppose you saved custom error pages for 4xx errors in an Amazon S3 bucket in a directory named ``/4xx-errors``. Your distribution must include a cache behavior for which the path pattern routes requests for your custom error pages to that location, for example, ``/4xx-errors/*``. - + The value of ``TargetOriginId`` specifies the value of the ``ID`` element for the origin that contains your custom error pages. - - If you specify a value for ``ResponsePagePath``, you must also specify a value for ``ResponseCode``. - We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable. - - - -### Nested Schema for `distribution_config.custom_origin` - -Read-Only: - -- `dns_name` (String) -- `http_port` (Number) -- `https_port` (Number) -- `origin_protocol_policy` (String) -- `origin_ssl_protocols` (List of String) - - - -### Nested Schema for `distribution_config.default_cache_behavior` - -Read-Only: - -- `allowed_methods` (List of String) A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices: - + CloudFront forwards only ``GET`` and ``HEAD`` requests. - + CloudFront forwards only ``GET``, ``HEAD``, and ``OPTIONS`` requests. - + CloudFront forwards ``GET, HEAD, OPTIONS, PUT, PATCH, POST``, and ``DELETE`` requests. - - If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin. -- `cache_policy_id` (String) The unique identifier of the cache policy that is attached to the default cache behavior. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``DefaultCacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. -- `cached_methods` (List of String) A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices: - + CloudFront caches responses to ``GET`` and ``HEAD`` requests. - + CloudFront caches responses to ``GET``, ``HEAD``, and ``OPTIONS`` requests. - - If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly. -- `compress` (Boolean) Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify ``true``; if not, specify ``false``. For more information, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the *Amazon CloudFront Developer Guide*. -- `default_ttl` (Number) This field is deprecated. We recommend that you use the ``DefaultTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `field_level_encryption_id` (String) The value of ``ID`` for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for the default cache behavior. -- `forwarded_values` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. For more information, see [Working with policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to include values in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to send values to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``DefaultCacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. - A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--forwarded_values)) -- `function_associations` (Attributes List) A list of CloudFront functions that are associated with this cache behavior. CloudFront functions must be published to the ``LIVE`` stage to associate them with a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--function_associations)) -- `lambda_function_associations` (Attributes List) A complex type that contains zero or more Lambda@Edge function associations for a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--lambda_function_associations)) -- `max_ttl` (Number) This field is deprecated. We recommend that you use the ``MaxTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `min_ttl` (Number) This field is deprecated. We recommend that you use the ``MinTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - You must specify ``0`` for ``MinTTL`` if you configure CloudFront to forward all headers to your origin (under ``Headers``, if you specify ``1`` for ``Quantity`` and ``*`` for ``Name``). -- `origin_request_policy_id` (String) The unique identifier of the origin request policy that is attached to the default cache behavior. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. -- `realtime_log_config_arn` (String) The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see [Real-time logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) in the *Amazon CloudFront Developer Guide*. -- `response_headers_policy_id` (String) The identifier for a response headers policy. -- `smooth_streaming` (Boolean) Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify ``true``; if not, specify ``false``. If you specify ``true`` for ``SmoothStreaming``, you can still distribute other content using this cache behavior if the content matches the value of ``PathPattern``. -- `target_origin_id` (String) The value of ``ID`` for the origin that you want CloudFront to route requests to when they use the default cache behavior. -- `trusted_key_groups` (List of String) A list of key groups that CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. -- `trusted_signers` (List of String) We recommend using ``TrustedKeyGroups`` instead of ``TrustedSigners``. - A list of AWS-account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in a trusted signer's AWS-account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. -- `viewer_protocol_policy` (String) The protocol that viewers can use to access the files in the origin specified by ``TargetOriginId`` when a request matches the path pattern in ``PathPattern``. You can specify the following options: - + ``allow-all``: Viewers can use HTTP or HTTPS. - + ``redirect-to-https``: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL. - + ``https-only``: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). - - For more information about requiring the HTTPS protocol, see [Requiring HTTPS Between Viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) in the *Amazon CloudFront Developer Guide*. - The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects' cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see [Managing Cache Expiration](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - - -### Nested Schema for `distribution_config.default_cache_behavior.forwarded_values` - -Read-Only: - -- `cookies` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see [How CloudFront Forwards, Caches, and Logs Cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--forwarded_values--cookies)) -- `headers` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include headers in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send headers to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies the ``Headers``, if any, that you want CloudFront to forward to the origin for this cache behavior (whitelisted headers). For the headers that you specify, CloudFront also caches separate versions of a specified object that is based on the header values in viewer requests. - For more information, see [Caching Content Based on Request Headers](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) in the *Amazon CloudFront Developer Guide*. -- `query_string` (Boolean) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of ``QueryString`` and on the values that you specify for ``QueryStringCacheKeys``, if any: - If you specify true for ``QueryString`` and you don't specify any values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin. - If you specify true for ``QueryString`` and you specify one or more values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. - If you specify false for ``QueryString``, CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters. - For more information, see [Configuring CloudFront to Cache Based on Query String Parameters](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) in the *Amazon CloudFront Developer Guide*. -- `query_string_cache_keys` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that contains information about the query string parameters that you want CloudFront to use for caching for this cache behavior. - - -### Nested Schema for `distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys` - -Read-Only: - -- `forward` (String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of cookies specified in the ``WhitelistedNames`` complex type. - Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the ``Forward`` element. -- `whitelisted_names` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Required if you specify ``whitelist`` for the value of ``Forward``. A complex type that specifies how many different cookies you want CloudFront to forward to the origin for this cache behavior and, if you want to forward selected cookies, the names of those cookies. - If you specify ``all`` or ``none`` for the value of ``Forward``, omit ``WhitelistedNames``. If you change the value of ``Forward`` from ``whitelist`` to ``all`` or ``none`` and you don't delete the ``WhitelistedNames`` element and its child elements, CloudFront deletes them automatically. - For the current limit on the number of cookie names that you can whitelist for each cache behavior, see [CloudFront Limits](https://docs.aws.amazon.com/general/latest/gr/xrefaws_service_limits.html#limits_cloudfront) in the *General Reference*. - - - - -### Nested Schema for `distribution_config.default_cache_behavior.function_associations` - -Read-Only: - -- `event_type` (String) The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function. -- `function_arn` (String) The Amazon Resource Name (ARN) of the function. - - - -### Nested Schema for `distribution_config.default_cache_behavior.lambda_function_associations` - -Read-Only: - -- `event_type` (String) Specifies the event type that triggers a Lambda@Edge function invocation. You can specify the following values: - + ``viewer-request``: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache. - + ``origin-request``: The function executes only when CloudFront sends a request to your origin. When the requested object is in the edge cache, the function doesn't execute. - + ``origin-response``: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute. - + ``viewer-response``: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache. - If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute. -- `include_body` (Boolean) A flag that allows a Lambda@Edge function to have read access to the body content. For more information, see [Accessing the Request Body by Choosing the Include Body Option](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) in the Amazon CloudFront Developer Guide. -- `lambda_function_arn` (String) The ARN of the Lambda@Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST. - - - - -### Nested Schema for `distribution_config.logging` - -Read-Only: - -- `bucket` (String) The Amazon S3 bucket to store the access logs in, for example, ``myawslogbucket.s3.amazonaws.com``. -- `include_cookies` (Boolean) Specifies whether you want CloudFront to include cookies in access logs, specify ``true`` for ``IncludeCookies``. If you choose to include cookies in logs, CloudFront logs all cookies regardless of how you configure the cache behaviors for this distribution. If you don't want to include cookies when you create a distribution or if you want to disable include cookies for an existing distribution, specify ``false`` for ``IncludeCookies``. -- `prefix` (String) An optional string that you want CloudFront to prefix to the access log ``filenames`` for this distribution, for example, ``myprefix/``. If you want to enable logging, but you don't want to specify a prefix, you still must include an empty ``Prefix`` element in the ``Logging`` element. - - - -### Nested Schema for `distribution_config.origin_groups` - -Read-Only: - -- `items` (Attributes List) The items (origin groups) in a distribution. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items)) -- `quantity` (Number) The number of origin groups. - - -### Nested Schema for `distribution_config.origin_groups.items` - -Read-Only: - -- `failover_criteria` (Attributes) A complex type that contains information about the failover criteria for an origin group. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--failover_criteria)) -- `id` (String) The origin group's ID. -- `members` (Attributes) A complex type that contains information about the origins in an origin group. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--members)) - - -### Nested Schema for `distribution_config.origin_groups.items.members` - -Read-Only: - -- `status_codes` (Attributes) The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--members--status_codes)) - - -### Nested Schema for `distribution_config.origin_groups.items.members.status_codes` - -Read-Only: - -- `items` (List of Number) The items (status codes) for an origin group. -- `quantity` (Number) The number of status codes. - - - - -### Nested Schema for `distribution_config.origin_groups.items.members` - -Read-Only: - -- `items` (Attributes List) Items (origins) in an origin group. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--members--items)) -- `quantity` (Number) The number of origins in an origin group. - - -### Nested Schema for `distribution_config.origin_groups.items.members.items` - -Read-Only: - -- `origin_id` (String) The ID for an origin in an origin group. - - - - - - -### Nested Schema for `distribution_config.origins` - -Read-Only: - -- `connection_attempts` (Number) The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don't specify otherwise) is 3. - For a custom origin (including an Amazon S3 bucket that's configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an [Origin Response Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout). - For more information, see [Origin Connection Attempts](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-attempts) in the *Amazon CloudFront Developer Guide*. -- `connection_timeout` (Number) The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don't specify otherwise) is 10 seconds. - For more information, see [Origin Connection Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-timeout) in the *Amazon CloudFront Developer Guide*. -- `custom_origin_config` (Attributes) Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the ``S3OriginConfig`` type instead. (see [below for nested schema](#nestedatt--distribution_config--origins--custom_origin_config)) -- `domain_name` (String) The domain name for the origin. - For more information, see [Origin Domain Name](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName) in the *Amazon CloudFront Developer Guide*. -- `id` (String) A unique identifier for the origin. This value must be unique within the distribution. - Use this value to specify the ``TargetOriginId`` in a ``CacheBehavior`` or ``DefaultCacheBehavior``. -- `origin_access_control_id` (String) The unique identifier of an origin access control for this origin. - For more information, see [Restricting access to an Amazon S3 origin](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) in the *Amazon CloudFront Developer Guide*. -- `origin_custom_headers` (Attributes List) A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin. - For more information, see [Adding Custom Headers to Origin Requests](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/add-origin-custom-headers.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--origins--origin_custom_headers)) -- `origin_path` (String) An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. - For more information, see [Origin Path](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginPath) in the *Amazon CloudFront Developer Guide*. -- `origin_shield` (Attributes) CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin. - For more information, see [Using Origin Shield](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--origins--origin_shield)) -- `s3_origin_config` (Attributes) Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the ``CustomOriginConfig`` type instead. (see [below for nested schema](#nestedatt--distribution_config--origins--s3_origin_config)) - - -### Nested Schema for `distribution_config.origins.custom_origin_config` - -Read-Only: - -- `http_port` (Number) The HTTP port that CloudFront uses to connect to the origin. Specify the HTTP port that the origin listens on. -- `https_port` (Number) The HTTPS port that CloudFront uses to connect to the origin. Specify the HTTPS port that the origin listens on. -- `origin_keepalive_timeout` (Number) Specifies how long, in seconds, CloudFront persists its connection to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 5 seconds. - For more information, see [Origin Keep-alive Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout) in the *Amazon CloudFront Developer Guide*. -- `origin_protocol_policy` (String) Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin. Valid values are: - + ``http-only`` ? CloudFront always uses HTTP to connect to the origin. - + ``match-viewer`` ? CloudFront connects to the origin using the same protocol that the viewer used to connect to CloudFront. - + ``https-only`` ? CloudFront always uses HTTPS to connect to the origin. -- `origin_read_timeout` (Number) Specifies how long, in seconds, CloudFront waits for a response from the origin. This is also known as the *origin response timeout*. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds. - For more information, see [Origin Response Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout) in the *Amazon CloudFront Developer Guide*. -- `origin_ssl_protocols` (List of String) Specifies the minimum SSL/TLS protocol that CloudFront uses when connecting to your origin over HTTPS. Valid values include ``SSLv3``, ``TLSv1``, ``TLSv1.1``, and ``TLSv1.2``. - For more information, see [Minimum Origin SSL Protocol](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginSSLProtocols) in the *Amazon CloudFront Developer Guide*. - - - -### Nested Schema for `distribution_config.origins.origin_custom_headers` - -Read-Only: - -- `header_name` (String) The name of a header that you want CloudFront to send to your origin. For more information, see [Adding Custom Headers to Origin Requests](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) in the *Amazon CloudFront Developer Guide*. -- `header_value` (String) The value for the header that you specified in the ``HeaderName`` field. - - - -### Nested Schema for `distribution_config.origins.origin_shield` - -Read-Only: - -- `enabled` (Boolean) A flag that specifies whether Origin Shield is enabled. - When it's enabled, CloudFront routes all requests through Origin Shield, which can help protect your origin. When it's disabled, CloudFront might send requests directly to your origin from multiple edge locations or regional edge caches. -- `origin_shield_region` (String) The AWS-Region for Origin Shield. - Specify the AWS-Region that has the lowest latency to your origin. To specify a region, use the region code, not the region name. For example, specify the US East (Ohio) region as ``us-east-2``. - When you enable CloudFront Origin Shield, you must specify the AWS-Region for Origin Shield. For the list of AWS-Regions that you can specify, and for help choosing the best Region for your origin, see [Choosing the for Origin Shield](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html#choose-origin-shield-region) in the *Amazon CloudFront Developer Guide*. - - - -### Nested Schema for `distribution_config.origins.s3_origin_config` - -Read-Only: - -- `origin_access_identity` (String) The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can *only* access objects in an Amazon S3 bucket through CloudFront. The format of the value is: - origin-access-identity/cloudfront/*ID-of-origin-access-identity* - where ``ID-of-origin-access-identity`` is the value that CloudFront returned in the ``ID`` element when you created the origin access identity. - If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty ``OriginAccessIdentity`` element. - To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty ``OriginAccessIdentity`` element. - To replace the origin access identity, update the distribution configuration and specify the new origin access identity. - For more information about the origin access identity, see [Serving Private Content through CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. - - - - -### Nested Schema for `distribution_config.restrictions` - -Read-Only: - -- `geo_restriction` (Attributes) A complex type that controls the countries in which your content is distributed. CF determines the location of your users using ``MaxMind`` GeoIP databases. To disable geo restriction, remove the [Restrictions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions) property from your stack template. (see [below for nested schema](#nestedatt--distribution_config--restrictions--geo_restriction)) - - -### Nested Schema for `distribution_config.restrictions.geo_restriction` - -Read-Only: - -- `locations` (List of String) A complex type that contains a ``Location`` element for each country in which you want CloudFront either to distribute your content (``whitelist``) or not distribute your content (``blacklist``). - The ``Location`` element is a two-letter, uppercase country code for a country that you want to include in your ``blacklist`` or ``whitelist``. Include one ``Location`` element for each country. - CloudFront and ``MaxMind`` both use ``ISO 3166`` country codes. For the current list of countries and the corresponding codes, see ``ISO 3166-1-alpha-2`` code on the *International Organization for Standardization* website. You can also refer to the country list on the CloudFront console, which includes both country names and codes. -- `restriction_type` (String) The method that you want to use to restrict distribution of your content by country: - + ``none``: No geo restriction is enabled, meaning access to content is not restricted by client geo location. - + ``blacklist``: The ``Location`` elements specify the countries in which you don't want CloudFront to distribute your content. - + ``whitelist``: The ``Location`` elements specify the countries in which you want CloudFront to distribute your content. - - - - -### Nested Schema for `distribution_config.s3_origin` - -Read-Only: - -- `dns_name` (String) -- `origin_access_identity` (String) - - - -### Nested Schema for `distribution_config.viewer_certificate` - -Read-Only: - -- `acm_certificate_arn` (String) In CloudFormation, this field name is ``AcmCertificateArn``. Note the different capitalization. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs) and the SSL/TLS certificate is stored in [(ACM)](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html), provide the Amazon Resource Name (ARN) of the ACM certificate. CloudFront only supports ACM certificates in the US East (N. Virginia) Region (``us-east-1``). - If you specify an ACM certificate ARN, you must also specify values for ``MinimumProtocolVersion`` and ``SSLSupportMethod``. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.) -- `cloudfront_default_certificate` (Boolean) If the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net``, set this field to ``true``. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), omit this field and specify values for the following fields: - + ``AcmCertificateArn`` or ``IamCertificateId`` (specify a value for one, not both) - + ``MinimumProtocolVersion`` - + ``SslSupportMethod`` -- `iam_certificate_id` (String) In CloudFormation, this field name is ``IamCertificateId``. Note the different capitalization. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs) and the SSL/TLS certificate is stored in [(IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html), provide the ID of the IAM certificate. - If you specify an IAM certificate ID, you must also specify values for ``MinimumProtocolVersion`` and ``SSLSupportMethod``. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.) -- `minimum_protocol_version` (String) If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), specify the security policy that you want CloudFront to use for HTTPS connections with viewers. The security policy determines two settings: - + The minimum SSL/TLS protocol that CloudFront can use to communicate with viewers. - + The ciphers that CloudFront can use to encrypt the content that it returns to viewers. - - For more information, see [Security Policy](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy) and [Supported Protocols and Ciphers Between Viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) in the *Amazon CloudFront Developer Guide*. - On the CloudFront console, this setting is called *Security Policy*. - When you're using SNI only (you set ``SSLSupportMethod`` to ``sni-only``), you must specify ``TLSv1`` or higher. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.) - If the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net`` (you set ``CloudFrontDefaultCertificate`` to ``true``), CloudFront automatically sets the security policy to ``TLSv1`` regardless of the value that you set here. -- `ssl_support_method` (String) In CloudFormation, this field name is ``SslSupportMethod``. Note the different capitalization. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), specify which viewers the distribution accepts HTTPS connections from. - + ``sni-only`` ? The distribution accepts HTTPS connections from only viewers that support [server name indication (SNI)](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Server_Name_Indication). This is recommended. Most browsers and clients support SNI. - + ``vip`` ? The distribution accepts HTTPS connections from all viewers including those that don't support SNI. This is not recommended, and results in additional monthly charges from CloudFront. - + ``static-ip`` - Do not specify this value unless your distribution has been enabled for this feature by the CloudFront team. If you have a use case that requires static IP addresses for a distribution, contact CloudFront through the [Center](https://docs.aws.amazon.com/support/home). - - If the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net``, don't set a value for this field. - - - - -### Nested Schema for `tags` - -Read-Only: - -- `key` (String) A string that contains ``Tag`` key. - The string length should be between 1 and 128 characters. Valid characters include ``a-z``, ``A-Z``, ``0-9``, space, and the special characters ``_ - . : / = + @``. -- `value` (String) A string that contains an optional ``Tag`` value. - The string length should be between 0 and 256 characters. Valid characters include ``a-z``, ``A-Z``, ``0-9``, space, and the special characters ``_ - . : / = + @``. diff --git a/docs/data-sources/cloudfront_key_group.md b/docs/data-sources/cloudfront_key_group.md index eec02ad30..dc7a72f34 100644 --- a/docs/data-sources/cloudfront_key_group.md +++ b/docs/data-sources/cloudfront_key_group.md @@ -22,6 +22,7 @@ Data Source schema for AWS::CloudFront::KeyGroup ### Read-Only - `key_group_config` (Attributes) (see [below for nested schema](#nestedatt--key_group_config)) +- `key_group_id` (String) - `last_modified_time` (String) diff --git a/docs/data-sources/cloudfront_key_value_store.md b/docs/data-sources/cloudfront_key_value_store.md new file mode 100644 index 000000000..55dfda6de --- /dev/null +++ b/docs/data-sources/cloudfront_key_value_store.md @@ -0,0 +1,37 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_cloudfront_key_value_store Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::CloudFront::KeyValueStore +--- + +# awscc_cloudfront_key_value_store (Data Source) + +Data Source schema for AWS::CloudFront::KeyValueStore + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `comment` (String) +- `import_source` (Attributes) (see [below for nested schema](#nestedatt--import_source)) +- `key_value_store_id` (String) +- `name` (String) +- `status` (String) + + +### Nested Schema for `import_source` + +Read-Only: + +- `source_arn` (String) +- `source_type` (String) diff --git a/docs/data-sources/cloudfront_key_value_stores.md b/docs/data-sources/cloudfront_key_value_stores.md new file mode 100644 index 000000000..1cd0d9a11 --- /dev/null +++ b/docs/data-sources/cloudfront_key_value_stores.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_cloudfront_key_value_stores Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::CloudFront::KeyValueStore +--- + +# awscc_cloudfront_key_value_stores (Data Source) + +Plural Data Source schema for AWS::CloudFront::KeyValueStore + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/cloudfront_origin_access_control.md b/docs/data-sources/cloudfront_origin_access_control.md index a1ec18d88..e11c739c1 100644 --- a/docs/data-sources/cloudfront_origin_access_control.md +++ b/docs/data-sources/cloudfront_origin_access_control.md @@ -22,6 +22,7 @@ Data Source schema for AWS::CloudFront::OriginAccessControl ### Read-Only - `origin_access_control_config` (Attributes) (see [below for nested schema](#nestedatt--origin_access_control_config)) +- `origin_access_control_id` (String) ### Nested Schema for `origin_access_control_config` diff --git a/docs/data-sources/cloudfront_origin_request_policy.md b/docs/data-sources/cloudfront_origin_request_policy.md index 94c53f031..6bd29f9ce 100644 --- a/docs/data-sources/cloudfront_origin_request_policy.md +++ b/docs/data-sources/cloudfront_origin_request_policy.md @@ -23,6 +23,7 @@ Data Source schema for AWS::CloudFront::OriginRequestPolicy - `last_modified_time` (String) - `origin_request_policy_config` (Attributes) (see [below for nested schema](#nestedatt--origin_request_policy_config)) +- `origin_request_policy_id` (String) ### Nested Schema for `origin_request_policy_config` diff --git a/docs/data-sources/cloudfront_public_key.md b/docs/data-sources/cloudfront_public_key.md index 74d635c15..b7a2f7db5 100644 --- a/docs/data-sources/cloudfront_public_key.md +++ b/docs/data-sources/cloudfront_public_key.md @@ -23,6 +23,7 @@ Data Source schema for AWS::CloudFront::PublicKey - `created_time` (String) - `public_key_config` (Attributes) (see [below for nested schema](#nestedatt--public_key_config)) +- `public_key_id` (String) ### Nested Schema for `public_key_config` diff --git a/docs/data-sources/cloudfront_response_headers_policy.md b/docs/data-sources/cloudfront_response_headers_policy.md index 06ab805d2..abca01e80 100644 --- a/docs/data-sources/cloudfront_response_headers_policy.md +++ b/docs/data-sources/cloudfront_response_headers_policy.md @@ -23,6 +23,7 @@ Data Source schema for AWS::CloudFront::ResponseHeadersPolicy - `last_modified_time` (String) - `response_headers_policy_config` (Attributes) (see [below for nested schema](#nestedatt--response_headers_policy_config)) +- `response_headers_policy_id` (String) ### Nested Schema for `response_headers_policy_config` diff --git a/docs/data-sources/cognito_identity_pool.md b/docs/data-sources/cognito_identity_pool.md index 9403a8b2e..7a79d6535 100644 --- a/docs/data-sources/cognito_identity_pool.md +++ b/docs/data-sources/cognito_identity_pool.md @@ -27,6 +27,7 @@ Data Source schema for AWS::Cognito::IdentityPool - `cognito_identity_providers` (Attributes List) (see [below for nested schema](#nestedatt--cognito_identity_providers)) - `cognito_streams` (Attributes) (see [below for nested schema](#nestedatt--cognito_streams)) - `developer_provider_name` (String) +- `identity_pool_id` (String) - `identity_pool_name` (String) - `name` (String) - `open_id_connect_provider_ar_ns` (List of String) diff --git a/docs/data-sources/cognito_log_delivery_configuration.md b/docs/data-sources/cognito_log_delivery_configuration.md index e2902ebd5..2b14ed5f4 100644 --- a/docs/data-sources/cognito_log_delivery_configuration.md +++ b/docs/data-sources/cognito_log_delivery_configuration.md @@ -22,6 +22,7 @@ Data Source schema for AWS::Cognito::LogDeliveryConfiguration ### Read-Only - `log_configurations` (Attributes List) (see [below for nested schema](#nestedatt--log_configurations)) +- `log_delivery_configuration_id` (String) - `user_pool_id` (String) diff --git a/docs/data-sources/connect_instance.md b/docs/data-sources/connect_instance.md new file mode 100644 index 000000000..4a8ab08e0 --- /dev/null +++ b/docs/data-sources/connect_instance.md @@ -0,0 +1,55 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_connect_instance Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::Connect::Instance +--- + +# awscc_connect_instance (Data Source) + +Data Source schema for AWS::Connect::Instance + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) An instanceArn is automatically generated on creation based on instanceId. +- `attributes` (Attributes) The attributes for the instance. (see [below for nested schema](#nestedatt--attributes)) +- `created_time` (String) Timestamp of instance creation logged as part of instance creation. +- `directory_id` (String) Existing directoryId user wants to map to the new Connect instance. +- `identity_management_type` (String) Specifies the type of directory integration for new instance. +- `instance_alias` (String) Alias of the new directory created as part of new instance creation. +- `instance_id` (String) An instanceId is automatically generated on creation and assigned as the unique identifier. +- `instance_status` (String) Specifies the creation status of new instance. +- `service_role` (String) Service linked role created as part of instance creation. +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `attributes` + +Read-Only: + +- `auto_resolve_best_voices` (Boolean) Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance. +- `contact_lens` (Boolean) Boolean flag which enables CONTACT_LENS on an instance. +- `contactflow_logs` (Boolean) Boolean flag which enables CONTACTFLOW_LOGS on an instance. +- `early_media` (Boolean) Boolean flag which enables EARLY_MEDIA on an instance. +- `inbound_calls` (Boolean) Mandatory element which enables inbound calls on new instance. +- `outbound_calls` (Boolean) Mandatory element which enables outbound calls on new instance. +- `use_custom_tts_voices` (Boolean) Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance. + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/connect_instances.md b/docs/data-sources/connect_instances.md new file mode 100644 index 000000000..d2ec6ed88 --- /dev/null +++ b/docs/data-sources/connect_instances.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_connect_instances Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::Connect::Instance +--- + +# awscc_connect_instances (Data Source) + +Plural Data Source schema for AWS::Connect::Instance + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/datazone_data_source.md b/docs/data-sources/datazone_data_source.md index 1840a1932..32ad8589d 100644 --- a/docs/data-sources/datazone_data_source.md +++ b/docs/data-sources/datazone_data_source.md @@ -24,6 +24,7 @@ Data Source schema for AWS::DataZone::DataSource - `asset_forms_input` (Attributes List) The metadata forms that are to be attached to the assets that this data source works with. (see [below for nested schema](#nestedatt--asset_forms_input)) - `configuration` (Attributes) Configuration of the data source. It can be set to either glueRunConfiguration or redshiftRunConfiguration. (see [below for nested schema](#nestedatt--configuration)) - `created_at` (String) The timestamp of when the data source was created. +- `data_source_id` (String) The unique identifier of the data source. - `description` (String) The description of the data source. - `domain_id` (String) The ID of the Amazon DataZone domain where the data source is created. - `domain_identifier` (String) The ID of the Amazon DataZone domain where the data source is created. diff --git a/docs/data-sources/datazone_domain.md b/docs/data-sources/datazone_domain.md index e20cce5ff..dad676103 100644 --- a/docs/data-sources/datazone_domain.md +++ b/docs/data-sources/datazone_domain.md @@ -25,6 +25,7 @@ Data Source schema for AWS::DataZone::Domain - `created_at` (String) The timestamp of when the Amazon DataZone domain was last updated. - `description` (String) The description of the Amazon DataZone domain. - `domain_execution_role` (String) The domain execution role that is created when an Amazon DataZone domain is created. The domain execution role is created in the AWS account that houses the Amazon DataZone domain. +- `domain_id` (String) The id of the Amazon DataZone domain. - `kms_key_identifier` (String) The identifier of the AWS Key Management Service (KMS) key that is used to encrypt the Amazon DataZone domain, metadata, and reporting data. - `last_updated_at` (String) The timestamp of when the Amazon DataZone domain was last updated. - `managed_account_id` (String) The identifier of the AWS account that manages the domain. diff --git a/docs/data-sources/datazone_environment_profile.md b/docs/data-sources/datazone_environment_profile.md index 2b9cc58a0..5bc3ba320 100644 --- a/docs/data-sources/datazone_environment_profile.md +++ b/docs/data-sources/datazone_environment_profile.md @@ -30,6 +30,7 @@ Data Source schema for AWS::DataZone::EnvironmentProfile - `domain_identifier` (String) The ID of the Amazon DataZone domain in which this environment profile is created. - `environment_blueprint_id` (String) The ID of the blueprint with which this environment profile is created. - `environment_blueprint_identifier` (String) The ID of the blueprint with which this environment profile is created. +- `environment_profile_id` (String) The ID of this Amazon DataZone environment profile. - `name` (String) The name of this Amazon DataZone environment profile. - `project_id` (String) The identifier of the project in which to create the environment profile. - `project_identifier` (String) The identifier of the project in which to create the environment profile. diff --git a/docs/data-sources/datazone_project.md b/docs/data-sources/datazone_project.md index 75bff7868..656854dc8 100644 --- a/docs/data-sources/datazone_project.md +++ b/docs/data-sources/datazone_project.md @@ -29,3 +29,4 @@ Data Source schema for AWS::DataZone::Project - `glossary_terms` (List of String) The glossary terms that can be used in this Amazon DataZone project. - `last_updated_at` (String) The timestamp of when the project was last updated. - `name` (String) The name of the Amazon DataZone project. +- `project_id` (String) The ID of the Amazon DataZone project. diff --git a/docs/data-sources/devopsguru_notification_channel.md b/docs/data-sources/devopsguru_notification_channel.md index 6545dd249..531bea0f4 100644 --- a/docs/data-sources/devopsguru_notification_channel.md +++ b/docs/data-sources/devopsguru_notification_channel.md @@ -22,6 +22,7 @@ Data Source schema for AWS::DevOpsGuru::NotificationChannel ### Read-Only - `config` (Attributes) Information about notification channels you have configured with DevOps Guru. (see [below for nested schema](#nestedatt--config)) +- `notification_channel_id` (String) The ID of a notification channel. ### Nested Schema for `config` diff --git a/docs/data-sources/ec2_capacity_reservation.md b/docs/data-sources/ec2_capacity_reservation.md index a52ae620d..2053d5556 100644 --- a/docs/data-sources/ec2_capacity_reservation.md +++ b/docs/data-sources/ec2_capacity_reservation.md @@ -23,6 +23,7 @@ Data Source schema for AWS::EC2::CapacityReservation - `availability_zone` (String) - `available_instance_count` (Number) +- `capacity_reservation_id` (String) - `ebs_optimized` (Boolean) - `end_date` (String) - `end_date_type` (String) diff --git a/docs/data-sources/ec2_egress_only_internet_gateway.md b/docs/data-sources/ec2_egress_only_internet_gateway.md index fb5cc7f02..662a9d200 100644 --- a/docs/data-sources/ec2_egress_only_internet_gateway.md +++ b/docs/data-sources/ec2_egress_only_internet_gateway.md @@ -21,4 +21,5 @@ Data Source schema for AWS::EC2::EgressOnlyInternetGateway ### Read-Only +- `egress_only_internet_gateway_id` (String) Service Generated ID of the EgressOnlyInternetGateway - `vpc_id` (String) The ID of the VPC for which to create the egress-only internet gateway. diff --git a/docs/data-sources/ec2_eip_association.md b/docs/data-sources/ec2_eip_association.md index 655fb8541..9f417e411 100644 --- a/docs/data-sources/ec2_eip_association.md +++ b/docs/data-sources/ec2_eip_association.md @@ -23,6 +23,7 @@ Data Source schema for AWS::EC2::EIPAssociation - `allocation_id` (String) The allocation ID. This is required for EC2-VPC. - `eip` (String) The Elastic IP address to associate with the instance. +- `eip_association_id` (String) Composite ID of non-empty properties, to determine the identification. - `instance_id` (String) The ID of the instance. - `network_interface_id` (String) The ID of the network interface. - `private_ip_address` (String) The primary or secondary private IP address to associate with the Elastic IP address. diff --git a/docs/data-sources/ec2_flow_log.md b/docs/data-sources/ec2_flow_log.md index a71f33967..4352a7294 100644 --- a/docs/data-sources/ec2_flow_log.md +++ b/docs/data-sources/ec2_flow_log.md @@ -24,6 +24,7 @@ Data Source schema for AWS::EC2::FlowLog - `deliver_cross_account_role` (String) The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. - `deliver_logs_permission_arn` (String) The ARN for the IAM role that permits Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your account. If you specify LogDestinationType as s3 or kinesis-data-firehose, do not specify DeliverLogsPermissionArn or LogGroupName. - `destination_options` (Attributes) (see [below for nested schema](#nestedatt--destination_options)) +- `flow_log_id` (String) The Flow Log ID - `log_destination` (String) Specifies the destination to which the flow log data is to be published. Flow log data can be published to a CloudWatch Logs log group, an Amazon S3 bucket, or a Kinesis Firehose stream. The value specified for this parameter depends on the value specified for LogDestinationType. - `log_destination_type` (String) Specifies the type of destination to which the flow log data is to be published. Flow log data can be published to CloudWatch Logs or Amazon S3. - `log_format` (String) The fields to include in the flow log record, in the order in which they should appear. diff --git a/docs/data-sources/ec2_network_acl.md b/docs/data-sources/ec2_network_acl.md index 1b8960970..b4d150bf7 100644 --- a/docs/data-sources/ec2_network_acl.md +++ b/docs/data-sources/ec2_network_acl.md @@ -21,6 +21,7 @@ Data Source schema for AWS::EC2::NetworkAcl ### Read-Only +- `network_acl_id` (String) - `tags` (Attributes List) The tags for the network ACL. (see [below for nested schema](#nestedatt--tags)) - `vpc_id` (String) The ID of the VPC for the network ACL. diff --git a/docs/data-sources/ec2_network_interface.md b/docs/data-sources/ec2_network_interface.md index 730d19b51..95dabac09 100644 --- a/docs/data-sources/ec2_network_interface.md +++ b/docs/data-sources/ec2_network_interface.md @@ -32,6 +32,7 @@ Data Source schema for AWS::EC2::NetworkInterface - `ipv_6_addresses` (Attributes Set) One or more specific IPv6 addresses from the IPv6 CIDR block range of your subnet to associate with the network interface. If you're specifying a number of IPv6 addresses, use the Ipv6AddressCount property and don't specify this property. (see [below for nested schema](#nestedatt--ipv_6_addresses)) - `ipv_6_prefix_count` (Number) The number of IPv6 prefixes to assign to a network interface. When you specify a number of IPv6 prefixes, Amazon EC2 selects these prefixes from your existing subnet CIDR reservations, if available, or from free spaces in the subnet. By default, these will be /80 prefixes. You can't specify a count of IPv6 prefixes if you've specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses. - `ipv_6_prefixes` (Attributes List) Assigns a list of IPv6 prefixes to the network interface. If you want EC2 to automatically assign IPv6 prefixes, use the Ipv6PrefixCount property and do not specify this property. Presently, only /80 prefixes are supported. You can't specify IPv6 prefixes if you've specified one of the following: a count of IPv6 prefixes, specific IPv6 addresses, or a count of IPv6 addresses. (see [below for nested schema](#nestedatt--ipv_6_prefixes)) +- `network_interface_id` (String) Network interface id. - `primary_ipv_6_address` (String) The primary IPv6 address - `primary_private_ip_address` (String) Returns the primary private IP address of the network interface. - `private_ip_address` (String) Assigns a single private IP address to the network interface, which is used as the primary private IP address. If you want to specify multiple private IP address, use the PrivateIpAddresses property. diff --git a/docs/data-sources/ec2_security_group.md b/docs/data-sources/ec2_security_group.md index 30ad83684..d0d143364 100644 --- a/docs/data-sources/ec2_security_group.md +++ b/docs/data-sources/ec2_security_group.md @@ -25,6 +25,7 @@ Data Source schema for AWS::EC2::SecurityGroup - `group_id` (String) The group ID of the specified security group. - `group_name` (String) The name of the security group. - `security_group_egress` (Attributes List) [VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group. (see [below for nested schema](#nestedatt--security_group_egress)) +- `security_group_id` (String) The group name or group ID depending on whether the SG is created in default or specific VPC - `security_group_ingress` (Attributes List) The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group. (see [below for nested schema](#nestedatt--security_group_ingress)) - `tags` (Attributes List) Any tags assigned to the security group. (see [below for nested schema](#nestedatt--tags)) - `vpc_id` (String) The ID of the VPC for the security group. diff --git a/docs/data-sources/ec2_security_group_egress.md b/docs/data-sources/ec2_security_group_egress.md index 237ee5e51..fc9c8450d 100644 --- a/docs/data-sources/ec2_security_group_egress.md +++ b/docs/data-sources/ec2_security_group_egress.md @@ -37,4 +37,5 @@ Data Source schema for AWS::EC2::SecurityGroupEgress - `group_id` (String) The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID. - `ip_protocol` (String) The IP protocol name (``tcp``, ``udp``, ``icmp``, ``icmpv6``) or number (see [Protocol Numbers](https://docs.aws.amazon.com/http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). Use ``-1`` to specify all protocols. When authorizing security group rules, specifying ``-1`` or a protocol number other than ``tcp``, ``udp``, ``icmp``, or ``icmpv6`` allows traffic on all ports, regardless of any port range you specify. For ``tcp``, ``udp``, and ``icmp``, you must specify a port range. For ``icmpv6``, the port range is optional; if you omit the port range, traffic for all types and codes is allowed. +- `security_group_egress_id` (String) - `to_port` (Number) If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes). diff --git a/docs/data-sources/ec2_security_group_ingress.md b/docs/data-sources/ec2_security_group_ingress.md index 486cd27da..bc8cda790 100644 --- a/docs/data-sources/ec2_security_group_ingress.md +++ b/docs/data-sources/ec2_security_group_ingress.md @@ -34,6 +34,7 @@ You must specify the GroupName property or the GroupId property. For security gr - `ip_protocol` (String) The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers). [VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or icmpv6 allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed. +- `security_group_ingress_id` (String) The Security Group Rule Id - `source_prefix_list_id` (String) [EC2-VPC only] The ID of a prefix list. - `source_security_group_id` (String) The ID of the security group. You must specify either the security group ID or the security group name. For security groups in a nondefault VPC, you must specify the security group ID. - `source_security_group_name` (String) [EC2-Classic, default VPC] The name of the source security group. diff --git a/docs/data-sources/ec2_spot_fleet.md b/docs/data-sources/ec2_spot_fleet.md index f7fc1736c..4ce93d90d 100644 --- a/docs/data-sources/ec2_spot_fleet.md +++ b/docs/data-sources/ec2_spot_fleet.md @@ -21,6 +21,7 @@ Data Source schema for AWS::EC2::SpotFleet ### Read-Only +- `spot_fleet_id` (String) - `spot_fleet_request_config_data` (Attributes) (see [below for nested schema](#nestedatt--spot_fleet_request_config_data)) diff --git a/docs/data-sources/ec2_subnet_cidr_block.md b/docs/data-sources/ec2_subnet_cidr_block.md index a5460c5d1..79ba4592c 100644 --- a/docs/data-sources/ec2_subnet_cidr_block.md +++ b/docs/data-sources/ec2_subnet_cidr_block.md @@ -24,4 +24,5 @@ Data Source schema for AWS::EC2::SubnetCidrBlock - `ipv_6_cidr_block` (String) The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length - `ipv_6_ipam_pool_id` (String) The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR - `ipv_6_netmask_length` (Number) The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool +- `subnet_cidr_block_id` (String) Information about the IPv6 association. - `subnet_id` (String) The ID of the subnet diff --git a/docs/data-sources/ec2_subnet_route_table_association.md b/docs/data-sources/ec2_subnet_route_table_association.md index 8fd464686..a08273635 100644 --- a/docs/data-sources/ec2_subnet_route_table_association.md +++ b/docs/data-sources/ec2_subnet_route_table_association.md @@ -24,3 +24,4 @@ Data Source schema for AWS::EC2::SubnetRouteTableAssociation - `route_table_id` (String) The ID of the route table. The physical ID changes when the route table ID is changed. - `subnet_id` (String) The ID of the subnet. +- `subnet_route_table_association_id` (String) diff --git a/docs/data-sources/ec2_transit_gateway.md b/docs/data-sources/ec2_transit_gateway.md index 03438058c..b3a065160 100644 --- a/docs/data-sources/ec2_transit_gateway.md +++ b/docs/data-sources/ec2_transit_gateway.md @@ -33,6 +33,7 @@ Data Source schema for AWS::EC2::TransitGateway - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) - `transit_gateway_arn` (String) - `transit_gateway_cidr_blocks` (List of String) +- `transit_gateway_id` (String) - `vpn_ecmp_support` (String) diff --git a/docs/data-sources/ec2_transit_gateway_attachment.md b/docs/data-sources/ec2_transit_gateway_attachment.md index cb3542d02..a0c91698e 100644 --- a/docs/data-sources/ec2_transit_gateway_attachment.md +++ b/docs/data-sources/ec2_transit_gateway_attachment.md @@ -24,6 +24,7 @@ Data Source schema for AWS::EC2::TransitGatewayAttachment - `options` (Attributes) The options for the transit gateway vpc attachment. (see [below for nested schema](#nestedatt--options)) - `subnet_ids` (List of String) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `transit_gateway_attachment_id` (String) - `transit_gateway_id` (String) - `vpc_id` (String) diff --git a/docs/data-sources/ec2_transit_gateway_vpc_attachment.md b/docs/data-sources/ec2_transit_gateway_vpc_attachment.md index 2bae737b1..c44f29562 100644 --- a/docs/data-sources/ec2_transit_gateway_vpc_attachment.md +++ b/docs/data-sources/ec2_transit_gateway_vpc_attachment.md @@ -27,6 +27,7 @@ Data Source schema for AWS::EC2::TransitGatewayVpcAttachment - `subnet_ids` (List of String) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) - `transit_gateway_id` (String) +- `transit_gateway_vpc_attachment_id` (String) - `vpc_id` (String) diff --git a/docs/data-sources/ec2_vpc_cidr_block.md b/docs/data-sources/ec2_vpc_cidr_block.md index beb508a79..5393f6c2e 100644 --- a/docs/data-sources/ec2_vpc_cidr_block.md +++ b/docs/data-sources/ec2_vpc_cidr_block.md @@ -29,4 +29,5 @@ Data Source schema for AWS::EC2::VPCCidrBlock - `ipv_6_ipam_pool_id` (String) The ID of the IPv6 IPAM pool to Associate a CIDR from to a VPC. - `ipv_6_netmask_length` (Number) The netmask length of the IPv6 CIDR you would like to associate from an Amazon VPC IP Address Manager (IPAM) pool. - `ipv_6_pool` (String) The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block. +- `vpc_cidr_block_id` (String) The Id of the VPC associated CIDR Block. - `vpc_id` (String) The ID of the VPC. diff --git a/docs/data-sources/ec2_vpc_endpoint.md b/docs/data-sources/ec2_vpc_endpoint.md index ae9459dbc..f81074d67 100644 --- a/docs/data-sources/ec2_vpc_endpoint.md +++ b/docs/data-sources/ec2_vpc_endpoint.md @@ -34,6 +34,7 @@ Data Source schema for AWS::EC2::VPCEndpoint - `security_group_ids` (Set of String) The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints. - `service_name` (String) The name of the endpoint service. - `subnet_ids` (Set of String) The IDs of the subnets in which to create endpoint network interfaces. You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet. +- `vpc_endpoint_id` (String) - `vpc_endpoint_type` (String) The type of endpoint. Default: Gateway - `vpc_id` (String) The ID of the VPC. diff --git a/docs/data-sources/ec2_vpc_peering_connection.md b/docs/data-sources/ec2_vpc_peering_connection.md index ae129e3f6..86980fa55 100644 --- a/docs/data-sources/ec2_vpc_peering_connection.md +++ b/docs/data-sources/ec2_vpc_peering_connection.md @@ -27,6 +27,7 @@ Data Source schema for AWS::EC2::VPCPeeringConnection - `peer_vpc_id` (String) The ID of the VPC with which you are creating the VPC peering connection. You must specify this parameter in the request. - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) - `vpc_id` (String) The ID of the VPC. +- `vpc_peering_connection_id` (String) ### Nested Schema for `tags` diff --git a/docs/data-sources/ec2_vpcdhcp_options_association.md b/docs/data-sources/ec2_vpcdhcp_options_association.md new file mode 100644 index 000000000..123937692 --- /dev/null +++ b/docs/data-sources/ec2_vpcdhcp_options_association.md @@ -0,0 +1,25 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ec2_vpcdhcp_options_association Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::EC2::VPCDHCPOptionsAssociation +--- + +# awscc_ec2_vpcdhcp_options_association (Data Source) + +Data Source schema for AWS::EC2::VPCDHCPOptionsAssociation + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `dhcp_options_id` (String) The ID of the DHCP options set, or default to associate no DHCP options with the VPC. +- `vpc_id` (String) The ID of the VPC. diff --git a/docs/data-sources/ec2_vpcdhcp_options_associations.md b/docs/data-sources/ec2_vpcdhcp_options_associations.md new file mode 100644 index 000000000..f17983fea --- /dev/null +++ b/docs/data-sources/ec2_vpcdhcp_options_associations.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ec2_vpcdhcp_options_associations Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::EC2::VPCDHCPOptionsAssociation +--- + +# awscc_ec2_vpcdhcp_options_associations (Data Source) + +Plural Data Source schema for AWS::EC2::VPCDHCPOptionsAssociation + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/ecs_task_set.md b/docs/data-sources/ecs_task_set.md index 70afabb4a..6cf766c6b 100644 --- a/docs/data-sources/ecs_task_set.md +++ b/docs/data-sources/ecs_task_set.md @@ -32,6 +32,7 @@ Data Source schema for AWS::ECS::TaskSet - `service_registries` (Attributes List) The details of the service discovery registries to assign to this task set. For more information, see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html. (see [below for nested schema](#nestedatt--service_registries)) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) - `task_definition` (String) The short name or full Amazon Resource Name (ARN) of the task definition for the tasks in the task set to use. +- `task_set_id` (String) The ID of the task set. ### Nested Schema for `load_balancers` diff --git a/docs/data-sources/efs_mount_target.md b/docs/data-sources/efs_mount_target.md index e746527bc..c8f2c4f7a 100644 --- a/docs/data-sources/efs_mount_target.md +++ b/docs/data-sources/efs_mount_target.md @@ -23,5 +23,6 @@ Data Source schema for AWS::EFS::MountTarget - `file_system_id` (String) The ID of the file system for which to create the mount target. - `ip_address` (String) Valid IPv4 address within the address range of the specified subnet. +- `mount_target_id` (String) - `security_groups` (Set of String) Up to five VPC security group IDs, of the form ``sg-xxxxxxxx``. These must be for the same VPC as subnet specified. - `subnet_id` (String) The ID of the subnet to add the mount target in. For One Zone file systems, use the subnet that is associated with the file system's Availability Zone. diff --git a/docs/data-sources/eks_cluster.md b/docs/data-sources/eks_cluster.md index 783822b82..a26285e2f 100644 --- a/docs/data-sources/eks_cluster.md +++ b/docs/data-sources/eks_cluster.md @@ -21,8 +21,10 @@ Data Source schema for AWS::EKS::Cluster ### Read-Only +- `access_config` (Attributes) An object representing the Access Config to use for the cluster. (see [below for nested schema](#nestedatt--access_config)) - `arn` (String) The ARN of the cluster, such as arn:aws:eks:us-west-2:666666666666:cluster/prod. - `certificate_authority_data` (String) The certificate-authority-data for your cluster. +- `cluster_id` (String) The unique ID given to your cluster. - `cluster_security_group_id` (String) The cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control plane to data plane communication. - `encryption_config` (Attributes List) (see [below for nested schema](#nestedatt--encryption_config)) - `encryption_config_key_arn` (String) Amazon Resource Name (ARN) or alias of the customer master key (CMK). @@ -31,11 +33,21 @@ Data Source schema for AWS::EKS::Cluster - `logging` (Attributes) Enable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs based on log types. By default, cluster control plane logs aren't exported to CloudWatch Logs. (see [below for nested schema](#nestedatt--logging)) - `name` (String) The unique name to give to your cluster. - `open_id_connect_issuer_url` (String) The issuer URL for the cluster's OIDC identity provider, such as https://oidc.eks.us-west-2.amazonaws.com/id/EXAMPLED539D4633E53DE1B716D3041E. If you need to remove https:// from this output value, you can include the following code in your template. +- `outpost_config` (Attributes) An object representing the Outpost configuration to use for AWS EKS outpost cluster. (see [below for nested schema](#nestedatt--outpost_config)) - `resources_vpc_config` (Attributes) An object representing the VPC configuration to use for an Amazon EKS cluster. (see [below for nested schema](#nestedatt--resources_vpc_config)) - `role_arn` (String) The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf. - `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) - `version` (String) The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used. + +### Nested Schema for `access_config` + +Read-Only: + +- `authentication_mode` (String) Specify the authentication mode that should be used to create your cluster. +- `bootstrap_cluster_creator_admin_permissions` (Boolean) Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster. + + ### Nested Schema for `encryption_config` @@ -87,6 +99,24 @@ Read-Only: + +### Nested Schema for `outpost_config` + +Read-Only: + +- `control_plane_instance_type` (String) Specify the Instance type of the machines that should be used to create your cluster. +- `control_plane_placement` (Attributes) Specify the placement group of the control plane machines for your cluster. (see [below for nested schema](#nestedatt--outpost_config--control_plane_placement)) +- `outpost_arns` (List of String) Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster. + + +### Nested Schema for `outpost_config.control_plane_placement` + +Read-Only: + +- `group_name` (String) Specify the placement group name of the control place machines for your cluster. + + + ### Nested Schema for `resources_vpc_config` diff --git a/docs/data-sources/eks_nodegroup.md b/docs/data-sources/eks_nodegroup.md deleted file mode 100644 index 1c7a21241..000000000 --- a/docs/data-sources/eks_nodegroup.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_eks_nodegroup Data Source - terraform-provider-awscc" -subcategory: "" -description: |- - Data Source schema for AWS::EKS::Nodegroup ---- - -# awscc_eks_nodegroup (Data Source) - -Data Source schema for AWS::EKS::Nodegroup - - - - -## Schema - -### Required - -- `id` (String) Uniquely identifies the resource. - -### Read-Only - -- `ami_type` (String) The AMI type for your node group. -- `arn` (String) -- `capacity_type` (String) The capacity type of your managed node group. -- `cluster_name` (String) Name of the cluster to create the node group in. -- `disk_size` (Number) The root device disk size (in GiB) for your node group instances. -- `force_update_enabled` (Boolean) Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue. -- `instance_types` (List of String) Specify the instance types for a node group. -- `labels` (Map of String) The Kubernetes labels to be applied to the nodes in the node group when they are created. -- `launch_template` (Attributes) An object representing a node group's launch template specification. (see [below for nested schema](#nestedatt--launch_template)) -- `node_role` (String) The Amazon Resource Name (ARN) of the IAM role to associate with your node group. -- `nodegroup_name` (String) The unique name to give your node group. -- `release_version` (String) The AMI version of the Amazon EKS-optimized AMI to use with your node group. -- `remote_access` (Attributes) The remote access (SSH) configuration to use with your node group. (see [below for nested schema](#nestedatt--remote_access)) -- `scaling_config` (Attributes) The scaling configuration details for the Auto Scaling group that is created for your node group. (see [below for nested schema](#nestedatt--scaling_config)) -- `subnets` (List of String) The subnets to use for the Auto Scaling group that is created for your node group. -- `tags` (Map of String) The metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency. -- `taints` (Attributes List) The Kubernetes taints to be applied to the nodes in the node group when they are created. (see [below for nested schema](#nestedatt--taints)) -- `update_config` (Attributes) The node group update configuration. (see [below for nested schema](#nestedatt--update_config)) -- `version` (String) The Kubernetes version to use for your managed nodes. - - -### Nested Schema for `launch_template` - -Read-Only: - -- `id` (String) -- `name` (String) -- `version` (String) - - - -### Nested Schema for `remote_access` - -Read-Only: - -- `ec_2_ssh_key` (String) -- `source_security_groups` (List of String) - - - -### Nested Schema for `scaling_config` - -Read-Only: - -- `desired_size` (Number) -- `max_size` (Number) -- `min_size` (Number) - - - -### Nested Schema for `taints` - -Read-Only: - -- `effect` (String) -- `key` (String) -- `value` (String) - - - -### Nested Schema for `update_config` - -Read-Only: - -- `max_unavailable` (Number) The maximum number of nodes unavailable at once during a version update. Nodes will be updated in parallel. This value or maxUnavailablePercentage is required to have a value.The maximum number is 100. -- `max_unavailable_percentage` (Number) The maximum percentage of nodes unavailable during a version update. This percentage of nodes will be updated in parallel, up to 100 nodes at once. This value or maxUnavailable is required to have a value. diff --git a/docs/data-sources/elasticbeanstalk_application_version.md b/docs/data-sources/elasticbeanstalk_application_version.md index abb750a7e..2952002e1 100644 --- a/docs/data-sources/elasticbeanstalk_application_version.md +++ b/docs/data-sources/elasticbeanstalk_application_version.md @@ -22,6 +22,7 @@ Data Source schema for AWS::ElasticBeanstalk::ApplicationVersion ### Read-Only - `application_name` (String) The name of the Elastic Beanstalk application that is associated with this application version. +- `application_version_id` (String) - `description` (String) A description of this application version. - `source_bundle` (Attributes) The Amazon S3 bucket and key that identify the location of the source bundle for this version. (see [below for nested schema](#nestedatt--source_bundle)) diff --git a/docs/data-sources/emrcontainers_virtual_cluster.md b/docs/data-sources/emrcontainers_virtual_cluster.md deleted file mode 100644 index 7e9c7cd35..000000000 --- a/docs/data-sources/emrcontainers_virtual_cluster.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_emrcontainers_virtual_cluster Data Source - terraform-provider-awscc" -subcategory: "" -description: |- - Data Source schema for AWS::EMRContainers::VirtualCluster ---- - -# awscc_emrcontainers_virtual_cluster (Data Source) - -Data Source schema for AWS::EMRContainers::VirtualCluster - - - - -## Schema - -### Required - -- `id` (String) Uniquely identifies the resource. - -### Read-Only - -- `arn` (String) -- `container_provider` (Attributes) Container provider of the virtual cluster. (see [below for nested schema](#nestedatt--container_provider)) -- `name` (String) Name of the virtual cluster. -- `tags` (Attributes Set) An array of key-value pairs to apply to this virtual cluster. (see [below for nested schema](#nestedatt--tags)) - - -### Nested Schema for `container_provider` - -Read-Only: - -- `id` (String) The ID of the container cluster -- `info` (Attributes) (see [below for nested schema](#nestedatt--container_provider--info)) -- `type` (String) The type of the container provider - - -### Nested Schema for `container_provider.info` - -Read-Only: - -- `eks_info` (Attributes) (see [below for nested schema](#nestedatt--container_provider--info--eks_info)) - - -### Nested Schema for `container_provider.info.eks_info` - -Read-Only: - -- `namespace` (String) - - - - - -### Nested Schema for `tags` - -Read-Only: - -- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. -- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/eventschemas_registry_policy.md b/docs/data-sources/eventschemas_registry_policy.md index 2fd13b8c7..7f20a2ecc 100644 --- a/docs/data-sources/eventschemas_registry_policy.md +++ b/docs/data-sources/eventschemas_registry_policy.md @@ -23,4 +23,5 @@ Data Source schema for AWS::EventSchemas::RegistryPolicy - `policy` (String) - `registry_name` (String) +- `registry_policy_id` (String) - `revision_id` (String) diff --git a/docs/data-sources/fis_experiment_template.md b/docs/data-sources/fis_experiment_template.md index 75a4dd5b0..64c9cfc12 100644 --- a/docs/data-sources/fis_experiment_template.md +++ b/docs/data-sources/fis_experiment_template.md @@ -24,6 +24,7 @@ Data Source schema for AWS::FIS::ExperimentTemplate - `actions` (Attributes Map) The actions for the experiment. (see [below for nested schema](#nestedatt--actions)) - `description` (String) A description for the experiment template. - `experiment_options` (Attributes) (see [below for nested schema](#nestedatt--experiment_options)) +- `experiment_template_id` (String) - `log_configuration` (Attributes) (see [below for nested schema](#nestedatt--log_configuration)) - `role_arn` (String) The Amazon Resource Name (ARN) of an IAM role that grants the AWS FIS service permission to perform service actions on your behalf. - `stop_conditions` (Attributes List) One or more stop conditions. (see [below for nested schema](#nestedatt--stop_conditions)) diff --git a/docs/data-sources/fms_policy.md b/docs/data-sources/fms_policy.md index 607695c5a..87205aa2a 100644 --- a/docs/data-sources/fms_policy.md +++ b/docs/data-sources/fms_policy.md @@ -27,6 +27,7 @@ Data Source schema for AWS::FMS::Policy - `exclude_resource_tags` (Boolean) - `include_map` (Attributes) An FMS includeMap or excludeMap. (see [below for nested schema](#nestedatt--include_map)) - `policy_description` (String) +- `policy_id` (String) - `policy_name` (String) - `remediation_enabled` (Boolean) - `resource_set_ids` (List of String) diff --git a/docs/data-sources/fms_resource_set.md b/docs/data-sources/fms_resource_set.md index 9c6317b3e..daa6987ba 100644 --- a/docs/data-sources/fms_resource_set.md +++ b/docs/data-sources/fms_resource_set.md @@ -23,6 +23,7 @@ Data Source schema for AWS::FMS::ResourceSet - `description` (String) - `name` (String) +- `resource_set_id` (String) A Base62 ID - `resource_type_list` (List of String) - `resources` (Set of String) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/gamelift_script.md b/docs/data-sources/gamelift_script.md index 75d13831b..4b81aee92 100644 --- a/docs/data-sources/gamelift_script.md +++ b/docs/data-sources/gamelift_script.md @@ -24,6 +24,7 @@ Data Source schema for AWS::GameLift::Script - `arn` (String) The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift script resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift script ARN, the resource ID matches the Id value. - `creation_time` (String) A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). - `name` (String) A descriptive label that is associated with a script. Script names do not need to be unique. +- `script_id` (String) A unique identifier for the Realtime script - `size_on_disk` (Number) The file size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at "0". - `storage_location` (Attributes) The location of the Amazon S3 bucket where a zipped file containing your Realtime scripts is stored. The storage location must specify the Amazon S3 bucket name, the zip file name (the "key"), and a role ARN that allows Amazon GameLift to access the Amazon S3 storage location. The S3 bucket must be in the same Region where you want to create a new script. By default, Amazon GameLift uploads the latest version of the zip file; if you have S3 object versioning turned on, you can use the ObjectVersion parameter to specify an earlier version. (see [below for nested schema](#nestedatt--storage_location)) - `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/grafana_workspace.md b/docs/data-sources/grafana_workspace.md index a24126078..11cad41de 100644 --- a/docs/data-sources/grafana_workspace.md +++ b/docs/data-sources/grafana_workspace.md @@ -44,6 +44,7 @@ Data Source schema for AWS::Grafana::Workspace - `stack_set_name` (String) The name of the AWS CloudFormation stack set to use to generate IAM roles to be used for this workspace. - `status` (String) These enums represent the status of a workspace. - `vpc_configuration` (Attributes) The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. (see [below for nested schema](#nestedatt--vpc_configuration)) +- `workspace_id` (String) The id that uniquely identifies a Grafana workspace. ### Nested Schema for `network_access_control` diff --git a/docs/data-sources/groundstation_config.md b/docs/data-sources/groundstation_config.md new file mode 100644 index 000000000..7b6387ca2 --- /dev/null +++ b/docs/data-sources/groundstation_config.md @@ -0,0 +1,214 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_groundstation_config Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::GroundStation::Config +--- + +# awscc_groundstation_config (Data Source) + +Data Source schema for AWS::GroundStation::Config + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `config_data` (Attributes) (see [below for nested schema](#nestedatt--config_data)) +- `config_id` (String) +- `name` (String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `type` (String) + + +### Nested Schema for `config_data` + +Read-Only: + +- `antenna_downlink_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config)) +- `antenna_downlink_demod_decode_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config)) +- `antenna_uplink_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config)) +- `dataflow_endpoint_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--dataflow_endpoint_config)) +- `s3_recording_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--s3_recording_config)) +- `tracking_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--tracking_config)) +- `uplink_echo_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--uplink_echo_config)) + + +### Nested Schema for `config_data.antenna_downlink_config` + +Read-Only: + +- `spectrum_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config--spectrum_config)) + + +### Nested Schema for `config_data.antenna_downlink_config.spectrum_config` + +Read-Only: + +- `bandwidth` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config--spectrum_config--bandwidth)) +- `center_frequency` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config--spectrum_config--center_frequency)) +- `polarization` (String) + + +### Nested Schema for `config_data.antenna_downlink_config.spectrum_config.polarization` + +Read-Only: + +- `units` (String) +- `value` (Number) + + + +### Nested Schema for `config_data.antenna_downlink_config.spectrum_config.polarization` + +Read-Only: + +- `units` (String) +- `value` (Number) + + + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config` + +Read-Only: + +- `decode_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--decode_config)) +- `demodulation_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--demodulation_config)) +- `spectrum_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--spectrum_config)) + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.decode_config` + +Read-Only: + +- `unvalidated_json` (String) + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.demodulation_config` + +Read-Only: + +- `unvalidated_json` (String) + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.spectrum_config` + +Read-Only: + +- `bandwidth` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--spectrum_config--bandwidth)) +- `center_frequency` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--spectrum_config--center_frequency)) +- `polarization` (String) + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.spectrum_config.polarization` + +Read-Only: + +- `units` (String) +- `value` (Number) + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.spectrum_config.polarization` + +Read-Only: + +- `units` (String) +- `value` (Number) + + + + + +### Nested Schema for `config_data.antenna_uplink_config` + +Read-Only: + +- `spectrum_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config--spectrum_config)) +- `target_eirp` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config--target_eirp)) +- `transmit_disabled` (Boolean) + + +### Nested Schema for `config_data.antenna_uplink_config.spectrum_config` + +Read-Only: + +- `center_frequency` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config--spectrum_config--center_frequency)) +- `polarization` (String) + + +### Nested Schema for `config_data.antenna_uplink_config.spectrum_config.polarization` + +Read-Only: + +- `units` (String) +- `value` (Number) + + + + +### Nested Schema for `config_data.antenna_uplink_config.target_eirp` + +Read-Only: + +- `units` (String) +- `value` (Number) + + + + +### Nested Schema for `config_data.dataflow_endpoint_config` + +Read-Only: + +- `dataflow_endpoint_name` (String) +- `dataflow_endpoint_region` (String) + + + +### Nested Schema for `config_data.s3_recording_config` + +Read-Only: + +- `bucket_arn` (String) +- `prefix` (String) +- `role_arn` (String) + + + +### Nested Schema for `config_data.tracking_config` + +Read-Only: + +- `autotrack` (String) + + + +### Nested Schema for `config_data.uplink_echo_config` + +Read-Only: + +- `antenna_uplink_config_arn` (String) +- `enabled` (Boolean) + + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/groundstation_configs.md b/docs/data-sources/groundstation_configs.md new file mode 100644 index 000000000..d4971dde9 --- /dev/null +++ b/docs/data-sources/groundstation_configs.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_groundstation_configs Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::GroundStation::Config +--- + +# awscc_groundstation_configs (Data Source) + +Plural Data Source schema for AWS::GroundStation::Config + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/groundstation_dataflow_endpoint_group.md b/docs/data-sources/groundstation_dataflow_endpoint_group.md index c90ddcfce..8d30a5b47 100644 --- a/docs/data-sources/groundstation_dataflow_endpoint_group.md +++ b/docs/data-sources/groundstation_dataflow_endpoint_group.md @@ -24,6 +24,7 @@ Data Source schema for AWS::GroundStation::DataflowEndpointGroup - `arn` (String) - `contact_post_pass_duration_seconds` (Number) Amount of time, in seconds, after a contact ends that the Ground Station Dataflow Endpoint Group will be in a POSTPASS state. A Ground Station Dataflow Endpoint Group State Change event will be emitted when the Dataflow Endpoint Group enters and exits the POSTPASS state. - `contact_pre_pass_duration_seconds` (Number) Amount of time, in seconds, before a contact starts that the Ground Station Dataflow Endpoint Group will be in a PREPASS state. A Ground Station Dataflow Endpoint Group State Change event will be emitted when the Dataflow Endpoint Group enters and exits the PREPASS state. +- `dataflow_endpoint_group_id` (String) - `endpoint_details` (Attributes List) (see [below for nested schema](#nestedatt--endpoint_details)) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/groundstation_mission_profile.md b/docs/data-sources/groundstation_mission_profile.md index 7dde45d33..cceb2ccde 100644 --- a/docs/data-sources/groundstation_mission_profile.md +++ b/docs/data-sources/groundstation_mission_profile.md @@ -26,6 +26,7 @@ Data Source schema for AWS::GroundStation::MissionProfile - `contact_pre_pass_duration_seconds` (Number) Pre-pass time needed before the contact. - `dataflow_edges` (Attributes List) (see [below for nested schema](#nestedatt--dataflow_edges)) - `minimum_viable_contact_duration_seconds` (Number) Visibilities with shorter duration than the specified minimum viable contact duration will be ignored when searching for available contacts. +- `mission_profile_id` (String) - `name` (String) A name used to identify a mission profile. - `region` (String) - `streams_kms_key` (Attributes) The ARN of a KMS Key used for encrypting data during transmission from the source to destination locations. (see [below for nested schema](#nestedatt--streams_kms_key)) diff --git a/docs/data-sources/guardduty_detector.md b/docs/data-sources/guardduty_detector.md index 3c0b35319..203935f0d 100644 --- a/docs/data-sources/guardduty_detector.md +++ b/docs/data-sources/guardduty_detector.md @@ -22,6 +22,7 @@ Data Source schema for AWS::GuardDuty::Detector ### Read-Only - `data_sources` (Attributes) (see [below for nested schema](#nestedatt--data_sources)) +- `detector_id` (String) - `enable` (Boolean) - `features` (Attributes List) (see [below for nested schema](#nestedatt--features)) - `finding_publishing_frequency` (String) diff --git a/docs/data-sources/guardduty_ip_set.md b/docs/data-sources/guardduty_ip_set.md index b6b66e125..1dab00fcd 100644 --- a/docs/data-sources/guardduty_ip_set.md +++ b/docs/data-sources/guardduty_ip_set.md @@ -24,6 +24,7 @@ Data Source schema for AWS::GuardDuty::IPSet - `activate` (Boolean) - `detector_id` (String) - `format` (String) +- `ip_set_id` (String) - `location` (String) - `name` (String) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/guardduty_threat_intel_set.md b/docs/data-sources/guardduty_threat_intel_set.md index 8f6bc257b..dddc5049f 100644 --- a/docs/data-sources/guardduty_threat_intel_set.md +++ b/docs/data-sources/guardduty_threat_intel_set.md @@ -27,6 +27,7 @@ Data Source schema for AWS::GuardDuty::ThreatIntelSet - `location` (String) - `name` (String) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `threat_intel_set_id` (String) ### Nested Schema for `tags` diff --git a/docs/data-sources/iot_billing_group.md b/docs/data-sources/iot_billing_group.md new file mode 100644 index 000000000..c7a1ae65c --- /dev/null +++ b/docs/data-sources/iot_billing_group.md @@ -0,0 +1,44 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_billing_group Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoT::BillingGroup +--- + +# awscc_iot_billing_group (Data Source) + +Data Source schema for AWS::IoT::BillingGroup + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `billing_group_id` (String) +- `billing_group_name` (String) +- `billing_group_properties` (Attributes) (see [below for nested schema](#nestedatt--billing_group_properties)) +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `billing_group_properties` + +Read-Only: + +- `billing_group_description` (String) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/iot_billing_groups.md b/docs/data-sources/iot_billing_groups.md new file mode 100644 index 000000000..a99d527dc --- /dev/null +++ b/docs/data-sources/iot_billing_groups.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_billing_groups Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoT::BillingGroup +--- + +# awscc_iot_billing_groups (Data Source) + +Plural Data Source schema for AWS::IoT::BillingGroup + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iot_ca_certificate.md b/docs/data-sources/iot_ca_certificate.md index 4efea6212..9906e5fc1 100644 --- a/docs/data-sources/iot_ca_certificate.md +++ b/docs/data-sources/iot_ca_certificate.md @@ -23,6 +23,7 @@ Data Source schema for AWS::IoT::CACertificate - `arn` (String) - `auto_registration_status` (String) +- `ca_certificate_id` (String) - `ca_certificate_pem` (String) - `certificate_mode` (String) - `registration_config` (Attributes) (see [below for nested schema](#nestedatt--registration_config)) diff --git a/docs/data-sources/iot_certificate.md b/docs/data-sources/iot_certificate.md index d64962763..1b7a61718 100644 --- a/docs/data-sources/iot_certificate.md +++ b/docs/data-sources/iot_certificate.md @@ -23,6 +23,7 @@ Data Source schema for AWS::IoT::Certificate - `arn` (String) - `ca_certificate_pem` (String) +- `certificate_id` (String) - `certificate_mode` (String) - `certificate_pem` (String) - `certificate_signing_request` (String) diff --git a/docs/data-sources/iot_policy.md b/docs/data-sources/iot_policy.md index dc59a5521..eb467b6a9 100644 --- a/docs/data-sources/iot_policy.md +++ b/docs/data-sources/iot_policy.md @@ -23,6 +23,7 @@ Data Source schema for AWS::IoT::Policy - `arn` (String) - `policy_document` (String) +- `policy_id` (String) - `policy_name` (String) - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/iot_thing.md b/docs/data-sources/iot_thing.md new file mode 100644 index 000000000..a4e98cab8 --- /dev/null +++ b/docs/data-sources/iot_thing.md @@ -0,0 +1,34 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoT::Thing +--- + +# awscc_iot_thing (Data Source) + +Data Source schema for AWS::IoT::Thing + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `attribute_payload` (Attributes) (see [below for nested schema](#nestedatt--attribute_payload)) +- `thing_id` (String) +- `thing_name` (String) + + +### Nested Schema for `attribute_payload` + +Read-Only: + +- `attributes` (Map of String) diff --git a/docs/data-sources/iot_thing_group.md b/docs/data-sources/iot_thing_group.md new file mode 100644 index 000000000..1e4de4e39 --- /dev/null +++ b/docs/data-sources/iot_thing_group.md @@ -0,0 +1,54 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing_group Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoT::ThingGroup +--- + +# awscc_iot_thing_group (Data Source) + +Data Source schema for AWS::IoT::ThingGroup + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `parent_group_name` (String) +- `query_string` (String) +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) +- `thing_group_id` (String) +- `thing_group_name` (String) +- `thing_group_properties` (Attributes) (see [below for nested schema](#nestedatt--thing_group_properties)) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + + + +### Nested Schema for `thing_group_properties` + +Read-Only: + +- `attribute_payload` (Attributes) (see [below for nested schema](#nestedatt--thing_group_properties--attribute_payload)) +- `thing_group_description` (String) + + +### Nested Schema for `thing_group_properties.attribute_payload` + +Read-Only: + +- `attributes` (Map of String) diff --git a/docs/data-sources/iot_thing_groups.md b/docs/data-sources/iot_thing_groups.md new file mode 100644 index 000000000..5233b748c --- /dev/null +++ b/docs/data-sources/iot_thing_groups.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing_groups Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoT::ThingGroup +--- + +# awscc_iot_thing_groups (Data Source) + +Plural Data Source schema for AWS::IoT::ThingGroup + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iot_thing_type.md b/docs/data-sources/iot_thing_type.md new file mode 100644 index 000000000..07fc61734 --- /dev/null +++ b/docs/data-sources/iot_thing_type.md @@ -0,0 +1,46 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing_type Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoT::ThingType +--- + +# awscc_iot_thing_type (Data Source) + +Data Source schema for AWS::IoT::ThingType + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `deprecate_thing_type` (Boolean) +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) +- `thing_type_id` (String) +- `thing_type_name` (String) +- `thing_type_properties` (Attributes) (see [below for nested schema](#nestedatt--thing_type_properties)) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + + + +### Nested Schema for `thing_type_properties` + +Read-Only: + +- `searchable_attributes` (List of String) +- `thing_type_description` (String) diff --git a/docs/data-sources/iot_thing_types.md b/docs/data-sources/iot_thing_types.md new file mode 100644 index 000000000..91ada30ab --- /dev/null +++ b/docs/data-sources/iot_thing_types.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing_types Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoT::ThingType +--- + +# awscc_iot_thing_types (Data Source) + +Plural Data Source schema for AWS::IoT::ThingType + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iot_things.md b/docs/data-sources/iot_things.md new file mode 100644 index 000000000..0ce315aeb --- /dev/null +++ b/docs/data-sources/iot_things.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_things Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoT::Thing +--- + +# awscc_iot_things (Data Source) + +Plural Data Source schema for AWS::IoT::Thing + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iotanalytics_channel.md b/docs/data-sources/iotanalytics_channel.md new file mode 100644 index 000000000..d396e1644 --- /dev/null +++ b/docs/data-sources/iotanalytics_channel.md @@ -0,0 +1,64 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_channel Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoTAnalytics::Channel +--- + +# awscc_iotanalytics_channel (Data Source) + +Data Source schema for AWS::IoTAnalytics::Channel + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `channel_id` (String) +- `channel_name` (String) +- `channel_storage` (Attributes) (see [below for nested schema](#nestedatt--channel_storage)) +- `retention_period` (Attributes) (see [below for nested schema](#nestedatt--retention_period)) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `channel_storage` + +Read-Only: + +- `customer_managed_s3` (Attributes) (see [below for nested schema](#nestedatt--channel_storage--customer_managed_s3)) +- `service_managed_s3` (String) + + +### Nested Schema for `channel_storage.customer_managed_s3` + +Read-Only: + +- `bucket` (String) +- `key_prefix` (String) +- `role_arn` (String) + + + + +### Nested Schema for `retention_period` + +Read-Only: + +- `number_of_days` (Number) +- `unlimited` (Boolean) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/iotanalytics_channels.md b/docs/data-sources/iotanalytics_channels.md new file mode 100644 index 000000000..5f1161442 --- /dev/null +++ b/docs/data-sources/iotanalytics_channels.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_channels Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoTAnalytics::Channel +--- + +# awscc_iotanalytics_channels (Data Source) + +Plural Data Source schema for AWS::IoTAnalytics::Channel + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iotanalytics_dataset.md b/docs/data-sources/iotanalytics_dataset.md new file mode 100644 index 000000000..81eda7b5c --- /dev/null +++ b/docs/data-sources/iotanalytics_dataset.md @@ -0,0 +1,239 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_dataset Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoTAnalytics::Dataset +--- + +# awscc_iotanalytics_dataset (Data Source) + +Data Source schema for AWS::IoTAnalytics::Dataset + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `actions` (Attributes List) (see [below for nested schema](#nestedatt--actions)) +- `content_delivery_rules` (Attributes List) (see [below for nested schema](#nestedatt--content_delivery_rules)) +- `dataset_id` (String) +- `dataset_name` (String) +- `late_data_rules` (Attributes List) (see [below for nested schema](#nestedatt--late_data_rules)) +- `retention_period` (Attributes) (see [below for nested schema](#nestedatt--retention_period)) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `triggers` (Attributes List) (see [below for nested schema](#nestedatt--triggers)) +- `versioning_configuration` (Attributes) (see [below for nested schema](#nestedatt--versioning_configuration)) + + +### Nested Schema for `actions` + +Read-Only: + +- `action_name` (String) +- `container_action` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action)) +- `query_action` (Attributes) (see [below for nested schema](#nestedatt--actions--query_action)) + + +### Nested Schema for `actions.container_action` + +Read-Only: + +- `execution_role_arn` (String) +- `image` (String) +- `resource_configuration` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action--resource_configuration)) +- `variables` (Attributes List) (see [below for nested schema](#nestedatt--actions--container_action--variables)) + + +### Nested Schema for `actions.container_action.resource_configuration` + +Read-Only: + +- `compute_type` (String) +- `volume_size_in_gb` (Number) + + + +### Nested Schema for `actions.container_action.variables` + +Read-Only: + +- `dataset_content_version_value` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action--variables--dataset_content_version_value)) +- `double_value` (Number) +- `output_file_uri_value` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action--variables--output_file_uri_value)) +- `string_value` (String) +- `variable_name` (String) + + +### Nested Schema for `actions.container_action.variables.variable_name` + +Read-Only: + +- `dataset_name` (String) + + + +### Nested Schema for `actions.container_action.variables.variable_name` + +Read-Only: + +- `file_name` (String) + + + + + +### Nested Schema for `actions.query_action` + +Read-Only: + +- `filters` (Attributes List) (see [below for nested schema](#nestedatt--actions--query_action--filters)) +- `sql_query` (String) + + +### Nested Schema for `actions.query_action.filters` + +Read-Only: + +- `delta_time` (Attributes) (see [below for nested schema](#nestedatt--actions--query_action--filters--delta_time)) + + +### Nested Schema for `actions.query_action.filters.delta_time` + +Read-Only: + +- `offset_seconds` (Number) +- `time_expression` (String) + + + + + + +### Nested Schema for `content_delivery_rules` + +Read-Only: + +- `destination` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination)) +- `entry_name` (String) + + +### Nested Schema for `content_delivery_rules.destination` + +Read-Only: + +- `iot_events_destination_configuration` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination--iot_events_destination_configuration)) +- `s3_destination_configuration` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination--s3_destination_configuration)) + + +### Nested Schema for `content_delivery_rules.destination.iot_events_destination_configuration` + +Read-Only: + +- `input_name` (String) +- `role_arn` (String) + + + +### Nested Schema for `content_delivery_rules.destination.s3_destination_configuration` + +Read-Only: + +- `bucket` (String) +- `glue_configuration` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination--s3_destination_configuration--glue_configuration)) +- `key` (String) +- `role_arn` (String) + + +### Nested Schema for `content_delivery_rules.destination.s3_destination_configuration.role_arn` + +Read-Only: + +- `database_name` (String) +- `table_name` (String) + + + + + + +### Nested Schema for `late_data_rules` + +Read-Only: + +- `rule_configuration` (Attributes) (see [below for nested schema](#nestedatt--late_data_rules--rule_configuration)) +- `rule_name` (String) + + +### Nested Schema for `late_data_rules.rule_configuration` + +Read-Only: + +- `delta_time_session_window_configuration` (Attributes) (see [below for nested schema](#nestedatt--late_data_rules--rule_configuration--delta_time_session_window_configuration)) + + +### Nested Schema for `late_data_rules.rule_configuration.delta_time_session_window_configuration` + +Read-Only: + +- `timeout_in_minutes` (Number) + + + + + +### Nested Schema for `retention_period` + +Read-Only: + +- `number_of_days` (Number) +- `unlimited` (Boolean) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) + + + +### Nested Schema for `triggers` + +Read-Only: + +- `schedule` (Attributes) (see [below for nested schema](#nestedatt--triggers--schedule)) +- `triggering_dataset` (Attributes) (see [below for nested schema](#nestedatt--triggers--triggering_dataset)) + + +### Nested Schema for `triggers.schedule` + +Read-Only: + +- `schedule_expression` (String) + + + +### Nested Schema for `triggers.triggering_dataset` + +Read-Only: + +- `dataset_name` (String) + + + + +### Nested Schema for `versioning_configuration` + +Read-Only: + +- `max_versions` (Number) +- `unlimited` (Boolean) diff --git a/docs/data-sources/iotanalytics_datasets.md b/docs/data-sources/iotanalytics_datasets.md new file mode 100644 index 000000000..058e9e4f0 --- /dev/null +++ b/docs/data-sources/iotanalytics_datasets.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_datasets Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoTAnalytics::Dataset +--- + +# awscc_iotanalytics_datasets (Data Source) + +Plural Data Source schema for AWS::IoTAnalytics::Dataset + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iotanalytics_datastore.md b/docs/data-sources/iotanalytics_datastore.md new file mode 100644 index 000000000..22acca1fe --- /dev/null +++ b/docs/data-sources/iotanalytics_datastore.md @@ -0,0 +1,152 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_datastore Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoTAnalytics::Datastore +--- + +# awscc_iotanalytics_datastore (Data Source) + +Data Source schema for AWS::IoTAnalytics::Datastore + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `datastore_id` (String) +- `datastore_name` (String) +- `datastore_partitions` (Attributes) (see [below for nested schema](#nestedatt--datastore_partitions)) +- `datastore_storage` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage)) +- `file_format_configuration` (Attributes) (see [below for nested schema](#nestedatt--file_format_configuration)) +- `retention_period` (Attributes) (see [below for nested schema](#nestedatt--retention_period)) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `datastore_partitions` + +Read-Only: + +- `partitions` (Attributes List) (see [below for nested schema](#nestedatt--datastore_partitions--partitions)) + + +### Nested Schema for `datastore_partitions.partitions` + +Read-Only: + +- `partition` (Attributes) (see [below for nested schema](#nestedatt--datastore_partitions--partitions--partition)) +- `timestamp_partition` (Attributes) (see [below for nested schema](#nestedatt--datastore_partitions--partitions--timestamp_partition)) + + +### Nested Schema for `datastore_partitions.partitions.partition` + +Read-Only: + +- `attribute_name` (String) + + + +### Nested Schema for `datastore_partitions.partitions.timestamp_partition` + +Read-Only: + +- `attribute_name` (String) +- `timestamp_format` (String) + + + + + +### Nested Schema for `datastore_storage` + +Read-Only: + +- `customer_managed_s3` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage--customer_managed_s3)) +- `iot_site_wise_multi_layer_storage` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage--iot_site_wise_multi_layer_storage)) +- `service_managed_s3` (String) + + +### Nested Schema for `datastore_storage.customer_managed_s3` + +Read-Only: + +- `bucket` (String) +- `key_prefix` (String) +- `role_arn` (String) + + + +### Nested Schema for `datastore_storage.iot_site_wise_multi_layer_storage` + +Read-Only: + +- `customer_managed_s3_storage` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage--iot_site_wise_multi_layer_storage--customer_managed_s3_storage)) + + +### Nested Schema for `datastore_storage.iot_site_wise_multi_layer_storage.customer_managed_s3_storage` + +Read-Only: + +- `bucket` (String) +- `key_prefix` (String) + + + + + +### Nested Schema for `file_format_configuration` + +Read-Only: + +- `json_configuration` (String) +- `parquet_configuration` (Attributes) (see [below for nested schema](#nestedatt--file_format_configuration--parquet_configuration)) + + +### Nested Schema for `file_format_configuration.parquet_configuration` + +Read-Only: + +- `schema_definition` (Attributes) (see [below for nested schema](#nestedatt--file_format_configuration--parquet_configuration--schema_definition)) + + +### Nested Schema for `file_format_configuration.parquet_configuration.schema_definition` + +Read-Only: + +- `columns` (Attributes List) (see [below for nested schema](#nestedatt--file_format_configuration--parquet_configuration--schema_definition--columns)) + + +### Nested Schema for `file_format_configuration.parquet_configuration.schema_definition.columns` + +Read-Only: + +- `name` (String) +- `type` (String) + + + + + + +### Nested Schema for `retention_period` + +Read-Only: + +- `number_of_days` (Number) +- `unlimited` (Boolean) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/iotanalytics_datastores.md b/docs/data-sources/iotanalytics_datastores.md new file mode 100644 index 000000000..3e6cb4c20 --- /dev/null +++ b/docs/data-sources/iotanalytics_datastores.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_datastores Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoTAnalytics::Datastore +--- + +# awscc_iotanalytics_datastores (Data Source) + +Plural Data Source schema for AWS::IoTAnalytics::Datastore + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iotanalytics_pipeline.md b/docs/data-sources/iotanalytics_pipeline.md new file mode 100644 index 000000000..5abcb2d2e --- /dev/null +++ b/docs/data-sources/iotanalytics_pipeline.md @@ -0,0 +1,157 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_pipeline Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IoTAnalytics::Pipeline +--- + +# awscc_iotanalytics_pipeline (Data Source) + +Data Source schema for AWS::IoTAnalytics::Pipeline + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `pipeline_activities` (Attributes List) (see [below for nested schema](#nestedatt--pipeline_activities)) +- `pipeline_id` (String) +- `pipeline_name` (String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `pipeline_activities` + +Read-Only: + +- `add_attributes` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--add_attributes)) +- `channel` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--channel)) +- `datastore` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--datastore)) +- `device_registry_enrich` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--device_registry_enrich)) +- `device_shadow_enrich` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--device_shadow_enrich)) +- `filter` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--filter)) +- `lambda` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--lambda)) +- `math` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--math)) +- `remove_attributes` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--remove_attributes)) +- `select_attributes` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--select_attributes)) + + +### Nested Schema for `pipeline_activities.add_attributes` + +Read-Only: + +- `attributes` (Map of String) +- `name` (String) +- `next` (String) + + + +### Nested Schema for `pipeline_activities.channel` + +Read-Only: + +- `channel_name` (String) +- `name` (String) +- `next` (String) + + + +### Nested Schema for `pipeline_activities.datastore` + +Read-Only: + +- `datastore_name` (String) +- `name` (String) + + + +### Nested Schema for `pipeline_activities.device_registry_enrich` + +Read-Only: + +- `attribute` (String) +- `name` (String) +- `next` (String) +- `role_arn` (String) +- `thing_name` (String) + + + +### Nested Schema for `pipeline_activities.device_shadow_enrich` + +Read-Only: + +- `attribute` (String) +- `name` (String) +- `next` (String) +- `role_arn` (String) +- `thing_name` (String) + + + +### Nested Schema for `pipeline_activities.filter` + +Read-Only: + +- `filter` (String) +- `name` (String) +- `next` (String) + + + +### Nested Schema for `pipeline_activities.lambda` + +Read-Only: + +- `batch_size` (Number) +- `lambda_name` (String) +- `name` (String) +- `next` (String) + + + +### Nested Schema for `pipeline_activities.math` + +Read-Only: + +- `attribute` (String) +- `math` (String) +- `name` (String) +- `next` (String) + + + +### Nested Schema for `pipeline_activities.remove_attributes` + +Read-Only: + +- `attributes` (List of String) +- `name` (String) +- `next` (String) + + + +### Nested Schema for `pipeline_activities.select_attributes` + +Read-Only: + +- `attributes` (List of String) +- `name` (String) +- `next` (String) + + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/iotanalytics_pipelines.md b/docs/data-sources/iotanalytics_pipelines.md new file mode 100644 index 000000000..214206269 --- /dev/null +++ b/docs/data-sources/iotanalytics_pipelines.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_pipelines Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IoTAnalytics::Pipeline +--- + +# awscc_iotanalytics_pipelines (Data Source) + +Plural Data Source schema for AWS::IoTAnalytics::Pipeline + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/iotfleetwise_fleet.md b/docs/data-sources/iotfleetwise_fleet.md index c6ccdb668..6d8eb5ee3 100644 --- a/docs/data-sources/iotfleetwise_fleet.md +++ b/docs/data-sources/iotfleetwise_fleet.md @@ -24,6 +24,7 @@ Data Source schema for AWS::IoTFleetWise::Fleet - `arn` (String) - `creation_time` (String) - `description` (String) +- `fleet_id` (String) - `last_modification_time` (String) - `signal_catalog_arn` (String) - `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/iotwireless_device_profile.md b/docs/data-sources/iotwireless_device_profile.md index f2da6e6ed..a1314f91f 100644 --- a/docs/data-sources/iotwireless_device_profile.md +++ b/docs/data-sources/iotwireless_device_profile.md @@ -22,6 +22,7 @@ Data Source schema for AWS::IoTWireless::DeviceProfile ### Read-Only - `arn` (String) Service profile Arn. Returned after successful create. +- `device_profile_id` (String) Service profile Id. Returned after successful create. - `lo_ra_wan` (Attributes) LoRaWANDeviceProfile supports all LoRa specific attributes for service profile for CreateDeviceProfile operation (see [below for nested schema](#nestedatt--lo_ra_wan)) - `name` (String) Name of service profile - `tags` (Attributes Set) A list of key-value pairs that contain metadata for the device profile. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/iotwireless_fuota_task.md b/docs/data-sources/iotwireless_fuota_task.md index 4f5229ec4..ace8cc41b 100644 --- a/docs/data-sources/iotwireless_fuota_task.md +++ b/docs/data-sources/iotwireless_fuota_task.md @@ -29,6 +29,7 @@ Data Source schema for AWS::IoTWireless::FuotaTask - `disassociate_wireless_device` (String) Wireless device to disassociate. Only for update request. - `firmware_update_image` (String) FUOTA task firmware update image binary S3 link - `firmware_update_role` (String) FUOTA task firmware IAM role for reading S3 +- `fuota_task_id` (String) FUOTA task id. Returned after successful create. - `fuota_task_status` (String) FUOTA task status. Returned after successful read. - `lo_ra_wan` (Attributes) FUOTA task LoRaWAN (see [below for nested schema](#nestedatt--lo_ra_wan)) - `name` (String) Name of FUOTA task diff --git a/docs/data-sources/iotwireless_multicast_group.md b/docs/data-sources/iotwireless_multicast_group.md index cf7297f64..78277dbc8 100644 --- a/docs/data-sources/iotwireless_multicast_group.md +++ b/docs/data-sources/iotwireless_multicast_group.md @@ -26,6 +26,7 @@ Data Source schema for AWS::IoTWireless::MulticastGroup - `description` (String) Multicast group description - `disassociate_wireless_device` (String) Wireless device to disassociate. Only for update request. - `lo_ra_wan` (Attributes) Multicast group LoRaWAN (see [below for nested schema](#nestedatt--lo_ra_wan)) +- `multicast_group_id` (String) Multicast group id. Returned after successful create. - `name` (String) Name of Multicast group - `status` (String) Multicast group status. Returned after successful read. - `tags` (Attributes Set) A list of key-value pairs that contain metadata for the Multicast group. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/iotwireless_service_profile.md b/docs/data-sources/iotwireless_service_profile.md index 8615e2ff5..a07c63ed8 100644 --- a/docs/data-sources/iotwireless_service_profile.md +++ b/docs/data-sources/iotwireless_service_profile.md @@ -24,6 +24,7 @@ Data Source schema for AWS::IoTWireless::ServiceProfile - `arn` (String) Service profile Arn. Returned after successful create. - `lo_ra_wan` (Attributes) LoRaWAN supports all LoRa specific attributes for service profile for CreateServiceProfile operation (see [below for nested schema](#nestedatt--lo_ra_wan)) - `name` (String) Name of service profile +- `service_profile_id` (String) Service profile Id. Returned after successful create. - `tags` (Attributes Set) A list of key-value pairs that contain metadata for the service profile. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/iotwireless_task_definition.md b/docs/data-sources/iotwireless_task_definition.md index 83111db90..c01383e4f 100644 --- a/docs/data-sources/iotwireless_task_definition.md +++ b/docs/data-sources/iotwireless_task_definition.md @@ -26,6 +26,7 @@ Data Source schema for AWS::IoTWireless::TaskDefinition - `lo_ra_wan_update_gateway_task_entry` (Attributes) The list of task definitions. (see [below for nested schema](#nestedatt--lo_ra_wan_update_gateway_task_entry)) - `name` (String) The name of the new resource. - `tags` (Attributes Set) A list of key-value pairs that contain metadata for the destination. (see [below for nested schema](#nestedatt--tags)) +- `task_definition_id` (String) The ID of the new wireless gateway task definition - `task_definition_type` (String) A filter to list only the wireless gateway task definitions that use this task definition type - `update` (Attributes) Information about the gateways to update. (see [below for nested schema](#nestedatt--update)) diff --git a/docs/data-sources/iotwireless_wireless_device.md b/docs/data-sources/iotwireless_wireless_device.md index 0424e3b8c..2c9907148 100644 --- a/docs/data-sources/iotwireless_wireless_device.md +++ b/docs/data-sources/iotwireless_wireless_device.md @@ -32,6 +32,7 @@ Data Source schema for AWS::IoTWireless::WirelessDevice - `thing_arn` (String) Thing arn. Passed into update to associate Thing with Wireless device. - `thing_name` (String) Thing Arn. If there is a Thing created, this can be returned with a Get call. - `type` (String) Wireless device type, currently only Sidewalk and LoRa +- `wireless_device_id` (String) Wireless device Id. Returned after successful create. ### Nested Schema for `lo_ra_wan` diff --git a/docs/data-sources/iotwireless_wireless_device_import_task.md b/docs/data-sources/iotwireless_wireless_device_import_task.md index 05766295e..ee45627ad 100644 --- a/docs/data-sources/iotwireless_wireless_device_import_task.md +++ b/docs/data-sources/iotwireless_wireless_device_import_task.md @@ -32,6 +32,7 @@ Data Source schema for AWS::IoTWireless::WirelessDeviceImportTask - `status` (String) Status for import task - `status_reason` (String) StatusReason for import task - `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) +- `wireless_device_import_task_id` (String) Id for Wireless Device Import Task, Returned upon successful start. ### Nested Schema for `sidewalk` diff --git a/docs/data-sources/iotwireless_wireless_gateway.md b/docs/data-sources/iotwireless_wireless_gateway.md index 86681cf13..66de18d97 100644 --- a/docs/data-sources/iotwireless_wireless_gateway.md +++ b/docs/data-sources/iotwireless_wireless_gateway.md @@ -29,6 +29,7 @@ Data Source schema for AWS::IoTWireless::WirelessGateway - `tags` (Attributes Set) A list of key-value pairs that contain metadata for the gateway. (see [below for nested schema](#nestedatt--tags)) - `thing_arn` (String) Thing Arn. Passed into Update to associate a Thing with the Wireless Gateway. - `thing_name` (String) Thing Name. If there is a Thing created, this can be returned with a Get call. +- `wireless_gateway_id` (String) Id for Wireless Gateway. Returned upon successful create. ### Nested Schema for `lo_ra_wan` diff --git a/docs/data-sources/ivschat_logging_configuration.md b/docs/data-sources/ivschat_logging_configuration.md new file mode 100644 index 000000000..799dea5f4 --- /dev/null +++ b/docs/data-sources/ivschat_logging_configuration.md @@ -0,0 +1,71 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ivschat_logging_configuration Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IVSChat::LoggingConfiguration +--- + +# awscc_ivschat_logging_configuration (Data Source) + +Data Source schema for AWS::IVSChat::LoggingConfiguration + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) LoggingConfiguration ARN is automatically generated on creation and assigned as the unique identifier. +- `destination_configuration` (Attributes) Destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration)) +- `logging_configuration_id` (String) The system-generated ID of the logging configuration. +- `name` (String) The name of the logging configuration. The value does not need to be unique. +- `state` (String) The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content. +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `destination_configuration` + +Read-Only: + +- `cloudwatch_logs` (Attributes) CloudWatch destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration--cloudwatch_logs)) +- `firehose` (Attributes) Kinesis Firehose destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration--firehose)) +- `s3` (Attributes) S3 destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration--s3)) + + +### Nested Schema for `destination_configuration.cloudwatch_logs` + +Read-Only: + +- `log_group_name` (String) Name of the Amazon CloudWatch Logs log group where chat activity will be logged. + + + +### Nested Schema for `destination_configuration.firehose` + +Read-Only: + +- `delivery_stream_name` (String) Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. + + + +### Nested Schema for `destination_configuration.s3` + +Read-Only: + +- `bucket_name` (String) Name of the Amazon S3 bucket where chat activity will be logged. + + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/ivschat_logging_configurations.md b/docs/data-sources/ivschat_logging_configurations.md new file mode 100644 index 000000000..152998f36 --- /dev/null +++ b/docs/data-sources/ivschat_logging_configurations.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ivschat_logging_configurations Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IVSChat::LoggingConfiguration +--- + +# awscc_ivschat_logging_configurations (Data Source) + +Plural Data Source schema for AWS::IVSChat::LoggingConfiguration + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/ivschat_room.md b/docs/data-sources/ivschat_room.md new file mode 100644 index 000000000..d8faa1af4 --- /dev/null +++ b/docs/data-sources/ivschat_room.md @@ -0,0 +1,48 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ivschat_room Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::IVSChat::Room +--- + +# awscc_ivschat_room (Data Source) + +Data Source schema for AWS::IVSChat::Room + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) Room ARN is automatically generated on creation and assigned as the unique identifier. +- `logging_configuration_identifiers` (Set of String) Array of logging configuration identifiers attached to the room. +- `maximum_message_length` (Number) The maximum number of characters in a single message. +- `maximum_message_rate_per_second` (Number) The maximum number of messages per second that can be sent to the room. +- `message_review_handler` (Attributes) Configuration information for optional review of messages. (see [below for nested schema](#nestedatt--message_review_handler)) +- `name` (String) The name of the room. The value does not need to be unique. +- `room_id` (String) The system-generated ID of the room. +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `message_review_handler` + +Read-Only: + +- `fallback_result` (String) Specifies the fallback behavior if the handler does not return a valid response, encounters an error, or times out. +- `uri` (String) Identifier of the message review handler. + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/ivschat_rooms.md b/docs/data-sources/ivschat_rooms.md new file mode 100644 index 000000000..eb370fca7 --- /dev/null +++ b/docs/data-sources/ivschat_rooms.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ivschat_rooms Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::IVSChat::Room +--- + +# awscc_ivschat_rooms (Data Source) + +Plural Data Source schema for AWS::IVSChat::Room + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/kendra_data_source.md b/docs/data-sources/kendra_data_source.md index 2433948b5..c2d05adaa 100644 --- a/docs/data-sources/kendra_data_source.md +++ b/docs/data-sources/kendra_data_source.md @@ -24,6 +24,7 @@ Data Source schema for AWS::Kendra::DataSource - `arn` (String) - `custom_document_enrichment_configuration` (Attributes) (see [below for nested schema](#nestedatt--custom_document_enrichment_configuration)) - `data_source_configuration` (Attributes) (see [below for nested schema](#nestedatt--data_source_configuration)) +- `data_source_id` (String) ID of data source - `description` (String) Description of data source - `index_id` (String) ID of Index - `language_code` (String) The code for a language. diff --git a/docs/data-sources/kendra_faq.md b/docs/data-sources/kendra_faq.md index bdd334b4e..d1f8a1ce7 100644 --- a/docs/data-sources/kendra_faq.md +++ b/docs/data-sources/kendra_faq.md @@ -23,6 +23,7 @@ Data Source schema for AWS::Kendra::Faq - `arn` (String) - `description` (String) FAQ description +- `faq_id` (String) Unique ID of the FAQ - `file_format` (String) FAQ file format - `index_id` (String) Index ID - `language_code` (String) The code for a language. diff --git a/docs/data-sources/kendra_index.md b/docs/data-sources/kendra_index.md index cfe164ca3..0e0d3d617 100644 --- a/docs/data-sources/kendra_index.md +++ b/docs/data-sources/kendra_index.md @@ -26,6 +26,7 @@ Data Source schema for AWS::Kendra::Index - `description` (String) A description for the index - `document_metadata_configurations` (Attributes List) Document metadata configurations (see [below for nested schema](#nestedatt--document_metadata_configurations)) - `edition` (String) Edition of index +- `index_id` (String) Unique ID of index - `name` (String) Name of index - `role_arn` (String) Role Arn - `server_side_encryption_configuration` (Attributes) Server side encryption configuration (see [below for nested schema](#nestedatt--server_side_encryption_configuration)) diff --git a/docs/data-sources/kendraranking_execution_plan.md b/docs/data-sources/kendraranking_execution_plan.md index 28b438bfe..2d46ccb1c 100644 --- a/docs/data-sources/kendraranking_execution_plan.md +++ b/docs/data-sources/kendraranking_execution_plan.md @@ -24,6 +24,7 @@ Data Source schema for AWS::KendraRanking::ExecutionPlan - `arn` (String) - `capacity_units` (Attributes) Capacity units (see [below for nested schema](#nestedatt--capacity_units)) - `description` (String) A description for the execution plan +- `execution_plan_id` (String) Unique ID of rescore execution plan - `name` (String) Name of kendra ranking rescore execution plan - `tags` (Attributes List) Tags for labeling the execution plan (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/lambda_event_source_mapping.md b/docs/data-sources/lambda_event_source_mapping.md index 604ba6e81..6ed999280 100644 --- a/docs/data-sources/lambda_event_source_mapping.md +++ b/docs/data-sources/lambda_event_source_mapping.md @@ -28,6 +28,7 @@ Data Source schema for AWS::Lambda::EventSourceMapping - `document_db_event_source_config` (Attributes) Document db event source config. (see [below for nested schema](#nestedatt--document_db_event_source_config)) - `enabled` (Boolean) Disables the event source mapping to pause polling and invocation. - `event_source_arn` (String) The Amazon Resource Name (ARN) of the event source. +- `event_source_mapping_id` (String) Event Source Mapping Identifier UUID. - `filter_criteria` (Attributes) The filter criteria to control event filtering. (see [below for nested schema](#nestedatt--filter_criteria)) - `function_name` (String) The name of the Lambda function. - `function_response_types` (List of String) (Streams) A list of response types supported by the function. diff --git a/docs/data-sources/lambda_layer_version_permission.md b/docs/data-sources/lambda_layer_version_permission.md index f7626c322..e686c0568 100644 --- a/docs/data-sources/lambda_layer_version_permission.md +++ b/docs/data-sources/lambda_layer_version_permission.md @@ -23,5 +23,6 @@ Data Source schema for AWS::Lambda::LayerVersionPermission - `action` (String) The API action that grants access to the layer. - `layer_version_arn` (String) The name or Amazon Resource Name (ARN) of the layer. +- `layer_version_permission_id` (String) ID generated by service - `organization_id` (String) With the principal set to *, grant permission to all accounts in the specified organization. - `principal` (String) An account ID, or * to grant layer usage permission to all accounts in an organization, or all AWS accounts (if organizationId is not specified). diff --git a/docs/data-sources/lambda_permission.md b/docs/data-sources/lambda_permission.md index 5afbdf29e..8fca06a56 100644 --- a/docs/data-sources/lambda_permission.md +++ b/docs/data-sources/lambda_permission.md @@ -31,6 +31,7 @@ Data Source schema for AWS::Lambda::Permission You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. - `function_url_auth_type` (String) The type of authentication that your function URL uses. Set to ``AWS_IAM`` if you want to restrict access to authenticated users only. Set to ``NONE`` if you want to bypass IAM authentication to create a public endpoint. For more information, see [Security and auth model for Lambda function URLs](https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html). +- `permission_id` (String) - `principal` (String) The AWS-service or AWS-account that invokes the function. If you specify a service, use ``SourceArn`` or ``SourceAccount`` to limit who can invoke the function through that service. - `principal_org_id` (String) The identifier for your organization in AOlong. Use this to grant permissions to all the AWS-accounts under this organization. - `source_account` (String) For AWS-service, the ID of the AWS-account that owns the resource. Use this together with ``SourceArn`` to ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account. diff --git a/docs/data-sources/lex_bot.md b/docs/data-sources/lex_bot.md index d0b4c1ed2..e42995f40 100644 --- a/docs/data-sources/lex_bot.md +++ b/docs/data-sources/lex_bot.md @@ -24,6 +24,7 @@ Data Source schema for AWS::Lex::Bot - `arn` (String) - `auto_build_bot_locales` (Boolean) Specifies whether to build the bot locales after bot creation completes. - `bot_file_s3_location` (Attributes) S3 location of bot definitions zip file, if it's not defined inline in CloudFormation. (see [below for nested schema](#nestedatt--bot_file_s3_location)) +- `bot_id` (String) Unique ID of resource - `bot_locales` (Attributes Set) List of bot locales (see [below for nested schema](#nestedatt--bot_locales)) - `bot_tags` (Attributes Set) A list of tags to add to the bot, which can only be added at bot creation. (see [below for nested schema](#nestedatt--bot_tags)) - `data_privacy` (Attributes) Data privacy setting of the Bot. (see [below for nested schema](#nestedatt--data_privacy)) diff --git a/docs/data-sources/lex_resource_policy.md b/docs/data-sources/lex_resource_policy.md index 9b52c026d..17a463dbd 100644 --- a/docs/data-sources/lex_resource_policy.md +++ b/docs/data-sources/lex_resource_policy.md @@ -23,4 +23,5 @@ Data Source schema for AWS::Lex::ResourcePolicy - `policy` (String) A resource policy to add to the resource. The policy is a JSON structure following the IAM syntax that contains one or more statements that define the policy. - `resource_arn` (String) The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to. +- `resource_policy_id` (String) The Physical ID of the resource policy. - `revision_id` (String) The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource. diff --git a/docs/data-sources/macie_allow_list.md b/docs/data-sources/macie_allow_list.md index 9a086fedd..c70986c1f 100644 --- a/docs/data-sources/macie_allow_list.md +++ b/docs/data-sources/macie_allow_list.md @@ -21,6 +21,7 @@ Data Source schema for AWS::Macie::AllowList ### Read-Only +- `allow_list_id` (String) AllowList ID. - `arn` (String) AllowList ARN. - `criteria` (Attributes) AllowList criteria. (see [below for nested schema](#nestedatt--criteria)) - `description` (String) Description of AllowList. diff --git a/docs/data-sources/macie_custom_data_identifier.md b/docs/data-sources/macie_custom_data_identifier.md index e42551482..321984c58 100644 --- a/docs/data-sources/macie_custom_data_identifier.md +++ b/docs/data-sources/macie_custom_data_identifier.md @@ -22,6 +22,7 @@ Data Source schema for AWS::Macie::CustomDataIdentifier ### Read-Only - `arn` (String) Custom data identifier ARN. +- `custom_data_identifier_id` (String) Custom data identifier ID. - `description` (String) Description of custom data identifier. - `ignore_words` (List of String) Words to be ignored. - `keywords` (List of String) Keywords to be matched against. diff --git a/docs/data-sources/macie_findings_filter.md b/docs/data-sources/macie_findings_filter.md index 367cd0562..a22756531 100644 --- a/docs/data-sources/macie_findings_filter.md +++ b/docs/data-sources/macie_findings_filter.md @@ -25,6 +25,7 @@ Data Source schema for AWS::Macie::FindingsFilter - `arn` (String) Findings filter ARN. - `description` (String) Findings filter description - `finding_criteria` (Attributes) Findings filter criteria. (see [below for nested schema](#nestedatt--finding_criteria)) +- `findings_filter_id` (String) Findings filter ID. - `name` (String) Findings filter name - `position` (Number) Findings filter position. - `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/managedblockchain_accessor.md b/docs/data-sources/managedblockchain_accessor.md index 0610b5467..b2e3eb7ff 100644 --- a/docs/data-sources/managedblockchain_accessor.md +++ b/docs/data-sources/managedblockchain_accessor.md @@ -21,6 +21,7 @@ Data Source schema for AWS::ManagedBlockchain::Accessor ### Read-Only +- `accessor_id` (String) - `accessor_type` (String) - `arn` (String) - `billing_token` (String) diff --git a/docs/data-sources/medialive_multiplex.md b/docs/data-sources/medialive_multiplex.md index 846a68281..97d25671b 100644 --- a/docs/data-sources/medialive_multiplex.md +++ b/docs/data-sources/medialive_multiplex.md @@ -24,6 +24,7 @@ Data Source schema for AWS::MediaLive::Multiplex - `arn` (String) The unique arn of the multiplex. - `availability_zones` (List of String) A list of availability zones for the multiplex. - `destinations` (Attributes List) A list of the multiplex output destinations. (see [below for nested schema](#nestedatt--destinations)) +- `multiplex_id` (String) The unique id of the multiplex. - `multiplex_settings` (Attributes) Configuration for a multiplex event. (see [below for nested schema](#nestedatt--multiplex_settings)) - `name` (String) Name of multiplex. - `pipelines_running_count` (Number) The number of currently healthy pipelines. diff --git a/docs/data-sources/mediapackage_asset.md b/docs/data-sources/mediapackage_asset.md index e69aa2c38..e9871dbdd 100644 --- a/docs/data-sources/mediapackage_asset.md +++ b/docs/data-sources/mediapackage_asset.md @@ -22,6 +22,7 @@ Data Source schema for AWS::MediaPackage::Asset ### Read-Only - `arn` (String) The ARN of the Asset. +- `asset_id` (String) The unique identifier for the Asset. - `created_at` (String) The time the Asset was initially submitted for Ingest. - `egress_endpoints` (Attributes List) The list of egress endpoints available for the Asset. (see [below for nested schema](#nestedatt--egress_endpoints)) - `packaging_group_id` (String) The ID of the PackagingGroup for the Asset. diff --git a/docs/data-sources/mediapackage_channel.md b/docs/data-sources/mediapackage_channel.md deleted file mode 100644 index 58b4d84a9..000000000 --- a/docs/data-sources/mediapackage_channel.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_mediapackage_channel Data Source - terraform-provider-awscc" -subcategory: "" -description: |- - Data Source schema for AWS::MediaPackage::Channel ---- - -# awscc_mediapackage_channel (Data Source) - -Data Source schema for AWS::MediaPackage::Channel - - - - -## Schema - -### Required - -- `id` (String) Uniquely identifies the resource. - -### Read-Only - -- `arn` (String) The Amazon Resource Name (ARN) assigned to the Channel. -- `description` (String) A short text description of the Channel. -- `egress_access_logs` (Attributes) The configuration parameters for egress access logging. (see [below for nested schema](#nestedatt--egress_access_logs)) -- `hls_ingest` (Attributes) An HTTP Live Streaming (HLS) ingest resource configuration. (see [below for nested schema](#nestedatt--hls_ingest)) -- `ingress_access_logs` (Attributes) The configuration parameters for egress access logging. (see [below for nested schema](#nestedatt--ingress_access_logs)) -- `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) - - -### Nested Schema for `egress_access_logs` - -Read-Only: - -- `log_group_name` (String) Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs. - - - -### Nested Schema for `hls_ingest` - -Read-Only: - -- `ingest_endpoints` (Attributes List) A list of endpoints to which the source stream should be sent. (see [below for nested schema](#nestedatt--hls_ingest--ingest_endpoints)) - - -### Nested Schema for `hls_ingest.ingest_endpoints` - -Read-Only: - -- `id` (String) The system generated unique identifier for the IngestEndpoint -- `password` (String) The system generated password for ingest authentication. -- `url` (String) The ingest URL to which the source stream should be sent. -- `username` (String) The system generated username for ingest authentication. - - - - -### Nested Schema for `ingress_access_logs` - -Read-Only: - -- `log_group_name` (String) Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs. - - - -### Nested Schema for `tags` - -Read-Only: - -- `key` (String) -- `value` (String) diff --git a/docs/data-sources/mediapackage_origin_endpoint.md b/docs/data-sources/mediapackage_origin_endpoint.md deleted file mode 100644 index bd63418ee..000000000 --- a/docs/data-sources/mediapackage_origin_endpoint.md +++ /dev/null @@ -1,305 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_mediapackage_origin_endpoint Data Source - terraform-provider-awscc" -subcategory: "" -description: |- - Data Source schema for AWS::MediaPackage::OriginEndpoint ---- - -# awscc_mediapackage_origin_endpoint (Data Source) - -Data Source schema for AWS::MediaPackage::OriginEndpoint - - - - -## Schema - -### Required - -- `id` (String) Uniquely identifies the resource. - -### Read-Only - -- `arn` (String) The Amazon Resource Name (ARN) assigned to the OriginEndpoint. -- `authorization` (Attributes) CDN Authorization credentials (see [below for nested schema](#nestedatt--authorization)) -- `channel_id` (String) The ID of the Channel the OriginEndpoint is associated with. -- `cmaf_package` (Attributes) A Common Media Application Format (CMAF) packaging configuration. (see [below for nested schema](#nestedatt--cmaf_package)) -- `dash_package` (Attributes) A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. (see [below for nested schema](#nestedatt--dash_package)) -- `description` (String) A short text description of the OriginEndpoint. -- `hls_package` (Attributes) An HTTP Live Streaming (HLS) packaging configuration. (see [below for nested schema](#nestedatt--hls_package)) -- `manifest_name` (String) A short string appended to the end of the OriginEndpoint URL. -- `mss_package` (Attributes) A Microsoft Smooth Streaming (MSS) packaging configuration. (see [below for nested schema](#nestedatt--mss_package)) -- `origination` (String) Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination -- `startover_window_seconds` (Number) Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint. -- `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) -- `time_delay_seconds` (Number) Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint. -- `url` (String) The URL of the packaged OriginEndpoint for consumption. -- `whitelist` (List of String) A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint. - - -### Nested Schema for `authorization` - -Read-Only: - -- `cdn_identifier_secret` (String) The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint. -- `secrets_role_arn` (String) The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager. - - - -### Nested Schema for `cmaf_package` - -Read-Only: - -- `encryption` (Attributes) A Common Media Application Format (CMAF) encryption configuration. (see [below for nested schema](#nestedatt--cmaf_package--encryption)) -- `hls_manifests` (Attributes List) A list of HLS manifest configurations (see [below for nested schema](#nestedatt--cmaf_package--hls_manifests)) -- `segment_duration_seconds` (Number) Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration. -- `segment_prefix` (String) An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--cmaf_package--stream_selection)) - - -### Nested Schema for `cmaf_package.encryption` - -Read-Only: - -- `constant_initialization_vector` (String) An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV). -- `encryption_method` (String) The encryption method used -- `key_rotation_interval_seconds` (Number) Time (in seconds) between each encryption key rotation. -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--cmaf_package--encryption--speke_key_provider)) - - -### Nested Schema for `cmaf_package.encryption.speke_key_provider` - -Read-Only: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--cmaf_package--encryption--speke_key_provider--encryption_contract_configuration)) -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - - -### Nested Schema for `cmaf_package.encryption.speke_key_provider.url` - -Read-Only: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `cmaf_package.hls_manifests` - -Read-Only: - -- `ad_markers` (String) This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0. -- `ad_triggers` (List of String) A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types. -- `ads_on_delivery_restrictions` (String) This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers. -- `id` (String) The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created. -- `include_iframe_only_stream` (Boolean) When enabled, an I-Frame only stream will be included in the output. -- `manifest_name` (String) An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint. -- `playlist_type` (String) The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist. -- `playlist_window_seconds` (Number) Time window (in seconds) contained in each parent manifest. -- `program_date_time_interval_seconds` (Number) The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output. -- `url` (String) The URL of the packaged OriginEndpoint for consumption. - - - -### Nested Schema for `cmaf_package.stream_selection` - -Read-Only: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `dash_package` - -Read-Only: - -- `ad_triggers` (List of String) A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types. -- `ads_on_delivery_restrictions` (String) This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers. -- `encryption` (Attributes) A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. (see [below for nested schema](#nestedatt--dash_package--encryption)) -- `include_iframe_only_stream` (Boolean) When enabled, an I-Frame only stream will be included in the output. -- `manifest_layout` (String) Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level. -- `manifest_window_seconds` (Number) Time window (in seconds) contained in each manifest. -- `min_buffer_time_seconds` (Number) Minimum duration (in seconds) that a player will buffer media before starting the presentation. -- `min_update_period_seconds` (Number) Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD). -- `period_triggers` (List of String) A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers. -- `profile` (String) The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. -- `segment_duration_seconds` (Number) Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration. -- `segment_template_format` (String) Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--dash_package--stream_selection)) -- `suggested_presentation_delay_seconds` (Number) Duration (in seconds) to delay live content before presentation. -- `utc_timing` (String) Determines the type of UTCTiming included in the Media Presentation Description (MPD) -- `utc_timing_uri` (String) Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE - - -### Nested Schema for `dash_package.encryption` - -Read-Only: - -- `key_rotation_interval_seconds` (Number) Time (in seconds) between each encryption key rotation. -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--dash_package--encryption--speke_key_provider)) - - -### Nested Schema for `dash_package.encryption.speke_key_provider` - -Read-Only: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--dash_package--encryption--speke_key_provider--encryption_contract_configuration)) -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - - -### Nested Schema for `dash_package.encryption.speke_key_provider.url` - -Read-Only: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `dash_package.stream_selection` - -Read-Only: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `hls_package` - -Read-Only: - -- `ad_markers` (String) This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0. -- `ad_triggers` (List of String) A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types. -- `ads_on_delivery_restrictions` (String) This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers. -- `encryption` (Attributes) An HTTP Live Streaming (HLS) encryption configuration. (see [below for nested schema](#nestedatt--hls_package--encryption)) -- `include_dvb_subtitles` (Boolean) When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output. -- `include_iframe_only_stream` (Boolean) When enabled, an I-Frame only stream will be included in the output. -- `playlist_type` (String) The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist. -- `playlist_window_seconds` (Number) Time window (in seconds) contained in each parent manifest. -- `program_date_time_interval_seconds` (Number) The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output. -- `segment_duration_seconds` (Number) Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--hls_package--stream_selection)) -- `use_audio_rendition_group` (Boolean) When enabled, audio streams will be placed in rendition groups in the output. - - -### Nested Schema for `hls_package.encryption` - -Read-Only: - -- `constant_initialization_vector` (String) A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated. -- `encryption_method` (String) The encryption method to use. -- `key_rotation_interval_seconds` (Number) Interval (in seconds) between each encryption key rotation. -- `repeat_ext_x_key` (Boolean) When enabled, the EXT-X-KEY tag will be repeated in output manifests. -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--hls_package--encryption--speke_key_provider)) - - -### Nested Schema for `hls_package.encryption.speke_key_provider` - -Read-Only: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--hls_package--encryption--speke_key_provider--encryption_contract_configuration)) -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - - -### Nested Schema for `hls_package.encryption.speke_key_provider.url` - -Read-Only: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `hls_package.stream_selection` - -Read-Only: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `mss_package` - -Read-Only: - -- `encryption` (Attributes) A Microsoft Smooth Streaming (MSS) encryption configuration. (see [below for nested schema](#nestedatt--mss_package--encryption)) -- `manifest_window_seconds` (Number) The time window (in seconds) contained in each manifest. -- `segment_duration_seconds` (Number) The duration (in seconds) of each segment. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--mss_package--stream_selection)) - - -### Nested Schema for `mss_package.encryption` - -Read-Only: - -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--mss_package--encryption--speke_key_provider)) - - -### Nested Schema for `mss_package.encryption.speke_key_provider` - -Read-Only: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--mss_package--encryption--speke_key_provider--encryption_contract_configuration)) -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - - -### Nested Schema for `mss_package.encryption.speke_key_provider.url` - -Read-Only: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `mss_package.stream_selection` - -Read-Only: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `tags` - -Read-Only: - -- `key` (String) -- `value` (String) diff --git a/docs/data-sources/mediapackage_packaging_configuration.md b/docs/data-sources/mediapackage_packaging_configuration.md index 7c3f73bc0..ad96b79d8 100644 --- a/docs/data-sources/mediapackage_packaging_configuration.md +++ b/docs/data-sources/mediapackage_packaging_configuration.md @@ -26,6 +26,7 @@ Data Source schema for AWS::MediaPackage::PackagingConfiguration - `dash_package` (Attributes) A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. (see [below for nested schema](#nestedatt--dash_package)) - `hls_package` (Attributes) An HTTP Live Streaming (HLS) packaging configuration. (see [below for nested schema](#nestedatt--hls_package)) - `mss_package` (Attributes) A Microsoft Smooth Streaming (MSS) PackagingConfiguration. (see [below for nested schema](#nestedatt--mss_package)) +- `packaging_configuration_id` (String) The ID of the PackagingConfiguration. - `packaging_group_id` (String) The ID of a PackagingGroup. - `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/mediapackage_packaging_group.md b/docs/data-sources/mediapackage_packaging_group.md index 3d97df82e..6e6592a93 100644 --- a/docs/data-sources/mediapackage_packaging_group.md +++ b/docs/data-sources/mediapackage_packaging_group.md @@ -25,6 +25,7 @@ Data Source schema for AWS::MediaPackage::PackagingGroup - `authorization` (Attributes) CDN Authorization (see [below for nested schema](#nestedatt--authorization)) - `domain_name` (String) The fully qualified domain name for Assets in the PackagingGroup. - `egress_access_logs` (Attributes) The configuration parameters for egress access logging. (see [below for nested schema](#nestedatt--egress_access_logs)) +- `packaging_group_id` (String) The ID of the PackagingGroup. - `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/networkmanager_global_network.md b/docs/data-sources/networkmanager_global_network.md index e3140060a..01e5e75a9 100644 --- a/docs/data-sources/networkmanager_global_network.md +++ b/docs/data-sources/networkmanager_global_network.md @@ -24,6 +24,7 @@ Data Source schema for AWS::NetworkManager::GlobalNetwork - `arn` (String) The Amazon Resource Name (ARN) of the global network. - `created_at` (String) The date and time that the global network was created. - `description` (String) The description of the global network. +- `global_network_id` (String) The ID of the global network. - `state` (String) The state of the global network. - `tags` (Attributes Set) The tags for the global network. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/omics_run_group.md b/docs/data-sources/omics_run_group.md index 0e94bcc20..e31d0884c 100644 --- a/docs/data-sources/omics_run_group.md +++ b/docs/data-sources/omics_run_group.md @@ -28,4 +28,5 @@ Data Source schema for AWS::Omics::RunGroup - `max_gpus` (Number) - `max_runs` (Number) - `name` (String) +- `run_group_id` (String) - `tags` (Map of String) A map of resource tags diff --git a/docs/data-sources/omics_variant_store.md b/docs/data-sources/omics_variant_store.md new file mode 100644 index 000000000..c93bce54a --- /dev/null +++ b/docs/data-sources/omics_variant_store.md @@ -0,0 +1,51 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_omics_variant_store Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::Omics::VariantStore +--- + +# awscc_omics_variant_store (Data Source) + +Data Source schema for AWS::Omics::VariantStore + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `creation_time` (String) +- `description` (String) +- `name` (String) +- `reference` (Attributes) (see [below for nested schema](#nestedatt--reference)) +- `sse_config` (Attributes) (see [below for nested schema](#nestedatt--sse_config)) +- `status` (String) +- `status_message` (String) +- `store_arn` (String) +- `store_size_bytes` (Number) +- `tags` (Map of String) +- `update_time` (String) +- `variant_store_id` (String) + + +### Nested Schema for `reference` + +Read-Only: + +- `reference_arn` (String) + + + +### Nested Schema for `sse_config` + +Read-Only: + +- `key_arn` (String) +- `type` (String) diff --git a/docs/data-sources/omics_variant_stores.md b/docs/data-sources/omics_variant_stores.md new file mode 100644 index 000000000..644c31289 --- /dev/null +++ b/docs/data-sources/omics_variant_stores.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_omics_variant_stores Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::Omics::VariantStore +--- + +# awscc_omics_variant_stores (Data Source) + +Plural Data Source schema for AWS::Omics::VariantStore + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/omics_workflow.md b/docs/data-sources/omics_workflow.md index 379e9db22..8fdcc3e00 100644 --- a/docs/data-sources/omics_workflow.md +++ b/docs/data-sources/omics_workflow.md @@ -34,6 +34,7 @@ Data Source schema for AWS::Omics::Workflow - `storage_capacity` (Number) - `tags` (Map of String) A map of resource tags - `type` (String) +- `workflow_id` (String) ### Nested Schema for `parameter_template` diff --git a/docs/data-sources/opensearchserverless_collection.md b/docs/data-sources/opensearchserverless_collection.md index fd16e55f5..d040722d5 100644 --- a/docs/data-sources/opensearchserverless_collection.md +++ b/docs/data-sources/opensearchserverless_collection.md @@ -23,6 +23,7 @@ Data Source schema for AWS::OpenSearchServerless::Collection - `arn` (String) The Amazon Resource Name (ARN) of the collection. - `collection_endpoint` (String) The endpoint for the collection. +- `collection_id` (String) The identifier of the collection - `dashboard_endpoint` (String) The OpenSearch Dashboards endpoint for the collection. - `description` (String) The description of the collection - `name` (String) The name of the collection. diff --git a/docs/data-sources/opensearchserverless_security_config.md b/docs/data-sources/opensearchserverless_security_config.md index 466df2eb3..6c37cead7 100644 --- a/docs/data-sources/opensearchserverless_security_config.md +++ b/docs/data-sources/opensearchserverless_security_config.md @@ -24,6 +24,7 @@ Data Source schema for AWS::OpenSearchServerless::SecurityConfig - `description` (String) Security config description - `name` (String) The friendly name of the security config - `saml_options` (Attributes) Describes saml options in form of key value map (see [below for nested schema](#nestedatt--saml_options)) +- `security_config_id` (String) The identifier of the security config - `type` (String) Config type for security config diff --git a/docs/data-sources/opensearchserverless_vpc_endpoint.md b/docs/data-sources/opensearchserverless_vpc_endpoint.md index 0239a6ad4..a657bf002 100644 --- a/docs/data-sources/opensearchserverless_vpc_endpoint.md +++ b/docs/data-sources/opensearchserverless_vpc_endpoint.md @@ -24,4 +24,5 @@ Data Source schema for AWS::OpenSearchServerless::VpcEndpoint - `name` (String) The name of the VPC Endpoint - `security_group_ids` (List of String) The ID of one or more security groups to associate with the endpoint network interface - `subnet_ids` (List of String) The ID of one or more subnets in which to create an endpoint network interface +- `vpc_endpoint_id` (String) The identifier of the VPC Endpoint - `vpc_id` (String) The ID of the VPC in which the endpoint will be used. diff --git a/docs/data-sources/opensearchservice_domain.md b/docs/data-sources/opensearchservice_domain.md new file mode 100644 index 000000000..5369c3e9e --- /dev/null +++ b/docs/data-sources/opensearchservice_domain.md @@ -0,0 +1,264 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_opensearchservice_domain Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::OpenSearchService::Domain +--- + +# awscc_opensearchservice_domain (Data Source) + +Data Source schema for AWS::OpenSearchService::Domain + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `access_policies` (String) +- `advanced_options` (Map of String) +- `advanced_security_options` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options)) +- `arn` (String) +- `cluster_config` (Attributes) (see [below for nested schema](#nestedatt--cluster_config)) +- `cognito_options` (Attributes) (see [below for nested schema](#nestedatt--cognito_options)) +- `domain_arn` (String) +- `domain_endpoint` (String) +- `domain_endpoint_options` (Attributes) (see [below for nested schema](#nestedatt--domain_endpoint_options)) +- `domain_endpoint_v2` (String) +- `domain_endpoints` (Map of String) +- `domain_id` (String) +- `domain_name` (String) +- `ebs_options` (Attributes) (see [below for nested schema](#nestedatt--ebs_options)) +- `encryption_at_rest_options` (Attributes) (see [below for nested schema](#nestedatt--encryption_at_rest_options)) +- `engine_version` (String) +- `ip_address_type` (String) +- `log_publishing_options` (Attributes Map) (see [below for nested schema](#nestedatt--log_publishing_options)) +- `node_to_node_encryption_options` (Attributes) (see [below for nested schema](#nestedatt--node_to_node_encryption_options)) +- `off_peak_window_options` (Attributes) (see [below for nested schema](#nestedatt--off_peak_window_options)) +- `service_software_options` (Attributes) (see [below for nested schema](#nestedatt--service_software_options)) +- `snapshot_options` (Attributes) (see [below for nested schema](#nestedatt--snapshot_options)) +- `software_update_options` (Attributes) (see [below for nested schema](#nestedatt--software_update_options)) +- `tags` (Attributes List) An arbitrary set of tags (key-value pairs) for this Domain. (see [below for nested schema](#nestedatt--tags)) +- `vpc_options` (Attributes) (see [below for nested schema](#nestedatt--vpc_options)) + + +### Nested Schema for `advanced_security_options` + +Read-Only: + +- `anonymous_auth_disable_date` (String) +- `anonymous_auth_enabled` (Boolean) +- `enabled` (Boolean) +- `internal_user_database_enabled` (Boolean) +- `master_user_options` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options--master_user_options)) +- `saml_options` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options--saml_options)) + + +### Nested Schema for `advanced_security_options.master_user_options` + +Read-Only: + +- `master_user_arn` (String) +- `master_user_name` (String) +- `master_user_password` (String) + + + +### Nested Schema for `advanced_security_options.saml_options` + +Read-Only: + +- `enabled` (Boolean) +- `idp` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options--saml_options--idp)) +- `master_backend_role` (String) +- `master_user_name` (String) +- `roles_key` (String) +- `session_timeout_minutes` (Number) +- `subject_key` (String) + + +### Nested Schema for `advanced_security_options.saml_options.idp` + +Read-Only: + +- `entity_id` (String) +- `metadata_content` (String) + + + + + +### Nested Schema for `cluster_config` + +Read-Only: + +- `cold_storage_options` (Attributes) (see [below for nested schema](#nestedatt--cluster_config--cold_storage_options)) +- `dedicated_master_count` (Number) +- `dedicated_master_enabled` (Boolean) +- `dedicated_master_type` (String) +- `instance_count` (Number) +- `instance_type` (String) +- `multi_az_with_standby_enabled` (Boolean) +- `warm_count` (Number) +- `warm_enabled` (Boolean) +- `warm_type` (String) +- `zone_awareness_config` (Attributes) (see [below for nested schema](#nestedatt--cluster_config--zone_awareness_config)) +- `zone_awareness_enabled` (Boolean) + + +### Nested Schema for `cluster_config.cold_storage_options` + +Read-Only: + +- `enabled` (Boolean) + + + +### Nested Schema for `cluster_config.zone_awareness_config` + +Read-Only: + +- `availability_zone_count` (Number) + + + + +### Nested Schema for `cognito_options` + +Read-Only: + +- `enabled` (Boolean) +- `identity_pool_id` (String) +- `role_arn` (String) +- `user_pool_id` (String) + + + +### Nested Schema for `domain_endpoint_options` + +Read-Only: + +- `custom_endpoint` (String) +- `custom_endpoint_certificate_arn` (String) +- `custom_endpoint_enabled` (Boolean) +- `enforce_https` (Boolean) +- `tls_security_policy` (String) + + + +### Nested Schema for `ebs_options` + +Read-Only: + +- `ebs_enabled` (Boolean) +- `iops` (Number) +- `throughput` (Number) +- `volume_size` (Number) +- `volume_type` (String) + + + +### Nested Schema for `encryption_at_rest_options` + +Read-Only: + +- `enabled` (Boolean) +- `kms_key_id` (String) + + + +### Nested Schema for `log_publishing_options` + +Read-Only: + +- `cloudwatch_logs_log_group_arn` (String) +- `enabled` (Boolean) + + + +### Nested Schema for `node_to_node_encryption_options` + +Read-Only: + +- `enabled` (Boolean) + + + +### Nested Schema for `off_peak_window_options` + +Read-Only: + +- `enabled` (Boolean) +- `off_peak_window` (Attributes) (see [below for nested schema](#nestedatt--off_peak_window_options--off_peak_window)) + + +### Nested Schema for `off_peak_window_options.off_peak_window` + +Read-Only: + +- `window_start_time` (Attributes) (see [below for nested schema](#nestedatt--off_peak_window_options--off_peak_window--window_start_time)) + + +### Nested Schema for `off_peak_window_options.off_peak_window.window_start_time` + +Read-Only: + +- `hours` (Number) +- `minutes` (Number) + + + + + +### Nested Schema for `service_software_options` + +Read-Only: + +- `automated_update_date` (String) +- `cancellable` (Boolean) +- `current_version` (String) +- `description` (String) +- `new_version` (String) +- `optional_deployment` (Boolean) +- `update_available` (Boolean) +- `update_status` (String) + + + +### Nested Schema for `snapshot_options` + +Read-Only: + +- `automated_snapshot_start_hour` (Number) + + + +### Nested Schema for `software_update_options` + +Read-Only: + +- `auto_software_update_enabled` (Boolean) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The value of the tag. +- `value` (String) The key of the tag. + + + +### Nested Schema for `vpc_options` + +Read-Only: + +- `security_group_ids` (List of String) +- `subnet_ids` (List of String) diff --git a/docs/data-sources/opensearchservice_domains.md b/docs/data-sources/opensearchservice_domains.md new file mode 100644 index 000000000..2fd12b7fd --- /dev/null +++ b/docs/data-sources/opensearchservice_domains.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_opensearchservice_domains Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::OpenSearchService::Domain +--- + +# awscc_opensearchservice_domains (Data Source) + +Plural Data Source schema for AWS::OpenSearchService::Domain + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/opsworkscm_server.md b/docs/data-sources/opsworkscm_server.md new file mode 100644 index 000000000..049cdae9a --- /dev/null +++ b/docs/data-sources/opsworkscm_server.md @@ -0,0 +1,63 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_opsworkscm_server Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::OpsWorksCM::Server +--- + +# awscc_opsworkscm_server (Data Source) + +Data Source schema for AWS::OpsWorksCM::Server + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `associate_public_ip_address` (Boolean) +- `backup_id` (String) +- `backup_retention_count` (Number) +- `custom_certificate` (String) +- `custom_domain` (String) +- `custom_private_key` (String) +- `disable_automated_backup` (Boolean) +- `endpoint` (String) +- `engine` (String) +- `engine_attributes` (Attributes List) (see [below for nested schema](#nestedatt--engine_attributes)) +- `engine_model` (String) +- `engine_version` (String) +- `instance_profile_arn` (String) +- `instance_type` (String) +- `key_pair` (String) +- `preferred_backup_window` (String) +- `preferred_maintenance_window` (String) +- `security_group_ids` (List of String) +- `server_name` (String) +- `service_role_arn` (String) +- `subnet_ids` (List of String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `engine_attributes` + +Read-Only: + +- `name` (String) +- `value` (String) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/opsworkscm_servers.md b/docs/data-sources/opsworkscm_servers.md new file mode 100644 index 000000000..b509caa2a --- /dev/null +++ b/docs/data-sources/opsworkscm_servers.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_opsworkscm_servers Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::OpsWorksCM::Server +--- + +# awscc_opsworkscm_servers (Data Source) + +Plural Data Source schema for AWS::OpsWorksCM::Server + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/organizations_organization.md b/docs/data-sources/organizations_organization.md index 789256d79..5a3a4f53c 100644 --- a/docs/data-sources/organizations_organization.md +++ b/docs/data-sources/organizations_organization.md @@ -26,4 +26,5 @@ Data Source schema for AWS::Organizations::Organization - `management_account_arn` (String) The Amazon Resource Name (ARN) of the account that is designated as the management account for the organization. - `management_account_email` (String) The email address that is associated with the AWS account that is designated as the management account for the organization. - `management_account_id` (String) The unique identifier (ID) of the management account of an organization. +- `organization_id` (String) The unique identifier (ID) of an organization. - `root_id` (String) The unique identifier (ID) for the root. diff --git a/docs/data-sources/organizations_organizational_unit.md b/docs/data-sources/organizations_organizational_unit.md index 9d211d344..bf62b36c6 100644 --- a/docs/data-sources/organizations_organizational_unit.md +++ b/docs/data-sources/organizations_organizational_unit.md @@ -23,6 +23,7 @@ Data Source schema for AWS::Organizations::OrganizationalUnit - `arn` (String) The Amazon Resource Name (ARN) of this OU. - `name` (String) The friendly name of this OU. +- `organizational_unit_id` (String) The unique identifier (ID) associated with this OU. - `parent_id` (String) The unique identifier (ID) of the parent root or OU that you want to create the new OU in. - `tags` (Attributes Set) A list of tags that you want to attach to the newly created OU. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/organizations_policy.md b/docs/data-sources/organizations_policy.md index 6cadf5618..693b5764b 100644 --- a/docs/data-sources/organizations_policy.md +++ b/docs/data-sources/organizations_policy.md @@ -26,6 +26,7 @@ Data Source schema for AWS::Organizations::Policy - `content` (String) The Policy text content. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it. - `description` (String) Human readable description of the policy - `name` (String) Name of the Policy +- `policy_id` (String) Id of the Policy - `tags` (Attributes Set) A list of tags that you want to attach to the newly created policy. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. (see [below for nested schema](#nestedatt--tags)) - `target_ids` (Set of String) List of unique identifiers (IDs) of the root, OU, or account that you want to attach the policy to - `type` (String) The type of policy to create. You can specify one of the following values: AISERVICES_OPT_OUT_POLICY, BACKUP_POLICY, SERVICE_CONTROL_POLICY, TAG_POLICY diff --git a/docs/data-sources/organizations_resource_policy.md b/docs/data-sources/organizations_resource_policy.md index a65d1e8d5..6636c3111 100644 --- a/docs/data-sources/organizations_resource_policy.md +++ b/docs/data-sources/organizations_resource_policy.md @@ -23,6 +23,7 @@ Data Source schema for AWS::Organizations::ResourcePolicy - `arn` (String) The Amazon Resource Name (ARN) of the resource policy. - `content` (String) The policy document. For AWS CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. AWS CloudFormation always converts a YAML policy to JSON format before submitting it. +- `resource_policy_id` (String) The unique identifier (ID) associated with this resource policy. - `tags` (Attributes Set) A list of tags that you want to attach to the resource policy (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/proton_environment_account_connection.md b/docs/data-sources/proton_environment_account_connection.md new file mode 100644 index 000000000..0c63c9ee5 --- /dev/null +++ b/docs/data-sources/proton_environment_account_connection.md @@ -0,0 +1,43 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_proton_environment_account_connection Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::Proton::EnvironmentAccountConnection +--- + +# awscc_proton_environment_account_connection (Data Source) + +Data Source schema for AWS::Proton::EnvironmentAccountConnection + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) The Amazon Resource Name (ARN) of the environment account connection. +- `codebuild_role_arn` (String) The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account. +- `component_role_arn` (String) The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account. +- `environment_account_connection_id` (String) The ID of the environment account connection. +- `environment_account_id` (String) The environment account that's connected to the environment account connection. +- `environment_name` (String) The name of the AWS Proton environment that's created in the associated management account. +- `management_account_id` (String) The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account. +- `role_arn` (String) The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account. +- `status` (String) The status of the environment account connection. +- `tags` (Attributes Set)

An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.

+

For more information, see Proton resources and tagging in the + Proton User Guide.

(see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String)

The key of the resource tag.

+- `value` (String)

The value of the resource tag.

diff --git a/docs/data-sources/proton_environment_account_connections.md b/docs/data-sources/proton_environment_account_connections.md new file mode 100644 index 000000000..4fc09d904 --- /dev/null +++ b/docs/data-sources/proton_environment_account_connections.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_proton_environment_account_connections Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::Proton::EnvironmentAccountConnection +--- + +# awscc_proton_environment_account_connections (Data Source) + +Plural Data Source schema for AWS::Proton::EnvironmentAccountConnection + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/qldb_stream.md b/docs/data-sources/qldb_stream.md index 9281dcc40..63cf9c7b4 100644 --- a/docs/data-sources/qldb_stream.md +++ b/docs/data-sources/qldb_stream.md @@ -27,6 +27,7 @@ Data Source schema for AWS::QLDB::Stream - `kinesis_configuration` (Attributes) (see [below for nested schema](#nestedatt--kinesis_configuration)) - `ledger_name` (String) - `role_arn` (String) +- `stream_id` (String) - `stream_name` (String) - `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/redshift_cluster.md b/docs/data-sources/redshift_cluster.md new file mode 100644 index 000000000..e0def7c6d --- /dev/null +++ b/docs/data-sources/redshift_cluster.md @@ -0,0 +1,118 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_redshift_cluster Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::Redshift::Cluster +--- + +# awscc_redshift_cluster (Data Source) + +Data Source schema for AWS::Redshift::Cluster + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `allow_version_upgrade` (Boolean) Major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default value is True +- `aqua_configuration_status` (String) The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values include the following. + +enabled - Use AQUA if it is available for the current Region and Amazon Redshift node type. +disabled - Don't use AQUA. +auto - Amazon Redshift determines whether to use AQUA. +- `automated_snapshot_retention_period` (Number) The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Default value is 1 +- `availability_zone` (String) The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint +- `availability_zone_relocation` (Boolean) The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster modification is complete. +- `availability_zone_relocation_status` (String) The availability zone relocation status of the cluster +- `classic` (Boolean) A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false , the resize type is elastic. +- `cluster_identifier` (String) A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account +- `cluster_namespace_arn` (String) The Amazon Resource Name (ARN) of the cluster namespace. +- `cluster_parameter_group_name` (String) The name of the parameter group to be associated with this cluster. +- `cluster_security_groups` (List of String) A list of security groups to be associated with this cluster. +- `cluster_subnet_group_name` (String) The name of a cluster subnet group to be associated with this cluster. +- `cluster_type` (String) The type of the cluster. When cluster type is specified as single-node, the NumberOfNodes parameter is not required and if multi-node, the NumberOfNodes parameter is required +- `cluster_version` (String) The version of the Amazon Redshift engine software that you want to deploy on the cluster.The version selected runs on all the nodes in the cluster. +- `db_name` (String) The name of the first database to be created when the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. +- `defer_maintenance` (Boolean) A boolean indicating whether to enable the deferred maintenance window. +- `defer_maintenance_duration` (Number) An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 45 days or less. +- `defer_maintenance_end_time` (String) A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration. +- `defer_maintenance_identifier` (String) A unique identifier for the deferred maintenance window. +- `defer_maintenance_start_time` (String) A timestamp indicating the start time for the deferred maintenance window. +- `destination_region` (String) The destination AWS Region that you want to copy snapshots to. Constraints: Must be the name of a valid AWS Region. For more information, see Regions and Endpoints in the Amazon Web Services [https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region] General Reference +- `elastic_ip` (String) The Elastic IP (EIP) address for the cluster. +- `encrypted` (Boolean) If true, the data in the cluster is encrypted at rest. +- `endpoint` (Attributes) (see [below for nested schema](#nestedatt--endpoint)) +- `enhanced_vpc_routing` (Boolean) An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide. + +If this option is true , enhanced VPC routing is enabled. + +Default: false +- `hsm_client_certificate_identifier` (String) Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM +- `hsm_configuration_identifier` (String) Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM. +- `iam_roles` (List of String) A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 50 IAM roles in a single request +- `kms_key_id` (String) The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster. +- `logging_properties` (Attributes) (see [below for nested schema](#nestedatt--logging_properties)) +- `maintenance_track_name` (String) The name for the maintenance track that you want to assign for the cluster. This name change is asynchronous. The new track name stays in the PendingModifiedValues for the cluster until the next maintenance window. When the maintenance track changes, the cluster is switched to the latest cluster release available for the maintenance track. At this point, the maintenance track name is applied. +- `manage_master_password` (Boolean) A boolean indicating if the redshift cluster's admin user credentials is managed by Redshift or not. You can't use MasterUserPassword if ManageMasterPassword is true. If ManageMasterPassword is false or not set, Amazon Redshift uses MasterUserPassword for the admin user account's password. +- `manual_snapshot_retention_period` (Number) The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely. + +The value must be either -1 or an integer between 1 and 3,653. +- `master_password_secret_arn` (String) The Amazon Resource Name (ARN) for the cluster's admin user credentials secret. +- `master_password_secret_kms_key_id` (String) The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin user credentials secret. +- `master_user_password` (String) The password associated with the master user account for the cluster that is being created. You can't use MasterUserPassword if ManageMasterPassword is true. Password must be between 8 and 64 characters in length, should have at least one uppercase letter.Must contain at least one lowercase letter.Must contain one number.Can be any printable ASCII character. +- `master_username` (String) The user name associated with the master user account for the cluster that is being created. The user name can't be PUBLIC and first character must be a letter. +- `multi_az` (Boolean) A boolean indicating if the redshift cluster is multi-az or not. If you don't provide this parameter or set the value to false, the redshift cluster will be single-az. +- `namespace_resource_policy` (String) The namespace resource policy document that will be attached to a Redshift cluster. +- `node_type` (String) The node type to be provisioned for the cluster.Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge +- `number_of_nodes` (Number) The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node. +- `owner_account` (String) +- `port` (Number) The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings +- `preferred_maintenance_window` (String) The weekly time range (in UTC) during which automated cluster maintenance can occur. +- `publicly_accessible` (Boolean) If true, the cluster can be accessed from a public network. +- `resource_action` (String) The Redshift operation to be performed. Resource Action supports pause-cluster, resume-cluster, failover-primary-compute APIs +- `revision_target` (String) The identifier of the database revision. You can retrieve this value from the response to the DescribeClusterDbRevisions request. +- `rotate_encryption_key` (Boolean) A boolean indicating if we want to rotate Encryption Keys. +- `snapshot_cluster_identifier` (String) The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name. +- `snapshot_copy_grant_name` (String) The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region. +- `snapshot_copy_manual` (Boolean) Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots. +- `snapshot_copy_retention_period` (Number) The number of days to retain automated snapshots in the destination region after they are copied from the source region. + + Default is 7. + + Constraints: Must be at least 1 and no more than 35. +- `snapshot_identifier` (String) The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive. +- `tags` (Attributes List) The list of tags for the cluster parameter group. (see [below for nested schema](#nestedatt--tags)) +- `vpc_security_group_ids` (List of String) A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster. + + +### Nested Schema for `endpoint` + +Read-Only: + +- `address` (String) +- `port` (String) + + + +### Nested Schema for `logging_properties` + +Read-Only: + +- `bucket_name` (String) +- `s3_key_prefix` (String) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/redshift_clusters.md b/docs/data-sources/redshift_clusters.md new file mode 100644 index 000000000..b99cb511a --- /dev/null +++ b/docs/data-sources/redshift_clusters.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_redshift_clusters Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::Redshift::Cluster +--- + +# awscc_redshift_clusters (Data Source) + +Plural Data Source schema for AWS::Redshift::Cluster + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/route53_cidr_collection.md b/docs/data-sources/route53_cidr_collection.md index 486ea92a9..7f65f4a39 100644 --- a/docs/data-sources/route53_cidr_collection.md +++ b/docs/data-sources/route53_cidr_collection.md @@ -22,6 +22,7 @@ Data Source schema for AWS::Route53::CidrCollection ### Read-Only - `arn` (String) The Amazon resource name (ARN) to uniquely identify the AWS resource. +- `cidr_collection_id` (String) UUID of the CIDR collection. - `locations` (Attributes Set) A complex type that contains information about the list of CIDR locations. (see [below for nested schema](#nestedatt--locations)) - `name` (String) A unique name for the CIDR collection. diff --git a/docs/data-sources/route53_hosted_zone.md b/docs/data-sources/route53_hosted_zone.md index 2ef9ad780..15e2db42b 100644 --- a/docs/data-sources/route53_hosted_zone.md +++ b/docs/data-sources/route53_hosted_zone.md @@ -23,6 +23,7 @@ Data Source schema for AWS::Route53::HostedZone - `hosted_zone_config` (Attributes) A complex type that contains an optional comment. If you don't want to specify a comment, omit the ``HostedZoneConfig`` and ``Comment`` elements. (see [below for nested schema](#nestedatt--hosted_zone_config)) +- `hosted_zone_id` (String) - `hosted_zone_tags` (Attributes Set) Adds, edits, or deletes tags for a health check or a hosted zone. For information about using tags for cost allocation, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) in the *User Guide*. (see [below for nested schema](#nestedatt--hosted_zone_tags)) - `name` (String) The name of the domain. Specify a fully qualified domain name, for example, *www.example.com*. The trailing dot is optional; Amazon Route 53 assumes that the domain name is fully qualified. This means that Route 53 treats *www.example.com* (without a trailing dot) and *www.example.com.* (with a trailing dot) as identical. diff --git a/docs/data-sources/route53resolver_firewall_domain_list.md b/docs/data-sources/route53resolver_firewall_domain_list.md index aede7628c..e4f24e9f3 100644 --- a/docs/data-sources/route53resolver_firewall_domain_list.md +++ b/docs/data-sources/route53resolver_firewall_domain_list.md @@ -27,6 +27,7 @@ Data Source schema for AWS::Route53Resolver::FirewallDomainList - `domain_count` (Number) Count - `domain_file_url` (String) S3 URL to import domains from. - `domains` (List of String) An inline list of domains to use for this domain list. +- `firewall_domain_list_id` (String) ResourceId - `managed_owner_name` (String) ServicePrincipal - `modification_time` (String) Rfc3339TimeString - `name` (String) FirewallDomainListName diff --git a/docs/data-sources/route53resolver_firewall_rule_group.md b/docs/data-sources/route53resolver_firewall_rule_group.md index da1868d03..859c8d9d8 100644 --- a/docs/data-sources/route53resolver_firewall_rule_group.md +++ b/docs/data-sources/route53resolver_firewall_rule_group.md @@ -24,6 +24,7 @@ Data Source schema for AWS::Route53Resolver::FirewallRuleGroup - `arn` (String) Arn - `creation_time` (String) Rfc3339TimeString - `creator_request_id` (String) The id of the creator request. +- `firewall_rule_group_id` (String) ResourceId - `firewall_rules` (Attributes Set) FirewallRules (see [below for nested schema](#nestedatt--firewall_rules)) - `modification_time` (String) Rfc3339TimeString - `name` (String) FirewallRuleGroupName diff --git a/docs/data-sources/route53resolver_firewall_rule_group_association.md b/docs/data-sources/route53resolver_firewall_rule_group_association.md index 0faf3a25a..464624927 100644 --- a/docs/data-sources/route53resolver_firewall_rule_group_association.md +++ b/docs/data-sources/route53resolver_firewall_rule_group_association.md @@ -24,6 +24,7 @@ Data Source schema for AWS::Route53Resolver::FirewallRuleGroupAssociation - `arn` (String) Arn - `creation_time` (String) Rfc3339TimeString - `creator_request_id` (String) The id of the creator request. +- `firewall_rule_group_association_id` (String) Id - `firewall_rule_group_id` (String) FirewallRuleGroupId - `managed_owner_name` (String) ServicePrincipal - `modification_time` (String) Rfc3339TimeString diff --git a/docs/data-sources/route53resolver_resolver_config.md b/docs/data-sources/route53resolver_resolver_config.md index 57ac25998..d9e84d955 100644 --- a/docs/data-sources/route53resolver_resolver_config.md +++ b/docs/data-sources/route53resolver_resolver_config.md @@ -24,4 +24,5 @@ Data Source schema for AWS::Route53Resolver::ResolverConfig - `autodefined_reverse` (String) ResolverAutodefinedReverseStatus, possible values are ENABLING, ENABLED, DISABLING AND DISABLED. - `autodefined_reverse_flag` (String) Represents the desired status of AutodefinedReverse. The only supported value on creation is DISABLE. Deletion of this resource will return AutodefinedReverse to its default value (ENABLED). - `owner_id` (String) AccountId +- `resolver_config_id` (String) Id - `resource_id` (String) ResourceId diff --git a/docs/data-sources/route53resolver_resolver_dnssec_config.md b/docs/data-sources/route53resolver_resolver_dnssec_config.md index c4e7f8222..d1a1b2f04 100644 --- a/docs/data-sources/route53resolver_resolver_dnssec_config.md +++ b/docs/data-sources/route53resolver_resolver_dnssec_config.md @@ -22,5 +22,6 @@ Data Source schema for AWS::Route53Resolver::ResolverDNSSECConfig ### Read-Only - `owner_id` (String) AccountId +- `resolver_dnssec_config_id` (String) Id - `resource_id` (String) ResourceId - `validation_status` (String) ResolverDNSSECValidationStatus, possible values are ENABLING, ENABLED, DISABLING AND DISABLED. diff --git a/docs/data-sources/route53resolver_resolver_query_logging_config.md b/docs/data-sources/route53resolver_resolver_query_logging_config.md index 634d6b764..4fa81a23a 100644 --- a/docs/data-sources/route53resolver_resolver_query_logging_config.md +++ b/docs/data-sources/route53resolver_resolver_query_logging_config.md @@ -28,5 +28,6 @@ Data Source schema for AWS::Route53Resolver::ResolverQueryLoggingConfig - `destination_arn` (String) destination arn - `name` (String) ResolverQueryLogConfigName - `owner_id` (String) AccountId +- `resolver_query_logging_config_id` (String) ResourceId - `share_status` (String) ShareStatus, possible values are NOT_SHARED, SHARED_WITH_ME, SHARED_BY_ME. - `status` (String) ResolverQueryLogConfigStatus, possible values are CREATING, CREATED, DELETED AND FAILED. diff --git a/docs/data-sources/route53resolver_resolver_query_logging_config_association.md b/docs/data-sources/route53resolver_resolver_query_logging_config_association.md index bb53f8652..3f57b04f4 100644 --- a/docs/data-sources/route53resolver_resolver_query_logging_config_association.md +++ b/docs/data-sources/route53resolver_resolver_query_logging_config_association.md @@ -25,5 +25,6 @@ Data Source schema for AWS::Route53Resolver::ResolverQueryLoggingConfigAssociati - `error` (String) ResolverQueryLogConfigAssociationError - `error_message` (String) ResolverQueryLogConfigAssociationErrorMessage - `resolver_query_log_config_id` (String) ResolverQueryLogConfigId +- `resolver_query_logging_config_association_id` (String) Id - `resource_id` (String) ResourceId - `status` (String) ResolverQueryLogConfigAssociationStatus diff --git a/docs/data-sources/rum_app_monitor.md b/docs/data-sources/rum_app_monitor.md index 7e1ca6e4d..af1ac55a7 100644 --- a/docs/data-sources/rum_app_monitor.md +++ b/docs/data-sources/rum_app_monitor.md @@ -22,6 +22,7 @@ Data Source schema for AWS::RUM::AppMonitor ### Read-Only - `app_monitor_configuration` (Attributes) AppMonitor configuration (see [below for nested schema](#nestedatt--app_monitor_configuration)) +- `app_monitor_id` (String) The unique ID of the new app monitor. - `custom_events` (Attributes) AppMonitor custom events configuration (see [below for nested schema](#nestedatt--custom_events)) - `cw_log_enabled` (Boolean) Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to CWLlong in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur CWLlong charges. If you omit this parameter, the default is false - `domain` (String) The top-level internet domain name for which your application has administrative authority. @@ -63,7 +64,7 @@ Read-Only: - `dimension_keys` (Map of String) Use this field only if you are sending the metric to CloudWatch. -This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following: +This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following: "metadata.pageId": "PageId" @@ -91,7 +92,7 @@ Example event patterns: '{ "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] } }' If the metrics destination' is CloudWatch and the event also matches a value in DimensionKeys, then the metric is published with the specified dimensions. -- `name` (String) The name for the metric that is defined in this structure. Valid values are the following: +- `name` (String) The name for the metric that is defined in this structure. For extended metrics, valid values are the following: PerformanceNavigationDuration @@ -114,6 +115,7 @@ JsErrorCount HttpErrorCount SessionCount +- `namespace` (String) The namespace used by CloudWatch Metrics for the metric that is defined in this structure - `unit_label` (String) The CloudWatch metric unit to use for this metric. If you omit this field, the metric is recorded with no unit. - `value_key` (String) The field within the event object that the metric value is sourced from. diff --git a/docs/data-sources/s3outposts_endpoint.md b/docs/data-sources/s3outposts_endpoint.md new file mode 100644 index 000000000..08ff236a2 --- /dev/null +++ b/docs/data-sources/s3outposts_endpoint.md @@ -0,0 +1,51 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_s3outposts_endpoint Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::S3Outposts::Endpoint +--- + +# awscc_s3outposts_endpoint (Data Source) + +Data Source schema for AWS::S3Outposts::Endpoint + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `access_type` (String) The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool. +- `arn` (String) The Amazon Resource Name (ARN) of the endpoint. +- `cidr_block` (String) The VPC CIDR committed by this endpoint. +- `creation_time` (String) The time the endpoint was created. +- `customer_owned_ipv_4_pool` (String) The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint. +- `endpoint_id` (String) The ID of the endpoint. +- `failed_reason` (Attributes) The failure reason, if any, for a create or delete endpoint operation. (see [below for nested schema](#nestedatt--failed_reason)) +- `network_interfaces` (Attributes Set) The network interfaces of the endpoint. (see [below for nested schema](#nestedatt--network_interfaces)) +- `outpost_id` (String) The id of the customer outpost on which the bucket resides. +- `security_group_id` (String) The ID of the security group to use with the endpoint. +- `status` (String) +- `subnet_id` (String) The ID of the subnet in the selected VPC. The subnet must belong to the Outpost. + + +### Nested Schema for `failed_reason` + +Read-Only: + +- `error_code` (String) The failure code, if any, for a create or delete endpoint operation. +- `message` (String) Additional error details describing the endpoint failure and recommended action. + + + +### Nested Schema for `network_interfaces` + +Read-Only: + +- `network_interface_id` (String) diff --git a/docs/data-sources/s3outposts_endpoints.md b/docs/data-sources/s3outposts_endpoints.md new file mode 100644 index 000000000..89745bcfc --- /dev/null +++ b/docs/data-sources/s3outposts_endpoints.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_s3outposts_endpoints Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::S3Outposts::Endpoint +--- + +# awscc_s3outposts_endpoints (Data Source) + +Plural Data Source schema for AWS::S3Outposts::Endpoint + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/secretsmanager_secret.md b/docs/data-sources/secretsmanager_secret.md index d43854caf..d602b447f 100644 --- a/docs/data-sources/secretsmanager_secret.md +++ b/docs/data-sources/secretsmanager_secret.md @@ -32,6 +32,7 @@ Data Source schema for AWS::SecretsManager::Secret The secret name can contain ASCII letters, numbers, and the following characters: /_+=.@- Do not end your secret name with a hyphen followed by six characters. If you do so, you risk confusion and unexpected results when searching for a secret by partial ARN. Secrets Manager automatically adds a hyphen and six random characters after the secret name at the end of the ARN. - `replica_regions` (Attributes List) A custom type that specifies a ``Region`` and the ``KmsKeyId`` for a replica secret. (see [below for nested schema](#nestedatt--replica_regions)) +- `secret_id` (String) - `secret_string` (String) The text to encrypt and store in the secret. We recommend you use a JSON structure of key/value pairs for your secret value. To generate a random password, use ``GenerateSecretString`` instead. If you omit both ``GenerateSecretString`` and ``SecretString``, you create an empty secret. When you make a change to this property, a new secret version is created. - `tags` (Attributes List) A list of tags to attach to the secret. Each tag is a key and value pair of strings in a JSON text string, for example: ``[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]`` diff --git a/docs/data-sources/servicecatalog_service_action.md b/docs/data-sources/servicecatalog_service_action.md index 362041fb3..71447c9c0 100644 --- a/docs/data-sources/servicecatalog_service_action.md +++ b/docs/data-sources/servicecatalog_service_action.md @@ -26,6 +26,7 @@ Data Source schema for AWS::ServiceCatalog::ServiceAction - `definition_type` (String) - `description` (String) - `name` (String) +- `service_action_id` (String) ### Nested Schema for `definition` diff --git a/docs/data-sources/servicecatalogappregistry_application.md b/docs/data-sources/servicecatalogappregistry_application.md index 3424796fa..330aec726 100644 --- a/docs/data-sources/servicecatalogappregistry_application.md +++ b/docs/data-sources/servicecatalogappregistry_application.md @@ -21,6 +21,7 @@ Data Source schema for AWS::ServiceCatalogAppRegistry::Application ### Read-Only +- `application_id` (String) - `application_name` (String) The name of the application. - `application_tag_key` (String) The key of the AWS application tag, which is awsApplication. Applications created before 11/13/2023 or applications without the AWS application tag resource group return no value. - `application_tag_value` (String) The value of the AWS application tag, which is the identifier of an associated resource. Applications created before 11/13/2023 or applications without the AWS application tag resource group return no value. diff --git a/docs/data-sources/servicecatalogappregistry_attribute_group.md b/docs/data-sources/servicecatalogappregistry_attribute_group.md index ac7a71f6b..0f6b0ff9e 100644 --- a/docs/data-sources/servicecatalogappregistry_attribute_group.md +++ b/docs/data-sources/servicecatalogappregistry_attribute_group.md @@ -22,6 +22,7 @@ Data Source schema for AWS::ServiceCatalogAppRegistry::AttributeGroup ### Read-Only - `arn` (String) +- `attribute_group_id` (String) - `attributes` (String) - `description` (String) The description of the attribute group. - `name` (String) The name of the attribute group. diff --git a/docs/data-sources/ses_configuration_set_event_destination.md b/docs/data-sources/ses_configuration_set_event_destination.md index ba906b068..1068534ab 100644 --- a/docs/data-sources/ses_configuration_set_event_destination.md +++ b/docs/data-sources/ses_configuration_set_event_destination.md @@ -21,6 +21,7 @@ Data Source schema for AWS::SES::ConfigurationSetEventDestination ### Read-Only +- `configuration_set_event_destination_id` (String) - `configuration_set_name` (String) The name of the configuration set that contains the event destination. - `event_destination` (Attributes) The event destination object. (see [below for nested schema](#nestedatt--event_destination)) diff --git a/docs/data-sources/ses_template.md b/docs/data-sources/ses_template.md index 462be5a40..d078e9bd3 100644 --- a/docs/data-sources/ses_template.md +++ b/docs/data-sources/ses_template.md @@ -22,6 +22,7 @@ Data Source schema for AWS::SES::Template ### Read-Only - `template` (Attributes) The content of the email, composed of a subject line, an HTML part, and a text-only part (see [below for nested schema](#nestedatt--template)) +- `template_id` (String) ### Nested Schema for `template` diff --git a/docs/data-sources/sns_topic.md b/docs/data-sources/sns_topic.md new file mode 100644 index 000000000..09a378422 --- /dev/null +++ b/docs/data-sources/sns_topic.md @@ -0,0 +1,75 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_sns_topic Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::SNS::Topic +--- + +# awscc_sns_topic (Data Source) + +Data Source schema for AWS::SNS::Topic + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `archive_policy` (String) The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days. +- `content_based_deduplication` (Boolean) Enables content-based deduplication for FIFO topics. + + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action. + + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message). + (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action. +- `data_protection_policy` (String) The body of the policy document you want to use for this topic. + You can only add one policy per topic. + The policy must be in JSON string format. + Length Constraints: Maximum length of 30,720. +- `delivery_status_logging` (Attributes Set) (see [below for nested schema](#nestedatt--delivery_status_logging)) +- `display_name` (String) The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs. +- `fifo_topic` (Boolean) Set to true to create a FIFO topic. +- `kms_master_key_id` (String) The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*. + This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html). +- `signature_version` (String) The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``. +- `subscription` (Attributes List) The SNS subscriptions (endpoints) for this topic. + If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted. (see [below for nested schema](#nestedatt--subscription)) +- `tags` (Attributes List) The list of tags to add to a new topic. + To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions. (see [below for nested schema](#nestedatt--tags)) +- `topic_arn` (String) +- `topic_name` (String) The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``. + If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html). + If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. +- `tracing_config` (String) Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. + + +### Nested Schema for `delivery_status_logging` + +Read-Only: + +- `failure_feedback_role_arn` (String) +- `protocol` (String) +- `success_feedback_role_arn` (String) +- `success_feedback_sample_rate` (String) + + + +### Nested Schema for `subscription` + +Read-Only: + +- `endpoint` (String) The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the ``Endpoint`` parameter of the ``Subscribe`` action in the *API Reference*. +- `protocol` (String) The subscription's protocol. For more information, see the ``Protocol`` parameter of the ``Subscribe`` action in the *API Reference*. + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The required key portion of the tag. +- `value` (String) The optional value portion of the tag. diff --git a/docs/data-sources/sns_topic_policy.md b/docs/data-sources/sns_topic_policy.md index 1f8cc2d2d..66ec68e1b 100644 --- a/docs/data-sources/sns_topic_policy.md +++ b/docs/data-sources/sns_topic_policy.md @@ -22,4 +22,5 @@ Data Source schema for AWS::SNS::TopicPolicy ### Read-Only - `policy_document` (String) A policy document that contains permissions to add to the specified SNS topics. +- `topic_policy_id` (String) - `topics` (List of String) The Amazon Resource Names (ARN) of the topics to which you want to add the policy. You can use the ``Ref`` function to specify an ``AWS::SNS::Topic`` resource. diff --git a/docs/data-sources/sns_topics.md b/docs/data-sources/sns_topics.md new file mode 100644 index 000000000..0f90ae6a7 --- /dev/null +++ b/docs/data-sources/sns_topics.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_sns_topics Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::SNS::Topic +--- + +# awscc_sns_topics (Data Source) + +Plural Data Source schema for AWS::SNS::Topic + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/ssm_patch_baseline.md b/docs/data-sources/ssm_patch_baseline.md index 37d026138..5337c7262 100644 --- a/docs/data-sources/ssm_patch_baseline.md +++ b/docs/data-sources/ssm_patch_baseline.md @@ -30,6 +30,7 @@ Data Source schema for AWS::SSM::PatchBaseline - `global_filters` (Attributes) A set of global filters used to include patches in the baseline. (see [below for nested schema](#nestedatt--global_filters)) - `name` (String) The name of the patch baseline. - `operating_system` (String) Defines the operating system the patch baseline applies to. The Default value is WINDOWS. +- `patch_baseline_id` (String) The ID of the patch baseline. - `patch_groups` (List of String) PatchGroups is used to associate instances with a specific patch baseline - `rejected_patches` (List of String) A list of explicitly rejected patches for the baseline. - `rejected_patches_action` (String) The action for Patch Manager to take on patches included in the RejectedPackages list. diff --git a/docs/data-sources/synthetics_canaries.md b/docs/data-sources/synthetics_canaries.md new file mode 100644 index 000000000..5e69c56d1 --- /dev/null +++ b/docs/data-sources/synthetics_canaries.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_synthetics_canaries Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::Synthetics::Canary +--- + +# awscc_synthetics_canaries (Data Source) + +Plural Data Source schema for AWS::Synthetics::Canary + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/synthetics_canary.md b/docs/data-sources/synthetics_canary.md new file mode 100644 index 000000000..205a8d193 --- /dev/null +++ b/docs/data-sources/synthetics_canary.md @@ -0,0 +1,126 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_synthetics_canary Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::Synthetics::Canary +--- + +# awscc_synthetics_canary (Data Source) + +Data Source schema for AWS::Synthetics::Canary + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `artifact_config` (Attributes) Provide artifact configuration (see [below for nested schema](#nestedatt--artifact_config)) +- `artifact_s3_location` (String) Provide the s3 bucket output location for test results +- `canary_id` (String) Id of the canary +- `code` (Attributes) Provide the canary script source (see [below for nested schema](#nestedatt--code)) +- `delete_lambda_resources_on_canary_deletion` (Boolean) Deletes associated lambda resources created by Synthetics if set to True. Default is False +- `execution_role_arn` (String) Lambda Execution role used to run your canaries +- `failure_retention_period` (Number) Retention period of failed canary runs represented in number of days +- `name` (String) Name of the canary. +- `run_config` (Attributes) Provide canary run configuration (see [below for nested schema](#nestedatt--run_config)) +- `runtime_version` (String) Runtime version of Synthetics Library +- `schedule` (Attributes) Frequency to run your canaries (see [below for nested schema](#nestedatt--schedule)) +- `start_canary_after_creation` (Boolean) Runs canary if set to True. Default is False +- `state` (String) State of the canary +- `success_retention_period` (Number) Retention period of successful canary runs represented in number of days +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `visual_reference` (Attributes) Visual reference configuration for visual testing (see [below for nested schema](#nestedatt--visual_reference)) +- `vpc_config` (Attributes) Provide VPC Configuration if enabled. (see [below for nested schema](#nestedatt--vpc_config)) + + +### Nested Schema for `artifact_config` + +Read-Only: + +- `s3_encryption` (Attributes) Encryption configuration for uploading artifacts to S3 (see [below for nested schema](#nestedatt--artifact_config--s3_encryption)) + + +### Nested Schema for `artifact_config.s3_encryption` + +Read-Only: + +- `encryption_mode` (String) Encryption mode for encrypting artifacts when uploading to S3. Valid values: SSE_S3 and SSE_KMS. +- `kms_key_arn` (String) KMS key Arn for encrypting artifacts when uploading to S3. You must specify KMS key Arn for SSE_KMS encryption mode only. + + + + +### Nested Schema for `code` + +Read-Only: + +- `handler` (String) +- `s3_bucket` (String) +- `s3_key` (String) +- `s3_object_version` (String) +- `script` (String) +- `source_location_arn` (String) + + + +### Nested Schema for `run_config` + +Read-Only: + +- `active_tracing` (Boolean) Enable active tracing if set to true +- `environment_variables` (Map of String) Environment variable key-value pairs. +- `memory_in_mb` (Number) Provide maximum memory available for canary in MB +- `timeout_in_seconds` (Number) Provide maximum canary timeout per run in seconds + + + +### Nested Schema for `schedule` + +Read-Only: + +- `duration_in_seconds` (String) +- `expression` (String) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + + + +### Nested Schema for `visual_reference` + +Read-Only: + +- `base_canary_run_id` (String) Canary run id to be used as base reference for visual testing +- `base_screenshots` (Attributes List) List of screenshots used as base reference for visual testing (see [below for nested schema](#nestedatt--visual_reference--base_screenshots)) + + +### Nested Schema for `visual_reference.base_screenshots` + +Read-Only: + +- `ignore_coordinates` (List of String) List of coordinates of rectangles to be ignored during visual testing +- `screenshot_name` (String) Name of the screenshot to be used as base reference for visual testing + + + + +### Nested Schema for `vpc_config` + +Read-Only: + +- `security_group_ids` (List of String) +- `subnet_ids` (List of String) +- `vpc_id` (String) diff --git a/docs/data-sources/synthetics_group.md b/docs/data-sources/synthetics_group.md new file mode 100644 index 000000000..91485f84a --- /dev/null +++ b/docs/data-sources/synthetics_group.md @@ -0,0 +1,35 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_synthetics_group Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::Synthetics::Group +--- + +# awscc_synthetics_group (Data Source) + +Data Source schema for AWS::Synthetics::Group + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `group_id` (String) Id of the group. +- `name` (String) Name of the group. +- `resource_arns` (List of String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. diff --git a/docs/data-sources/synthetics_groups.md b/docs/data-sources/synthetics_groups.md new file mode 100644 index 000000000..715639035 --- /dev/null +++ b/docs/data-sources/synthetics_groups.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_synthetics_groups Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::Synthetics::Group +--- + +# awscc_synthetics_groups (Data Source) + +Plural Data Source schema for AWS::Synthetics::Group + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_access_log_subscription.md b/docs/data-sources/vpclattice_access_log_subscription.md new file mode 100644 index 000000000..b6e2297a5 --- /dev/null +++ b/docs/data-sources/vpclattice_access_log_subscription.md @@ -0,0 +1,38 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_access_log_subscription Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::AccessLogSubscription +--- + +# awscc_vpclattice_access_log_subscription (Data Source) + +Data Source schema for AWS::VpcLattice::AccessLogSubscription + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `access_log_subscription_id` (String) +- `arn` (String) +- `destination_arn` (String) +- `resource_arn` (String) +- `resource_id` (String) +- `resource_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_access_log_subscriptions.md b/docs/data-sources/vpclattice_access_log_subscriptions.md new file mode 100644 index 000000000..3f31f4fec --- /dev/null +++ b/docs/data-sources/vpclattice_access_log_subscriptions.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_access_log_subscriptions Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::AccessLogSubscription +--- + +# awscc_vpclattice_access_log_subscriptions (Data Source) + +Plural Data Source schema for AWS::VpcLattice::AccessLogSubscription + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_listener.md b/docs/data-sources/vpclattice_listener.md new file mode 100644 index 000000000..d5931f4fb --- /dev/null +++ b/docs/data-sources/vpclattice_listener.md @@ -0,0 +1,75 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_listener Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::Listener +--- + +# awscc_vpclattice_listener (Data Source) + +Data Source schema for AWS::VpcLattice::Listener + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `default_action` (Attributes) (see [below for nested schema](#nestedatt--default_action)) +- `listener_id` (String) +- `name` (String) +- `port` (Number) +- `protocol` (String) +- `service_arn` (String) +- `service_id` (String) +- `service_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `default_action` + +Read-Only: + +- `fixed_response` (Attributes) (see [below for nested schema](#nestedatt--default_action--fixed_response)) +- `forward` (Attributes) (see [below for nested schema](#nestedatt--default_action--forward)) + + +### Nested Schema for `default_action.fixed_response` + +Read-Only: + +- `status_code` (Number) + + + +### Nested Schema for `default_action.forward` + +Read-Only: + +- `target_groups` (Attributes List) (see [below for nested schema](#nestedatt--default_action--forward--target_groups)) + + +### Nested Schema for `default_action.forward.target_groups` + +Read-Only: + +- `target_group_identifier` (String) +- `weight` (Number) + + + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_listeners.md b/docs/data-sources/vpclattice_listeners.md new file mode 100644 index 000000000..56d92d2bc --- /dev/null +++ b/docs/data-sources/vpclattice_listeners.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_listeners Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::Listener +--- + +# awscc_vpclattice_listeners (Data Source) + +Plural Data Source schema for AWS::VpcLattice::Listener + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_rule.md b/docs/data-sources/vpclattice_rule.md new file mode 100644 index 000000000..30118dfea --- /dev/null +++ b/docs/data-sources/vpclattice_rule.md @@ -0,0 +1,130 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_rule Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::Rule +--- + +# awscc_vpclattice_rule (Data Source) + +Data Source schema for AWS::VpcLattice::Rule + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `action` (Attributes) (see [below for nested schema](#nestedatt--action)) +- `arn` (String) +- `listener_identifier` (String) +- `match` (Attributes) (see [below for nested schema](#nestedatt--match)) +- `name` (String) +- `priority` (Number) +- `rule_id` (String) +- `service_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `action` + +Read-Only: + +- `fixed_response` (Attributes) (see [below for nested schema](#nestedatt--action--fixed_response)) +- `forward` (Attributes) (see [below for nested schema](#nestedatt--action--forward)) + + +### Nested Schema for `action.fixed_response` + +Read-Only: + +- `status_code` (Number) + + + +### Nested Schema for `action.forward` + +Read-Only: + +- `target_groups` (Attributes List) (see [below for nested schema](#nestedatt--action--forward--target_groups)) + + +### Nested Schema for `action.forward.target_groups` + +Read-Only: + +- `target_group_identifier` (String) +- `weight` (Number) + + + + + +### Nested Schema for `match` + +Read-Only: + +- `http_match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match)) + + +### Nested Schema for `match.http_match` + +Read-Only: + +- `header_matches` (Attributes List) (see [below for nested schema](#nestedatt--match--http_match--header_matches)) +- `method` (String) +- `path_match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match--path_match)) + + +### Nested Schema for `match.http_match.header_matches` + +Read-Only: + +- `case_sensitive` (Boolean) +- `match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match--header_matches--match)) +- `name` (String) + + +### Nested Schema for `match.http_match.header_matches.name` + +Read-Only: + +- `contains` (String) +- `exact` (String) +- `prefix` (String) + + + + +### Nested Schema for `match.http_match.path_match` + +Read-Only: + +- `case_sensitive` (Boolean) +- `match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match--path_match--match)) + + +### Nested Schema for `match.http_match.path_match.match` + +Read-Only: + +- `exact` (String) +- `prefix` (String) + + + + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_rules.md b/docs/data-sources/vpclattice_rules.md new file mode 100644 index 000000000..70affc975 --- /dev/null +++ b/docs/data-sources/vpclattice_rules.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_rules Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::Rule +--- + +# awscc_vpclattice_rules (Data Source) + +Plural Data Source schema for AWS::VpcLattice::Rule + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_service.md b/docs/data-sources/vpclattice_service.md new file mode 100644 index 000000000..55aa6f43e --- /dev/null +++ b/docs/data-sources/vpclattice_service.md @@ -0,0 +1,51 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::Service +--- + +# awscc_vpclattice_service (Data Source) + +Data Source schema for AWS::VpcLattice::Service + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `auth_type` (String) +- `certificate_arn` (String) +- `created_at` (String) +- `custom_domain_name` (String) +- `dns_entry` (Attributes) (see [below for nested schema](#nestedatt--dns_entry)) +- `last_updated_at` (String) +- `name` (String) +- `service_id` (String) +- `status` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `dns_entry` + +Read-Only: + +- `domain_name` (String) +- `hosted_zone_id` (String) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_service_network.md b/docs/data-sources/vpclattice_service_network.md new file mode 100644 index 000000000..9cce1f013 --- /dev/null +++ b/docs/data-sources/vpclattice_service_network.md @@ -0,0 +1,38 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::ServiceNetwork +--- + +# awscc_vpclattice_service_network (Data Source) + +Data Source schema for AWS::VpcLattice::ServiceNetwork + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `auth_type` (String) +- `created_at` (String) +- `last_updated_at` (String) +- `name` (String) +- `service_network_id` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_service_network_service_association.md b/docs/data-sources/vpclattice_service_network_service_association.md new file mode 100644 index 000000000..58ab16e3b --- /dev/null +++ b/docs/data-sources/vpclattice_service_network_service_association.md @@ -0,0 +1,54 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network_service_association Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::ServiceNetworkServiceAssociation +--- + +# awscc_vpclattice_service_network_service_association (Data Source) + +Data Source schema for AWS::VpcLattice::ServiceNetworkServiceAssociation + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `created_at` (String) +- `dns_entry` (Attributes) (see [below for nested schema](#nestedatt--dns_entry)) +- `service_arn` (String) +- `service_id` (String) +- `service_identifier` (String) +- `service_name` (String) +- `service_network_arn` (String) +- `service_network_id` (String) +- `service_network_identifier` (String) +- `service_network_name` (String) +- `service_network_service_association_id` (String) +- `status` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + + +### Nested Schema for `dns_entry` + +Read-Only: + +- `domain_name` (String) +- `hosted_zone_id` (String) + + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_service_network_service_associations.md b/docs/data-sources/vpclattice_service_network_service_associations.md new file mode 100644 index 000000000..6e91f2a52 --- /dev/null +++ b/docs/data-sources/vpclattice_service_network_service_associations.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network_service_associations Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::ServiceNetworkServiceAssociation +--- + +# awscc_vpclattice_service_network_service_associations (Data Source) + +Plural Data Source schema for AWS::VpcLattice::ServiceNetworkServiceAssociation + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_service_network_vpc_association.md b/docs/data-sources/vpclattice_service_network_vpc_association.md new file mode 100644 index 000000000..f25fe2db3 --- /dev/null +++ b/docs/data-sources/vpclattice_service_network_vpc_association.md @@ -0,0 +1,43 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network_vpc_association Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Data Source schema for AWS::VpcLattice::ServiceNetworkVpcAssociation +--- + +# awscc_vpclattice_service_network_vpc_association (Data Source) + +Data Source schema for AWS::VpcLattice::ServiceNetworkVpcAssociation + + + + +## Schema + +### Required + +- `id` (String) Uniquely identifies the resource. + +### Read-Only + +- `arn` (String) +- `created_at` (String) +- `security_group_ids` (Set of String) +- `service_network_arn` (String) +- `service_network_id` (String) +- `service_network_identifier` (String) +- `service_network_name` (String) +- `service_network_vpc_association_id` (String) +- `status` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) +- `vpc_id` (String) +- `vpc_identifier` (String) + + +### Nested Schema for `tags` + +Read-Only: + +- `key` (String) +- `value` (String) diff --git a/docs/data-sources/vpclattice_service_network_vpc_associations.md b/docs/data-sources/vpclattice_service_network_vpc_associations.md new file mode 100644 index 000000000..e3bdc6b34 --- /dev/null +++ b/docs/data-sources/vpclattice_service_network_vpc_associations.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network_vpc_associations Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::ServiceNetworkVpcAssociation +--- + +# awscc_vpclattice_service_network_vpc_associations (Data Source) + +Plural Data Source schema for AWS::VpcLattice::ServiceNetworkVpcAssociation + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_service_networks.md b/docs/data-sources/vpclattice_service_networks.md new file mode 100644 index 000000000..30d1b10d5 --- /dev/null +++ b/docs/data-sources/vpclattice_service_networks.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_networks Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::ServiceNetwork +--- + +# awscc_vpclattice_service_networks (Data Source) + +Plural Data Source schema for AWS::VpcLattice::ServiceNetwork + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_services.md b/docs/data-sources/vpclattice_services.md new file mode 100644 index 000000000..99545c76b --- /dev/null +++ b/docs/data-sources/vpclattice_services.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_services Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::Service +--- + +# awscc_vpclattice_services (Data Source) + +Plural Data Source schema for AWS::VpcLattice::Service + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/vpclattice_target_groups.md b/docs/data-sources/vpclattice_target_groups.md new file mode 100644 index 000000000..3d6fc8df4 --- /dev/null +++ b/docs/data-sources/vpclattice_target_groups.md @@ -0,0 +1,21 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_target_groups Data Source - terraform-provider-awscc" +subcategory: "" +description: |- + Plural Data Source schema for AWS::VpcLattice::TargetGroup +--- + +# awscc_vpclattice_target_groups (Data Source) + +Plural Data Source schema for AWS::VpcLattice::TargetGroup + + + + +## Schema + +### Read-Only + +- `id` (String) Uniquely identifies the data source. +- `ids` (Set of String) Set of Resource Identifiers. diff --git a/docs/data-sources/wafv2_ip_set.md b/docs/data-sources/wafv2_ip_set.md index 099d7c7d0..93274097f 100644 --- a/docs/data-sources/wafv2_ip_set.md +++ b/docs/data-sources/wafv2_ip_set.md @@ -25,6 +25,7 @@ Data Source schema for AWS::WAFv2::IPSet - `arn` (String) ARN of the WAF entity. - `description` (String) Description of the entity. - `ip_address_version` (String) Type of addresses in the IPSet, use IPV4 for IPV4 IP addresses, IPV6 for IPV6 address. +- `ip_set_id` (String) Id of the IPSet - `name` (String) Name of the IPSet. - `scope` (String) Use CLOUDFRONT for CloudFront IPSet, use REGIONAL for Application Load Balancer and API Gateway. - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/wafv2_regex_pattern_set.md b/docs/data-sources/wafv2_regex_pattern_set.md index eeef0148f..e4aec03e8 100644 --- a/docs/data-sources/wafv2_regex_pattern_set.md +++ b/docs/data-sources/wafv2_regex_pattern_set.md @@ -24,6 +24,7 @@ Data Source schema for AWS::WAFv2::RegexPatternSet - `arn` (String) ARN of the WAF entity. - `description` (String) Description of the entity. - `name` (String) Name of the RegexPatternSet. +- `regex_pattern_set_id` (String) Id of the RegexPatternSet - `regular_expression_list` (List of String) - `scope` (String) Use CLOUDFRONT for CloudFront RegexPatternSet, use REGIONAL for Application Load Balancer and API Gateway. - `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) diff --git a/docs/data-sources/workspacesthinclient_environment.md b/docs/data-sources/workspacesthinclient_environment.md index 535564b29..fea476abd 100644 --- a/docs/data-sources/workspacesthinclient_environment.md +++ b/docs/data-sources/workspacesthinclient_environment.md @@ -28,6 +28,7 @@ Data Source schema for AWS::WorkSpacesThinClient::Environment - `desktop_arn` (String) The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Web, or AppStream 2.0. - `desktop_endpoint` (String) The URL for the identity provider login (only for environments that use AppStream 2.0). - `desktop_type` (String) The type of VDI. +- `environment_id` (String) Unique identifier of the environment. - `kms_key_arn` (String) The Amazon Resource Name (ARN) of the AWS Key Management Service key used to encrypt the environment. - `maintenance_window` (Attributes) A specification for a time window to apply software updates. (see [below for nested schema](#nestedatt--maintenance_window)) - `name` (String) The name of the environment. diff --git a/docs/resources/apigateway_account.md b/docs/resources/apigateway_account.md index 4094ce9da..52c912654 100644 --- a/docs/resources/apigateway_account.md +++ b/docs/resources/apigateway_account.md @@ -21,7 +21,8 @@ The ``AWS::ApiGateway::Account`` resource specifies the IAM role that Amazon API ### Read-Only -- `id` (String) The ID of this resource. +- `account_id` (String) +- `id` (String) Uniquely identifies the resource. ## Import diff --git a/docs/resources/apigateway_base_path_mapping.md b/docs/resources/apigateway_base_path_mapping.md new file mode 100644 index 000000000..cf934b51c --- /dev/null +++ b/docs/resources/apigateway_base_path_mapping.md @@ -0,0 +1,38 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_apigateway_base_path_mapping Resource - terraform-provider-awscc" +subcategory: "" +description: |- + The AWS::ApiGateway::BasePathMapping resource creates a base path that clients who call your API must use in the invocation URL. +--- + +# awscc_apigateway_base_path_mapping (Resource) + +The ``AWS::ApiGateway::BasePathMapping`` resource creates a base path that clients who call your API must use in the invocation URL. + + + + +## Schema + +### Required + +- `domain_name` (String) The domain name of the BasePathMapping resource to be described. + +### Optional + +- `base_path` (String) The base path name that callers of the API must provide as part of the URL after the domain name. +- `rest_api_id` (String) The string identifier of the associated RestApi. +- `stage` (String) The name of the associated stage. + +### Read-Only + +- `id` (String) Uniquely identifies the resource. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_apigateway_base_path_mapping.example +``` diff --git a/docs/resources/apigateway_usage_plan.md b/docs/resources/apigateway_usage_plan.md index ae4091d19..a2ecc440f 100644 --- a/docs/resources/apigateway_usage_plan.md +++ b/docs/resources/apigateway_usage_plan.md @@ -28,7 +28,8 @@ The ``AWS::ApiGateway::UsagePlan`` resource creates a usage plan for deployed AP ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `usage_plan_id` (String) ### Nested Schema for `api_stages` diff --git a/docs/resources/apigateway_usage_plan_key.md b/docs/resources/apigateway_usage_plan_key.md index 1181164fb..227505c66 100644 --- a/docs/resources/apigateway_usage_plan_key.md +++ b/docs/resources/apigateway_usage_plan_key.md @@ -23,7 +23,8 @@ The ``AWS::ApiGateway::UsagePlanKey`` resource associates an API key with a usag ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `usage_plan_key_id` (String) ## Import diff --git a/docs/resources/appconfig_extension_association.md b/docs/resources/appconfig_extension_association.md index 8b0a5dfdf..8ada33c33 100644 --- a/docs/resources/appconfig_extension_association.md +++ b/docs/resources/appconfig_extension_association.md @@ -27,7 +27,8 @@ An example resource schema demonstrating some basic constructs and validation ru - `arn` (String) - `extension_arn` (String) -- `id` (String) The ID of this resource. +- `extension_association_id` (String) +- `id` (String) Uniquely identifies the resource. - `resource_arn` (String) diff --git a/docs/resources/appintegrations_application.md b/docs/resources/appintegrations_application.md new file mode 100644 index 000000000..887f2ef62 --- /dev/null +++ b/docs/resources/appintegrations_application.md @@ -0,0 +1,66 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_appintegrations_application Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS:AppIntegrations::Application +--- + +# awscc_appintegrations_application (Resource) + +Resource Type definition for AWS:AppIntegrations::Application + + + + +## Schema + +### Required + +- `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. + +### Optional + +- `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)) + +### Read-Only + +- `application_arn` (String) The Amazon Resource Name (ARN) of the application. +- `application_id` (String) The id of the application. +- `id` (String) Uniquely identifies the resource. + + +### Nested Schema for `application_source_config` + +Required: + +- `external_url_config` (Attributes) (see [below for nested schema](#nestedatt--application_source_config--external_url_config)) + + +### Nested Schema for `application_source_config.external_url_config` + +Required: + +- `access_url` (String) +- `approved_origins` (List of String) + + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) A key to identify the tag. +- `value` (String) Corresponding tag value for the key. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_appintegrations_application.example +``` diff --git a/docs/resources/applicationautoscaling_scalable_target.md b/docs/resources/applicationautoscaling_scalable_target.md new file mode 100644 index 000000000..a36da0a7f --- /dev/null +++ b/docs/resources/applicationautoscaling_scalable_target.md @@ -0,0 +1,77 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_applicationautoscaling_scalable_target Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::ApplicationAutoScaling::ScalableTarget +--- + +# awscc_applicationautoscaling_scalable_target (Resource) + +Resource Type definition for AWS::ApplicationAutoScaling::ScalableTarget + + + + +## Schema + +### Required + +- `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 +- `scalable_dimension` (String) The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property +- `service_namespace` (String) The namespace of the AWS service that provides the resource, or a custom-resource + +### Optional + +- `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. +- `scheduled_actions` (Attributes Set) The scheduled actions for the scalable target. Duplicates aren't allowed. (see [below for nested schema](#nestedatt--scheduled_actions)) +- `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)) + +### Read-Only + +- `id` (String) Uniquely identifies the resource. +- `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 + + +### Nested Schema for `scheduled_actions` + +Required: + +- `schedule` (String) +- `scheduled_action_name` (String) + +Optional: + +- `end_time` (String) +- `scalable_target_action` (Attributes) specifies the minimum and maximum capacity (see [below for nested schema](#nestedatt--scheduled_actions--scalable_target_action)) +- `start_time` (String) +- `timezone` (String) + + +### Nested Schema for `scheduled_actions.scalable_target_action` + +Optional: + +- `max_capacity` (Number) +- `min_capacity` (Number) + + + + +### Nested Schema for `suspended_state` + +Optional: + +- `dynamic_scaling_in_suspended` (Boolean) +- `dynamic_scaling_out_suspended` (Boolean) +- `scheduled_scaling_suspended` (Boolean) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_applicationautoscaling_scalable_target.example +``` diff --git a/docs/resources/backup_backup_selection.md b/docs/resources/backup_backup_selection.md index 13ad803d0..996de383f 100644 --- a/docs/resources/backup_backup_selection.md +++ b/docs/resources/backup_backup_selection.md @@ -116,7 +116,8 @@ resource "awscc_backup_backup_selection" "example" { ### Read-Only -- `id` (String) The ID of this resource. +- `backup_selection_id` (String) +- `id` (String) Uniquely identifies the resource. - `selection_id` (String) diff --git a/docs/resources/batch_job_definition.md b/docs/resources/batch_job_definition.md index bb35e9341..ac35463bf 100644 --- a/docs/resources/batch_job_definition.md +++ b/docs/resources/batch_job_definition.md @@ -36,7 +36,8 @@ Resource Type definition for AWS::Batch::JobDefinition ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `job_definition_id` (String) ### Nested Schema for `container_properties` diff --git a/docs/resources/cloudfront_cache_policy.md b/docs/resources/cloudfront_cache_policy.md index c33699589..8d4e40385 100644 --- a/docs/resources/cloudfront_cache_policy.md +++ b/docs/resources/cloudfront_cache_policy.md @@ -21,7 +21,8 @@ Resource Type definition for AWS::CloudFront::CachePolicy ### Read-Only -- `id` (String) The ID of this resource. +- `cache_policy_id` (String) +- `id` (String) Uniquely identifies the resource. - `last_modified_time` (String) diff --git a/docs/resources/cloudfront_cloudfront_origin_access_identity.md b/docs/resources/cloudfront_cloudfront_origin_access_identity.md index f47654721..39bb1587a 100644 --- a/docs/resources/cloudfront_cloudfront_origin_access_identity.md +++ b/docs/resources/cloudfront_cloudfront_origin_access_identity.md @@ -30,7 +30,8 @@ resource "awscc_cloudfront_cloudfront_origin_access_identity" "cf_oai" { ### Read-Only -- `id` (String) The ID of this resource. +- `cloudfront_origin_access_identity_id` (String) +- `id` (String) Uniquely identifies the resource. - `s3_canonical_user_id` (String) diff --git a/docs/resources/cloudfront_continuous_deployment_policy.md b/docs/resources/cloudfront_continuous_deployment_policy.md index 5da3f4e04..9a17973c8 100644 --- a/docs/resources/cloudfront_continuous_deployment_policy.md +++ b/docs/resources/cloudfront_continuous_deployment_policy.md @@ -21,7 +21,8 @@ Resource Type definition for AWS::CloudFront::ContinuousDeploymentPolicy ### Read-Only -- `id` (String) The ID of this resource. +- `continuous_deployment_policy_id` (String) +- `id` (String) Uniquely identifies the resource. - `last_modified_time` (String) diff --git a/docs/resources/cloudfront_distribution.md b/docs/resources/cloudfront_distribution.md deleted file mode 100644 index 7ca5c6b1e..000000000 --- a/docs/resources/cloudfront_distribution.md +++ /dev/null @@ -1,633 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_cloudfront_distribution Resource - terraform-provider-awscc" -subcategory: "" -description: |- - A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery. ---- - -# awscc_cloudfront_distribution (Resource) - -A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery. - - - - -## Schema - -### Required - -- `distribution_config` (Attributes) The distribution's configuration. (see [below for nested schema](#nestedatt--distribution_config)) - -### Optional - -- `tags` (Attributes List) A complex type that contains zero or more ``Tag`` elements. (see [below for nested schema](#nestedatt--tags)) - -### Read-Only - -- `domain_name` (String) -- `id` (String) The ID of this resource. - - -### Nested Schema for `distribution_config` - -Required: - -- `default_cache_behavior` (Attributes) A complex type that describes the default cache behavior if you don't specify a ``CacheBehavior`` element or if files don't match any of the values of ``PathPattern`` in ``CacheBehavior`` elements. You must create exactly one default cache behavior. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior)) -- `enabled` (Boolean) From this field, you can enable or disable the selected distribution. - -Optional: - -- `aliases` (List of String) A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution. -- `cache_behaviors` (Attributes List) A complex type that contains zero or more ``CacheBehavior`` elements. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors)) -- `cnames` (List of String) -- `comment` (String) A comment to describe the distribution. The comment cannot be longer than 128 characters. -- `continuous_deployment_policy_id` (String) The identifier of a continuous deployment policy. For more information, see ``CreateContinuousDeploymentPolicy``. -- `custom_error_responses` (Attributes List) A complex type that controls the following: - + Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range with custom error messages before returning the response to the viewer. - + How long CloudFront caches HTTP status codes in the 4xx and 5xx range. - - For more information about custom error pages, see [Customizing Error Responses](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--custom_error_responses)) -- `custom_origin` (Attributes) (see [below for nested schema](#nestedatt--distribution_config--custom_origin)) -- `default_root_object` (String) The object that you want CloudFront to request from your origin (for example, ``index.html``) when a viewer requests the root URL for your distribution (``https://www.example.com``) instead of an object in your distribution (``https://www.example.com/product-description.html``). Specifying a default root object avoids exposing the contents of your distribution. - Specify only the object name, for example, ``index.html``. Don't add a ``/`` before the object name. - If you don't want to specify a default root object when you create a distribution, include an empty ``DefaultRootObject`` element. - To delete the default root object from an existing distribution, update the distribution configuration and include an empty ``DefaultRootObject`` element. - To replace the default root object, update the distribution configuration and specify the new object. - For more information about the default root object, see [Creating a Default Root Object](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/DefaultRootObject.html) in the *Amazon CloudFront Developer Guide*. -- `http_version` (String) (Optional) Specify the maximum HTTP version(s) that you want viewers to use to communicate with CF. The default value for new distributions is ``http1.1``. - For viewers and CF to use HTTP/2, viewers must support TLSv1.2 or later, and must support Server Name Indication (SNI). - For viewers and CF to use HTTP/3, viewers must support TLSv1.3 and Server Name Indication (SNI). CF supports HTTP/3 connection migration to allow the viewer to switch networks without losing connection. For more information about connection migration, see [Connection Migration](https://docs.aws.amazon.com/https://www.rfc-editor.org/rfc/rfc9000.html#name-connection-migration) at RFC 9000. For more information about supported TLSv1.3 ciphers, see [Supported protocols and ciphers between viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html). -- `ipv6_enabled` (Boolean) If you want CloudFront to respond to IPv6 DNS requests with an IPv6 address for your distribution, specify ``true``. If you specify ``false``, CloudFront responds to IPv6 DNS requests with the DNS response code ``NOERROR`` and with no IP addresses. This allows viewers to submit a second request, for an IPv4 address for your distribution. - In general, you should enable IPv6 if you have users on IPv6 networks who want to access your content. However, if you're using signed URLs or signed cookies to restrict access to your content, and if you're using a custom policy that includes the ``IpAddress`` parameter to restrict the IP addresses that can access your content, don't enable IPv6. If you want to restrict access to some content by IP address and not restrict access to other content (or restrict access but not by IP address), you can create two distributions. For more information, see [Creating a Signed URL Using a Custom Policy](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-creating-signed-url-custom-policy.html) in the *Amazon CloudFront Developer Guide*. - If you're using an R53AWSIntlong alias resource record set to route traffic to your CloudFront distribution, you need to create a second alias resource record set when both of the following are true: - + You enable IPv6 for the distribution - + You're using alternate domain names in the URLs for your objects - - For more information, see [Routing Traffic to an Amazon CloudFront Web Distribution by Using Your Domain Name](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html) in the *Developer Guide*. - If you created a CNAME resource record set, either with R53AWSIntlong or with another DNS service, you don't need to make any changes. A CNAME record will route traffic to your distribution regardless of the IP address format of the viewer request. -- `logging` (Attributes) A complex type that controls whether access logs are written for the distribution. - For more information about logging, see [Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--logging)) -- `origin_groups` (Attributes) A complex type that contains information about origin groups for this distribution. (see [below for nested schema](#nestedatt--distribution_config--origin_groups)) -- `origins` (Attributes List) A complex type that contains information about origins for this distribution. (see [below for nested schema](#nestedatt--distribution_config--origins)) -- `price_class` (String) The price class that corresponds with the maximum price that you want to pay for CloudFront service. If you specify ``PriceClass_All``, CloudFront responds to requests for your objects from all CloudFront edge locations. - If you specify a price class other than ``PriceClass_All``, CloudFront serves your objects from the CloudFront edge location that has the lowest latency among the edge locations in your price class. Viewers who are in or near regions that are excluded from your specified price class may encounter slower performance. - For more information about price classes, see [Choosing the Price Class for a CloudFront Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) in the *Amazon CloudFront Developer Guide*. For information about CloudFront pricing, including how price classes (such as Price Class 100) map to CloudFront regions, see [Amazon CloudFront Pricing](https://docs.aws.amazon.com/cloudfront/pricing/). -- `restrictions` (Attributes) A complex type that identifies ways in which you want to restrict distribution of your content. (see [below for nested schema](#nestedatt--distribution_config--restrictions)) -- `s3_origin` (Attributes) (see [below for nested schema](#nestedatt--distribution_config--s3_origin)) -- `staging` (Boolean) A Boolean that indicates whether this is a staging distribution. When this value is ``true``, this is a staging distribution. When this value is ``false``, this is not a staging distribution. -- `viewer_certificate` (Attributes) A complex type that determines the distribution's SSL/TLS configuration for communicating with viewers. (see [below for nested schema](#nestedatt--distribution_config--viewer_certificate)) -- `web_acl_id` (String) A unique identifier that specifies the WAF web ACL, if any, to associate with this distribution. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example ``arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a``. To specify a web ACL created using WAF Classic, use the ACL ID, for example ``473e64fd-f30b-4765-81a0-62ad96dd167a``. - WAF is a web application firewall that lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, and lets you control access to your content. Based on conditions that you specify, such as the IP addresses that requests originate from or the values of query strings, CloudFront responds to requests either with the requested content or with an HTTP 403 status code (Forbidden). You can also configure CloudFront to return a custom error page when a request is blocked. For more information about WAF, see the [Developer Guide](https://docs.aws.amazon.com/waf/latest/developerguide/what-is-aws-waf.html). - - -### Nested Schema for `distribution_config.default_cache_behavior` - -Required: - -- `target_origin_id` (String) The value of ``ID`` for the origin that you want CloudFront to route requests to when they use the default cache behavior. -- `viewer_protocol_policy` (String) The protocol that viewers can use to access the files in the origin specified by ``TargetOriginId`` when a request matches the path pattern in ``PathPattern``. You can specify the following options: - + ``allow-all``: Viewers can use HTTP or HTTPS. - + ``redirect-to-https``: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL. - + ``https-only``: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). - - For more information about requiring the HTTPS protocol, see [Requiring HTTPS Between Viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) in the *Amazon CloudFront Developer Guide*. - The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects' cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see [Managing Cache Expiration](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - -Optional: - -- `allowed_methods` (List of String) A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices: - + CloudFront forwards only ``GET`` and ``HEAD`` requests. - + CloudFront forwards only ``GET``, ``HEAD``, and ``OPTIONS`` requests. - + CloudFront forwards ``GET, HEAD, OPTIONS, PUT, PATCH, POST``, and ``DELETE`` requests. - - If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin. -- `cache_policy_id` (String) The unique identifier of the cache policy that is attached to the default cache behavior. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``DefaultCacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. -- `cached_methods` (List of String) A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices: - + CloudFront caches responses to ``GET`` and ``HEAD`` requests. - + CloudFront caches responses to ``GET``, ``HEAD``, and ``OPTIONS`` requests. - - If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly. -- `compress` (Boolean) Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify ``true``; if not, specify ``false``. For more information, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the *Amazon CloudFront Developer Guide*. -- `default_ttl` (Number) This field is deprecated. We recommend that you use the ``DefaultTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `field_level_encryption_id` (String) The value of ``ID`` for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for the default cache behavior. -- `forwarded_values` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. For more information, see [Working with policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to include values in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to send values to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``DefaultCacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. - A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--forwarded_values)) -- `function_associations` (Attributes List) A list of CloudFront functions that are associated with this cache behavior. CloudFront functions must be published to the ``LIVE`` stage to associate them with a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--function_associations)) -- `lambda_function_associations` (Attributes List) A complex type that contains zero or more Lambda@Edge function associations for a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--lambda_function_associations)) -- `max_ttl` (Number) This field is deprecated. We recommend that you use the ``MaxTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `min_ttl` (Number) This field is deprecated. We recommend that you use the ``MinTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - You must specify ``0`` for ``MinTTL`` if you configure CloudFront to forward all headers to your origin (under ``Headers``, if you specify ``1`` for ``Quantity`` and ``*`` for ``Name``). -- `origin_request_policy_id` (String) The unique identifier of the origin request policy that is attached to the default cache behavior. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. -- `realtime_log_config_arn` (String) The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see [Real-time logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) in the *Amazon CloudFront Developer Guide*. -- `response_headers_policy_id` (String) The identifier for a response headers policy. -- `smooth_streaming` (Boolean) Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify ``true``; if not, specify ``false``. If you specify ``true`` for ``SmoothStreaming``, you can still distribute other content using this cache behavior if the content matches the value of ``PathPattern``. -- `trusted_key_groups` (List of String) A list of key groups that CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. -- `trusted_signers` (List of String) We recommend using ``TrustedKeyGroups`` instead of ``TrustedSigners``. - A list of AWS-account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in a trusted signer's AWS-account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. - - -### Nested Schema for `distribution_config.default_cache_behavior.forwarded_values` - -Required: - -- `query_string` (Boolean) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of ``QueryString`` and on the values that you specify for ``QueryStringCacheKeys``, if any: - If you specify true for ``QueryString`` and you don't specify any values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin. - If you specify true for ``QueryString`` and you specify one or more values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. - If you specify false for ``QueryString``, CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters. - For more information, see [Configuring CloudFront to Cache Based on Query String Parameters](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) in the *Amazon CloudFront Developer Guide*. - -Optional: - -- `cookies` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see [How CloudFront Forwards, Caches, and Logs Cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--default_cache_behavior--forwarded_values--cookies)) -- `headers` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include headers in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send headers to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies the ``Headers``, if any, that you want CloudFront to forward to the origin for this cache behavior (whitelisted headers). For the headers that you specify, CloudFront also caches separate versions of a specified object that is based on the header values in viewer requests. - For more information, see [Caching Content Based on Request Headers](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) in the *Amazon CloudFront Developer Guide*. -- `query_string_cache_keys` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that contains information about the query string parameters that you want CloudFront to use for caching for this cache behavior. - - -### Nested Schema for `distribution_config.default_cache_behavior.forwarded_values.query_string_cache_keys` - -Required: - -- `forward` (String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of cookies specified in the ``WhitelistedNames`` complex type. - Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the ``Forward`` element. - -Optional: - -- `whitelisted_names` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Required if you specify ``whitelist`` for the value of ``Forward``. A complex type that specifies how many different cookies you want CloudFront to forward to the origin for this cache behavior and, if you want to forward selected cookies, the names of those cookies. - If you specify ``all`` or ``none`` for the value of ``Forward``, omit ``WhitelistedNames``. If you change the value of ``Forward`` from ``whitelist`` to ``all`` or ``none`` and you don't delete the ``WhitelistedNames`` element and its child elements, CloudFront deletes them automatically. - For the current limit on the number of cookie names that you can whitelist for each cache behavior, see [CloudFront Limits](https://docs.aws.amazon.com/general/latest/gr/xrefaws_service_limits.html#limits_cloudfront) in the *General Reference*. - - - - -### Nested Schema for `distribution_config.default_cache_behavior.function_associations` - -Optional: - -- `event_type` (String) The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function. -- `function_arn` (String) The Amazon Resource Name (ARN) of the function. - - - -### Nested Schema for `distribution_config.default_cache_behavior.lambda_function_associations` - -Optional: - -- `event_type` (String) Specifies the event type that triggers a Lambda@Edge function invocation. You can specify the following values: - + ``viewer-request``: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache. - + ``origin-request``: The function executes only when CloudFront sends a request to your origin. When the requested object is in the edge cache, the function doesn't execute. - + ``origin-response``: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute. - + ``viewer-response``: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache. - If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute. -- `include_body` (Boolean) A flag that allows a Lambda@Edge function to have read access to the body content. For more information, see [Accessing the Request Body by Choosing the Include Body Option](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) in the Amazon CloudFront Developer Guide. -- `lambda_function_arn` (String) The ARN of the Lambda@Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST. - - - - -### Nested Schema for `distribution_config.cache_behaviors` - -Required: - -- `path_pattern` (String) The pattern (for example, ``images/*.jpg``) that specifies which requests to apply the behavior to. When CloudFront receives a viewer request, the requested path is compared with path patterns in the order in which cache behaviors are listed in the distribution. - You can optionally include a slash (``/``) at the beginning of the path pattern. For example, ``/images/*.jpg``. CloudFront behavior is the same with or without the leading ``/``. - The path pattern for the default cache behavior is ``*`` and cannot be changed. If the request for an object does not match the path pattern for any cache behaviors, CloudFront applies the behavior in the default cache behavior. - For more information, see [Path Pattern](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) in the *Amazon CloudFront Developer Guide*. -- `target_origin_id` (String) The value of ``ID`` for the origin that you want CloudFront to route requests to when they match this cache behavior. -- `viewer_protocol_policy` (String) The protocol that viewers can use to access the files in the origin specified by ``TargetOriginId`` when a request matches the path pattern in ``PathPattern``. You can specify the following options: - + ``allow-all``: Viewers can use HTTP or HTTPS. - + ``redirect-to-https``: If a viewer submits an HTTP request, CloudFront returns an HTTP status code of 301 (Moved Permanently) to the viewer along with the HTTPS URL. The viewer then resubmits the request using the new URL. - + ``https-only``: If a viewer sends an HTTP request, CloudFront returns an HTTP status code of 403 (Forbidden). - - For more information about requiring the HTTPS protocol, see [Requiring HTTPS Between Viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) in the *Amazon CloudFront Developer Guide*. - The only way to guarantee that viewers retrieve an object that was fetched from the origin using HTTPS is never to use any other protocol to fetch the object. If you have recently changed from HTTP to HTTPS, we recommend that you clear your objects' cache because cached objects are protocol agnostic. That means that an edge location will return an object from the cache regardless of whether the current request protocol matches the protocol used previously. For more information, see [Managing Cache Expiration](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - -Optional: - -- `allowed_methods` (List of String) A complex type that controls which HTTP methods CloudFront processes and forwards to your Amazon S3 bucket or your custom origin. There are three choices: - + CloudFront forwards only ``GET`` and ``HEAD`` requests. - + CloudFront forwards only ``GET``, ``HEAD``, and ``OPTIONS`` requests. - + CloudFront forwards ``GET, HEAD, OPTIONS, PUT, PATCH, POST``, and ``DELETE`` requests. - - If you pick the third choice, you may need to restrict access to your Amazon S3 bucket or to your custom origin so users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin. -- `cache_policy_id` (String) The unique identifier of the cache policy that is attached to this cache behavior. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``CacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. -- `cached_methods` (List of String) A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices: - + CloudFront caches responses to ``GET`` and ``HEAD`` requests. - + CloudFront caches responses to ``GET``, ``HEAD``, and ``OPTIONS`` requests. - - If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly. -- `compress` (Boolean) Whether you want CloudFront to automatically compress certain files for this cache behavior. If so, specify true; if not, specify false. For more information, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the *Amazon CloudFront Developer Guide*. -- `default_ttl` (Number) This field is deprecated. We recommend that you use the ``DefaultTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The default amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin does not add HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `field_level_encryption_id` (String) The value of ``ID`` for the field-level encryption configuration that you want CloudFront to use for encrypting specific fields of data for this cache behavior. -- `forwarded_values` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. For more information, see [Working with policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to include values in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - If you want to send values to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. - A ``CacheBehavior`` must include either a ``CachePolicyId`` or ``ForwardedValues``. We recommend that you use a ``CachePolicyId``. - A complex type that specifies how CloudFront handles query strings, cookies, and HTTP headers. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--forwarded_values)) -- `function_associations` (Attributes List) A list of CloudFront functions that are associated with this cache behavior. CloudFront functions must be published to the ``LIVE`` stage to associate them with a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--function_associations)) -- `lambda_function_associations` (Attributes List) A complex type that contains zero or more Lambda@Edge function associations for a cache behavior. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--lambda_function_associations)) -- `max_ttl` (Number) This field is deprecated. We recommend that you use the ``MaxTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The maximum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. The value that you specify applies only when your origin adds HTTP headers such as ``Cache-Control max-age``, ``Cache-Control s-maxage``, and ``Expires`` to objects. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. -- `min_ttl` (Number) This field is deprecated. We recommend that you use the ``MinTTL`` field in a cache policy instead of this field. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) or [Using the managed cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) in the *Amazon CloudFront Developer Guide*. - The minimum amount of time that you want objects to stay in CloudFront caches before CloudFront forwards another request to your origin to determine whether the object has been updated. For more information, see [Managing How Long Content Stays in an Edge Cache (Expiration)](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) in the *Amazon CloudFront Developer Guide*. - You must specify ``0`` for ``MinTTL`` if you configure CloudFront to forward all headers to your origin (under ``Headers``, if you specify ``1`` for ``Quantity`` and ``*`` for ``Name``). -- `origin_request_policy_id` (String) The unique identifier of the origin request policy that is attached to this cache behavior. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) or [Using the managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) in the *Amazon CloudFront Developer Guide*. -- `realtime_log_config_arn` (String) The Amazon Resource Name (ARN) of the real-time log configuration that is attached to this cache behavior. For more information, see [Real-time logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) in the *Amazon CloudFront Developer Guide*. -- `response_headers_policy_id` (String) The identifier for a response headers policy. -- `smooth_streaming` (Boolean) Indicates whether you want to distribute media files in the Microsoft Smooth Streaming format using the origin that is associated with this cache behavior. If so, specify ``true``; if not, specify ``false``. If you specify ``true`` for ``SmoothStreaming``, you can still distribute other content using this cache behavior if the content matches the value of ``PathPattern``. -- `trusted_key_groups` (List of String) A list of key groups that CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted key groups, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with a private key whose corresponding public key is in the key group. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. -- `trusted_signers` (List of String) We recommend using ``TrustedKeyGroups`` instead of ``TrustedSigners``. - A list of AWS-account IDs whose public keys CloudFront can use to validate signed URLs or signed cookies. - When a cache behavior contains trusted signers, CloudFront requires signed URLs or signed cookies for all requests that match the cache behavior. The URLs or cookies must be signed with the private key of a CloudFront key pair in the trusted signer's AWS-account. The signed URL or cookie contains information about which public key CloudFront should use to verify the signature. For more information, see [Serving private content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. - - -### Nested Schema for `distribution_config.cache_behaviors.forwarded_values` - -Required: - -- `query_string` (Boolean) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of ``QueryString`` and on the values that you specify for ``QueryStringCacheKeys``, if any: - If you specify true for ``QueryString`` and you don't specify any values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin. - If you specify true for ``QueryString`` and you specify one or more values for ``QueryStringCacheKeys``, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify. - If you specify false for ``QueryString``, CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters. - For more information, see [Configuring CloudFront to Cache Based on Query String Parameters](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) in the *Amazon CloudFront Developer Guide*. - -Optional: - -- `cookies` (Attributes) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see [How CloudFront Forwards, Caches, and Logs Cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--cache_behaviors--forwarded_values--cookies)) -- `headers` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include headers in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send headers to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that specifies the ``Headers``, if any, that you want CloudFront to forward to the origin for this cache behavior (whitelisted headers). For the headers that you specify, CloudFront also caches separate versions of a specified object that is based on the header values in viewer requests. - For more information, see [Caching Content Based on Request Headers](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) in the *Amazon CloudFront Developer Guide*. -- `query_string_cache_keys` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include query strings in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send query strings to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - A complex type that contains information about the query string parameters that you want CloudFront to use for caching for this cache behavior. - - -### Nested Schema for `distribution_config.cache_behaviors.forwarded_values.query_string_cache_keys` - -Required: - -- `forward` (String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Specifies which cookies to forward to the origin for this cache behavior: all, none, or the list of cookies specified in the ``WhitelistedNames`` complex type. - Amazon S3 doesn't process cookies. When the cache behavior is forwarding requests to an Amazon S3 origin, specify none for the ``Forward`` element. - -Optional: - -- `whitelisted_names` (List of String) This field is deprecated. We recommend that you use a cache policy or an origin request policy instead of this field. - If you want to include cookies in the cache key, use a cache policy. For more information, see [Creating cache policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) in the *Amazon CloudFront Developer Guide*. - If you want to send cookies to the origin but not include them in the cache key, use an origin request policy. For more information, see [Creating origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) in the *Amazon CloudFront Developer Guide*. - Required if you specify ``whitelist`` for the value of ``Forward``. A complex type that specifies how many different cookies you want CloudFront to forward to the origin for this cache behavior and, if you want to forward selected cookies, the names of those cookies. - If you specify ``all`` or ``none`` for the value of ``Forward``, omit ``WhitelistedNames``. If you change the value of ``Forward`` from ``whitelist`` to ``all`` or ``none`` and you don't delete the ``WhitelistedNames`` element and its child elements, CloudFront deletes them automatically. - For the current limit on the number of cookie names that you can whitelist for each cache behavior, see [CloudFront Limits](https://docs.aws.amazon.com/general/latest/gr/xrefaws_service_limits.html#limits_cloudfront) in the *General Reference*. - - - - -### Nested Schema for `distribution_config.cache_behaviors.function_associations` - -Optional: - -- `event_type` (String) The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function. -- `function_arn` (String) The Amazon Resource Name (ARN) of the function. - - - -### Nested Schema for `distribution_config.cache_behaviors.lambda_function_associations` - -Optional: - -- `event_type` (String) Specifies the event type that triggers a Lambda@Edge function invocation. You can specify the following values: - + ``viewer-request``: The function executes when CloudFront receives a request from a viewer and before it checks to see whether the requested object is in the edge cache. - + ``origin-request``: The function executes only when CloudFront sends a request to your origin. When the requested object is in the edge cache, the function doesn't execute. - + ``origin-response``: The function executes after CloudFront receives a response from the origin and before it caches the object in the response. When the requested object is in the edge cache, the function doesn't execute. - + ``viewer-response``: The function executes before CloudFront returns the requested object to the viewer. The function executes regardless of whether the object was already in the edge cache. - If the origin returns an HTTP status code other than HTTP 200 (OK), the function doesn't execute. -- `include_body` (Boolean) A flag that allows a Lambda@Edge function to have read access to the body content. For more information, see [Accessing the Request Body by Choosing the Include Body Option](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-include-body-access.html) in the Amazon CloudFront Developer Guide. -- `lambda_function_arn` (String) The ARN of the Lambda@Edge function. You must specify the ARN of a function version; you can't specify an alias or $LATEST. - - - - -### Nested Schema for `distribution_config.custom_error_responses` - -Required: - -- `error_code` (Number) The HTTP status code for which you want to specify a custom error page and/or a caching duration. - -Optional: - -- `error_caching_min_ttl` (Number) The minimum amount of time, in seconds, that you want CloudFront to cache the HTTP status code specified in ``ErrorCode``. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available. - For more information, see [Customizing Error Responses](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) in the *Amazon CloudFront Developer Guide*. -- `response_code` (Number) The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example: - + Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute ``200``, the response typically won't be intercepted. - + If you don't care about distinguishing among different client errors or server errors, you can specify ``400`` or ``500`` as the ``ResponseCode`` for all 4xx or 5xx errors. - + You might want to return a ``200`` status code (OK) and static website so your customers don't know that your website is down. - - If you specify a value for ``ResponseCode``, you must also specify a value for ``ResponsePagePath``. -- `response_page_path` (String) The path to the custom error page that you want CloudFront to return to a viewer when your origin returns the HTTP status code specified by ``ErrorCode``, for example, ``/4xx-errors/403-forbidden.html``. If you want to store your objects and your custom error pages in different locations, your distribution must include a cache behavior for which the following is true: - + The value of ``PathPattern`` matches the path to your custom error messages. For example, suppose you saved custom error pages for 4xx errors in an Amazon S3 bucket in a directory named ``/4xx-errors``. Your distribution must include a cache behavior for which the path pattern routes requests for your custom error pages to that location, for example, ``/4xx-errors/*``. - + The value of ``TargetOriginId`` specifies the value of the ``ID`` element for the origin that contains your custom error pages. - - If you specify a value for ``ResponsePagePath``, you must also specify a value for ``ResponseCode``. - We recommend that you store custom error pages in an Amazon S3 bucket. If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable. - - - -### Nested Schema for `distribution_config.custom_origin` - -Required: - -- `dns_name` (String) -- `origin_protocol_policy` (String) -- `origin_ssl_protocols` (List of String) - -Optional: - -- `http_port` (Number) -- `https_port` (Number) - - - -### Nested Schema for `distribution_config.logging` - -Required: - -- `bucket` (String) The Amazon S3 bucket to store the access logs in, for example, ``myawslogbucket.s3.amazonaws.com``. - -Optional: - -- `include_cookies` (Boolean) Specifies whether you want CloudFront to include cookies in access logs, specify ``true`` for ``IncludeCookies``. If you choose to include cookies in logs, CloudFront logs all cookies regardless of how you configure the cache behaviors for this distribution. If you don't want to include cookies when you create a distribution or if you want to disable include cookies for an existing distribution, specify ``false`` for ``IncludeCookies``. -- `prefix` (String) An optional string that you want CloudFront to prefix to the access log ``filenames`` for this distribution, for example, ``myprefix/``. If you want to enable logging, but you don't want to specify a prefix, you still must include an empty ``Prefix`` element in the ``Logging`` element. - - - -### Nested Schema for `distribution_config.origin_groups` - -Required: - -- `quantity` (Number) The number of origin groups. - -Optional: - -- `items` (Attributes List) The items (origin groups) in a distribution. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items)) - - -### Nested Schema for `distribution_config.origin_groups.items` - -Required: - -- `failover_criteria` (Attributes) A complex type that contains information about the failover criteria for an origin group. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--failover_criteria)) -- `id` (String) The origin group's ID. -- `members` (Attributes) A complex type that contains information about the origins in an origin group. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--members)) - - -### Nested Schema for `distribution_config.origin_groups.items.members` - -Required: - -- `status_codes` (Attributes) The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--members--status_codes)) - - -### Nested Schema for `distribution_config.origin_groups.items.members.status_codes` - -Required: - -- `items` (List of Number) The items (status codes) for an origin group. -- `quantity` (Number) The number of status codes. - - - - -### Nested Schema for `distribution_config.origin_groups.items.members` - -Required: - -- `items` (Attributes List) Items (origins) in an origin group. (see [below for nested schema](#nestedatt--distribution_config--origin_groups--items--members--items)) -- `quantity` (Number) The number of origins in an origin group. - - -### Nested Schema for `distribution_config.origin_groups.items.members.items` - -Required: - -- `origin_id` (String) The ID for an origin in an origin group. - - - - - - -### Nested Schema for `distribution_config.origins` - -Required: - -- `domain_name` (String) The domain name for the origin. - For more information, see [Origin Domain Name](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesDomainName) in the *Amazon CloudFront Developer Guide*. -- `id` (String) A unique identifier for the origin. This value must be unique within the distribution. - Use this value to specify the ``TargetOriginId`` in a ``CacheBehavior`` or ``DefaultCacheBehavior``. - -Optional: - -- `connection_attempts` (Number) The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don't specify otherwise) is 3. - For a custom origin (including an Amazon S3 bucket that's configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an [Origin Response Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout). - For more information, see [Origin Connection Attempts](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-attempts) in the *Amazon CloudFront Developer Guide*. -- `connection_timeout` (Number) The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don't specify otherwise) is 10 seconds. - For more information, see [Origin Connection Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#origin-connection-timeout) in the *Amazon CloudFront Developer Guide*. -- `custom_origin_config` (Attributes) Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the ``S3OriginConfig`` type instead. (see [below for nested schema](#nestedatt--distribution_config--origins--custom_origin_config)) -- `origin_access_control_id` (String) The unique identifier of an origin access control for this origin. - For more information, see [Restricting access to an Amazon S3 origin](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html) in the *Amazon CloudFront Developer Guide*. -- `origin_custom_headers` (Attributes List) A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin. - For more information, see [Adding Custom Headers to Origin Requests](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/add-origin-custom-headers.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--origins--origin_custom_headers)) -- `origin_path` (String) An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. - For more information, see [Origin Path](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginPath) in the *Amazon CloudFront Developer Guide*. -- `origin_shield` (Attributes) CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin. - For more information, see [Using Origin Shield](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html) in the *Amazon CloudFront Developer Guide*. (see [below for nested schema](#nestedatt--distribution_config--origins--origin_shield)) -- `s3_origin_config` (Attributes) Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the ``CustomOriginConfig`` type instead. (see [below for nested schema](#nestedatt--distribution_config--origins--s3_origin_config)) - - -### Nested Schema for `distribution_config.origins.custom_origin_config` - -Required: - -- `origin_protocol_policy` (String) Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin. Valid values are: - + ``http-only`` ? CloudFront always uses HTTP to connect to the origin. - + ``match-viewer`` ? CloudFront connects to the origin using the same protocol that the viewer used to connect to CloudFront. - + ``https-only`` ? CloudFront always uses HTTPS to connect to the origin. - -Optional: - -- `http_port` (Number) The HTTP port that CloudFront uses to connect to the origin. Specify the HTTP port that the origin listens on. -- `https_port` (Number) The HTTPS port that CloudFront uses to connect to the origin. Specify the HTTPS port that the origin listens on. -- `origin_keepalive_timeout` (Number) Specifies how long, in seconds, CloudFront persists its connection to the origin. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 5 seconds. - For more information, see [Origin Keep-alive Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginKeepaliveTimeout) in the *Amazon CloudFront Developer Guide*. -- `origin_read_timeout` (Number) Specifies how long, in seconds, CloudFront waits for a response from the origin. This is also known as the *origin response timeout*. The minimum timeout is 1 second, the maximum is 60 seconds, and the default (if you don't specify otherwise) is 30 seconds. - For more information, see [Origin Response Timeout](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginResponseTimeout) in the *Amazon CloudFront Developer Guide*. -- `origin_ssl_protocols` (List of String) Specifies the minimum SSL/TLS protocol that CloudFront uses when connecting to your origin over HTTPS. Valid values include ``SSLv3``, ``TLSv1``, ``TLSv1.1``, and ``TLSv1.2``. - For more information, see [Minimum Origin SSL Protocol](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesOriginSSLProtocols) in the *Amazon CloudFront Developer Guide*. - - - -### Nested Schema for `distribution_config.origins.origin_custom_headers` - -Required: - -- `header_name` (String) The name of a header that you want CloudFront to send to your origin. For more information, see [Adding Custom Headers to Origin Requests](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html) in the *Amazon CloudFront Developer Guide*. -- `header_value` (String) The value for the header that you specified in the ``HeaderName`` field. - - - -### Nested Schema for `distribution_config.origins.origin_shield` - -Optional: - -- `enabled` (Boolean) A flag that specifies whether Origin Shield is enabled. - When it's enabled, CloudFront routes all requests through Origin Shield, which can help protect your origin. When it's disabled, CloudFront might send requests directly to your origin from multiple edge locations or regional edge caches. -- `origin_shield_region` (String) The AWS-Region for Origin Shield. - Specify the AWS-Region that has the lowest latency to your origin. To specify a region, use the region code, not the region name. For example, specify the US East (Ohio) region as ``us-east-2``. - When you enable CloudFront Origin Shield, you must specify the AWS-Region for Origin Shield. For the list of AWS-Regions that you can specify, and for help choosing the best Region for your origin, see [Choosing the for Origin Shield](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html#choose-origin-shield-region) in the *Amazon CloudFront Developer Guide*. - - - -### Nested Schema for `distribution_config.origins.s3_origin_config` - -Optional: - -- `origin_access_identity` (String) The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can *only* access objects in an Amazon S3 bucket through CloudFront. The format of the value is: - origin-access-identity/cloudfront/*ID-of-origin-access-identity* - where ``ID-of-origin-access-identity`` is the value that CloudFront returned in the ``ID`` element when you created the origin access identity. - If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty ``OriginAccessIdentity`` element. - To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty ``OriginAccessIdentity`` element. - To replace the origin access identity, update the distribution configuration and specify the new origin access identity. - For more information about the origin access identity, see [Serving Private Content through CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. - - - - -### Nested Schema for `distribution_config.restrictions` - -Required: - -- `geo_restriction` (Attributes) A complex type that controls the countries in which your content is distributed. CF determines the location of your users using ``MaxMind`` GeoIP databases. To disable geo restriction, remove the [Restrictions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-distributionconfig.html#cfn-cloudfront-distribution-distributionconfig-restrictions) property from your stack template. (see [below for nested schema](#nestedatt--distribution_config--restrictions--geo_restriction)) - - -### Nested Schema for `distribution_config.restrictions.geo_restriction` - -Required: - -- `restriction_type` (String) The method that you want to use to restrict distribution of your content by country: - + ``none``: No geo restriction is enabled, meaning access to content is not restricted by client geo location. - + ``blacklist``: The ``Location`` elements specify the countries in which you don't want CloudFront to distribute your content. - + ``whitelist``: The ``Location`` elements specify the countries in which you want CloudFront to distribute your content. - -Optional: - -- `locations` (List of String) A complex type that contains a ``Location`` element for each country in which you want CloudFront either to distribute your content (``whitelist``) or not distribute your content (``blacklist``). - The ``Location`` element is a two-letter, uppercase country code for a country that you want to include in your ``blacklist`` or ``whitelist``. Include one ``Location`` element for each country. - CloudFront and ``MaxMind`` both use ``ISO 3166`` country codes. For the current list of countries and the corresponding codes, see ``ISO 3166-1-alpha-2`` code on the *International Organization for Standardization* website. You can also refer to the country list on the CloudFront console, which includes both country names and codes. - - - - -### Nested Schema for `distribution_config.s3_origin` - -Required: - -- `dns_name` (String) - -Optional: - -- `origin_access_identity` (String) - - - -### Nested Schema for `distribution_config.viewer_certificate` - -Optional: - -- `acm_certificate_arn` (String) In CloudFormation, this field name is ``AcmCertificateArn``. Note the different capitalization. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs) and the SSL/TLS certificate is stored in [(ACM)](https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html), provide the Amazon Resource Name (ARN) of the ACM certificate. CloudFront only supports ACM certificates in the US East (N. Virginia) Region (``us-east-1``). - If you specify an ACM certificate ARN, you must also specify values for ``MinimumProtocolVersion`` and ``SSLSupportMethod``. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.) -- `cloudfront_default_certificate` (Boolean) If the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net``, set this field to ``true``. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), omit this field and specify values for the following fields: - + ``AcmCertificateArn`` or ``IamCertificateId`` (specify a value for one, not both) - + ``MinimumProtocolVersion`` - + ``SslSupportMethod`` -- `iam_certificate_id` (String) In CloudFormation, this field name is ``IamCertificateId``. Note the different capitalization. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs) and the SSL/TLS certificate is stored in [(IAM)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs.html), provide the ID of the IAM certificate. - If you specify an IAM certificate ID, you must also specify values for ``MinimumProtocolVersion`` and ``SSLSupportMethod``. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.) -- `minimum_protocol_version` (String) If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), specify the security policy that you want CloudFront to use for HTTPS connections with viewers. The security policy determines two settings: - + The minimum SSL/TLS protocol that CloudFront can use to communicate with viewers. - + The ciphers that CloudFront can use to encrypt the content that it returns to viewers. - - For more information, see [Security Policy](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValues-security-policy) and [Supported Protocols and Ciphers Between Viewers and CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers) in the *Amazon CloudFront Developer Guide*. - On the CloudFront console, this setting is called *Security Policy*. - When you're using SNI only (you set ``SSLSupportMethod`` to ``sni-only``), you must specify ``TLSv1`` or higher. (In CloudFormation, the field name is ``SslSupportMethod``. Note the different capitalization.) - If the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net`` (you set ``CloudFrontDefaultCertificate`` to ``true``), CloudFront automatically sets the security policy to ``TLSv1`` regardless of the value that you set here. -- `ssl_support_method` (String) In CloudFormation, this field name is ``SslSupportMethod``. Note the different capitalization. - If the distribution uses ``Aliases`` (alternate domain names or CNAMEs), specify which viewers the distribution accepts HTTPS connections from. - + ``sni-only`` ? The distribution accepts HTTPS connections from only viewers that support [server name indication (SNI)](https://docs.aws.amazon.com/https://en.wikipedia.org/wiki/Server_Name_Indication). This is recommended. Most browsers and clients support SNI. - + ``vip`` ? The distribution accepts HTTPS connections from all viewers including those that don't support SNI. This is not recommended, and results in additional monthly charges from CloudFront. - + ``static-ip`` - Do not specify this value unless your distribution has been enabled for this feature by the CloudFront team. If you have a use case that requires static IP addresses for a distribution, contact CloudFront through the [Center](https://docs.aws.amazon.com/support/home). - - If the distribution uses the CloudFront domain name such as ``d111111abcdef8.cloudfront.net``, don't set a value for this field. - - - - -### Nested Schema for `tags` - -Required: - -- `key` (String) A string that contains ``Tag`` key. - The string length should be between 1 and 128 characters. Valid characters include ``a-z``, ``A-Z``, ``0-9``, space, and the special characters ``_ - . : / = + @``. -- `value` (String) A string that contains an optional ``Tag`` value. - The string length should be between 0 and 256 characters. Valid characters include ``a-z``, ``A-Z``, ``0-9``, space, and the special characters ``_ - . : / = + @``. - -## Import - -Import is supported using the following syntax: - -```shell -$ terraform import awscc_cloudfront_distribution.example -``` diff --git a/docs/resources/cloudfront_key_group.md b/docs/resources/cloudfront_key_group.md index 9c6b12f54..81b24952e 100644 --- a/docs/resources/cloudfront_key_group.md +++ b/docs/resources/cloudfront_key_group.md @@ -21,7 +21,8 @@ Resource Type definition for AWS::CloudFront::KeyGroup ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `key_group_id` (String) - `last_modified_time` (String) diff --git a/docs/resources/cloudfront_key_value_store.md b/docs/resources/cloudfront_key_value_store.md new file mode 100644 index 000000000..cbf273cda --- /dev/null +++ b/docs/resources/cloudfront_key_value_store.md @@ -0,0 +1,48 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_cloudfront_key_value_store Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::CloudFront::KeyValueStore +--- + +# awscc_cloudfront_key_value_store (Resource) + +Resource Type definition for AWS::CloudFront::KeyValueStore + + + + +## Schema + +### Required + +- `name` (String) + +### Optional + +- `comment` (String) +- `import_source` (Attributes) (see [below for nested schema](#nestedatt--import_source)) + +### Read-Only + +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `key_value_store_id` (String) +- `status` (String) + + +### Nested Schema for `import_source` + +Required: + +- `source_arn` (String) +- `source_type` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_cloudfront_key_value_store.example +``` diff --git a/docs/resources/cloudfront_origin_access_control.md b/docs/resources/cloudfront_origin_access_control.md index b834d2cd1..a14ba35cf 100644 --- a/docs/resources/cloudfront_origin_access_control.md +++ b/docs/resources/cloudfront_origin_access_control.md @@ -21,7 +21,8 @@ Resource Type definition for AWS::CloudFront::OriginAccessControl ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `origin_access_control_id` (String) ### Nested Schema for `origin_access_control_config` diff --git a/docs/resources/cloudfront_origin_request_policy.md b/docs/resources/cloudfront_origin_request_policy.md index 0504e9501..6c0b99876 100644 --- a/docs/resources/cloudfront_origin_request_policy.md +++ b/docs/resources/cloudfront_origin_request_policy.md @@ -21,8 +21,9 @@ Resource Type definition for AWS::CloudFront::OriginRequestPolicy ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `last_modified_time` (String) +- `origin_request_policy_id` (String) ### Nested Schema for `origin_request_policy_config` diff --git a/docs/resources/cloudfront_public_key.md b/docs/resources/cloudfront_public_key.md index 17a695b02..979cf8787 100644 --- a/docs/resources/cloudfront_public_key.md +++ b/docs/resources/cloudfront_public_key.md @@ -22,7 +22,8 @@ Resource Type definition for AWS::CloudFront::PublicKey ### Read-Only - `created_time` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `public_key_id` (String) ### Nested Schema for `public_key_config` diff --git a/docs/resources/cloudfront_response_headers_policy.md b/docs/resources/cloudfront_response_headers_policy.md index 44fe434ec..6b20c922e 100644 --- a/docs/resources/cloudfront_response_headers_policy.md +++ b/docs/resources/cloudfront_response_headers_policy.md @@ -21,8 +21,9 @@ Resource Type definition for AWS::CloudFront::ResponseHeadersPolicy ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `last_modified_time` (String) +- `response_headers_policy_id` (String) ### Nested Schema for `response_headers_policy_config` diff --git a/docs/resources/cognito_identity_pool.md b/docs/resources/cognito_identity_pool.md index 498895a9a..28d502eea 100644 --- a/docs/resources/cognito_identity_pool.md +++ b/docs/resources/cognito_identity_pool.md @@ -34,7 +34,8 @@ Resource Type definition for AWS::Cognito::IdentityPool ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `identity_pool_id` (String) - `name` (String) diff --git a/docs/resources/cognito_log_delivery_configuration.md b/docs/resources/cognito_log_delivery_configuration.md index 6b9148e34..c3d49605d 100644 --- a/docs/resources/cognito_log_delivery_configuration.md +++ b/docs/resources/cognito_log_delivery_configuration.md @@ -25,7 +25,8 @@ Resource Type definition for AWS::Cognito::LogDeliveryConfiguration ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `log_delivery_configuration_id` (String) ### Nested Schema for `log_configurations` diff --git a/docs/resources/connect_instance.md b/docs/resources/connect_instance.md new file mode 100644 index 000000000..b108baac6 --- /dev/null +++ b/docs/resources/connect_instance.md @@ -0,0 +1,69 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_connect_instance Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::Connect::Instance +--- + +# awscc_connect_instance (Resource) + +Resource Type definition for AWS::Connect::Instance + + + + +## Schema + +### Required + +- `attributes` (Attributes) The attributes for the instance. (see [below for nested schema](#nestedatt--attributes)) +- `identity_management_type` (String) Specifies the type of directory integration for new instance. + +### Optional + +- `directory_id` (String) Existing directoryId user wants to map to the new Connect instance. +- `instance_alias` (String) Alias of the new directory created as part of new instance creation. +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) An instanceArn is automatically generated on creation based on instanceId. +- `created_time` (String) Timestamp of instance creation logged as part of instance creation. +- `id` (String) Uniquely identifies the resource. +- `instance_id` (String) An instanceId is automatically generated on creation and assigned as the unique identifier. +- `instance_status` (String) Specifies the creation status of new instance. +- `service_role` (String) Service linked role created as part of instance creation. + + +### Nested Schema for `attributes` + +Required: + +- `inbound_calls` (Boolean) Mandatory element which enables inbound calls on new instance. +- `outbound_calls` (Boolean) Mandatory element which enables outbound calls on new instance. + +Optional: + +- `auto_resolve_best_voices` (Boolean) Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance. +- `contact_lens` (Boolean) Boolean flag which enables CONTACT_LENS on an instance. +- `contactflow_logs` (Boolean) Boolean flag which enables CONTACTFLOW_LOGS on an instance. +- `early_media` (Boolean) Boolean flag which enables EARLY_MEDIA on an instance. +- `use_custom_tts_voices` (Boolean) Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance. + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_connect_instance.example +``` diff --git a/docs/resources/datazone_data_source.md b/docs/resources/datazone_data_source.md index c388ad905..61a163b84 100644 --- a/docs/resources/datazone_data_source.md +++ b/docs/resources/datazone_data_source.md @@ -36,9 +36,10 @@ Definition of AWS::DataZone::DataSource Resource Type ### Read-Only - `created_at` (String) The timestamp of when the data source was created. +- `data_source_id` (String) The unique identifier of the data source. - `domain_id` (String) The ID of the Amazon DataZone domain where the data source is created. - `environment_id` (String) The unique identifier of the Amazon DataZone environment to which the data source publishes assets. -- `id` (String) The unique identifier of the data source. +- `id` (String) Uniquely identifies the resource. - `last_run_asset_count` (Number) The number of assets created by the data source during its last run. - `last_run_at` (String) The timestamp that specifies when the data source was last run. - `last_run_status` (String) The status of the last run of this data source. diff --git a/docs/resources/datazone_domain.md b/docs/resources/datazone_domain.md index 76535b43c..3f1a0af7c 100644 --- a/docs/resources/datazone_domain.md +++ b/docs/resources/datazone_domain.md @@ -31,7 +31,8 @@ A domain is an organizing entity for connecting together assets, users, and thei - `arn` (String) The ARN of the Amazon DataZone domain. - `created_at` (String) The timestamp of when the Amazon DataZone domain was last updated. -- `id` (String) The id of the Amazon DataZone domain. +- `domain_id` (String) The id of the Amazon DataZone domain. +- `id` (String) Uniquely identifies the resource. - `last_updated_at` (String) The timestamp of when the Amazon DataZone domain was last updated. - `managed_account_id` (String) The identifier of the AWS account that manages the domain. - `portal_url` (String) The URL of the data portal for this Amazon DataZone domain. diff --git a/docs/resources/datazone_environment_profile.md b/docs/resources/datazone_environment_profile.md index 1abb8ac37..17fbc7ed4 100644 --- a/docs/resources/datazone_environment_profile.md +++ b/docs/resources/datazone_environment_profile.md @@ -35,7 +35,8 @@ AWS Datazone Environment Profile is pre-configured set of resources and blueprin - `created_by` (String) The Amazon DataZone user who created this environment profile. - `domain_id` (String) The ID of the Amazon DataZone domain in which this environment profile is created. - `environment_blueprint_id` (String) The ID of the blueprint with which this environment profile is created. -- `id` (String) The ID of this Amazon DataZone environment profile. +- `environment_profile_id` (String) The ID of this Amazon DataZone environment profile. +- `id` (String) Uniquely identifies the resource. - `project_id` (String) The identifier of the project in which to create the environment profile. - `updated_at` (String) The timestamp of when this environment profile was updated. diff --git a/docs/resources/datazone_project.md b/docs/resources/datazone_project.md index 57ea5523a..2814d53d5 100644 --- a/docs/resources/datazone_project.md +++ b/docs/resources/datazone_project.md @@ -30,8 +30,9 @@ Amazon DataZone projects are business use case?based groupings of people, assets - `created_at` (String) The timestamp of when the project was created. - `created_by` (String) The Amazon DataZone user who created the project. - `domain_id` (String) The identifier of the Amazon DataZone domain in which the project was created. -- `id` (String) The ID of the Amazon DataZone project. +- `id` (String) Uniquely identifies the resource. - `last_updated_at` (String) The timestamp of when the project was last updated. +- `project_id` (String) The ID of the Amazon DataZone project. ## Import diff --git a/docs/resources/devopsguru_notification_channel.md b/docs/resources/devopsguru_notification_channel.md index 5a7ea7997..6cd049341 100644 --- a/docs/resources/devopsguru_notification_channel.md +++ b/docs/resources/devopsguru_notification_channel.md @@ -21,7 +21,8 @@ This resource schema represents the NotificationChannel resource in the Amazon D ### Read-Only -- `id` (String) The ID of a notification channel. +- `id` (String) Uniquely identifies the resource. +- `notification_channel_id` (String) The ID of a notification channel. ### Nested Schema for `config` diff --git a/docs/resources/ec2_capacity_reservation.md b/docs/resources/ec2_capacity_reservation.md index 25accdcaa..1ad0274d8 100644 --- a/docs/resources/ec2_capacity_reservation.md +++ b/docs/resources/ec2_capacity_reservation.md @@ -58,7 +58,8 @@ resource "awscc_ec2_capacity_reservation" "example-capacity-reservation-end-date ### Read-Only - `available_instance_count` (Number) -- `id` (String) The ID of this resource. +- `capacity_reservation_id` (String) +- `id` (String) Uniquely identifies the resource. - `total_instance_count` (Number) diff --git a/docs/resources/ec2_egress_only_internet_gateway.md b/docs/resources/ec2_egress_only_internet_gateway.md index 2a76ca8d5..e32219654 100644 --- a/docs/resources/ec2_egress_only_internet_gateway.md +++ b/docs/resources/ec2_egress_only_internet_gateway.md @@ -31,7 +31,8 @@ resource "awscc_ec2_egress_only_internet_gateway" "example" { ### Read-Only -- `id` (String) Service Generated ID of the EgressOnlyInternetGateway +- `egress_only_internet_gateway_id` (String) Service Generated ID of the EgressOnlyInternetGateway +- `id` (String) Uniquely identifies the resource. ## Import diff --git a/docs/resources/ec2_eip_association.md b/docs/resources/ec2_eip_association.md index fe7e55144..46b20c5e2 100644 --- a/docs/resources/ec2_eip_association.md +++ b/docs/resources/ec2_eip_association.md @@ -25,7 +25,8 @@ Resource schema for EC2 EIP association. ### Read-Only -- `id` (String) Composite ID of non-empty properties, to determine the identification. +- `eip_association_id` (String) Composite ID of non-empty properties, to determine the identification. +- `id` (String) Uniquely identifies the resource. ## Import diff --git a/docs/resources/ec2_flow_log.md b/docs/resources/ec2_flow_log.md index efb5f9d7d..f8930b6a3 100644 --- a/docs/resources/ec2_flow_log.md +++ b/docs/resources/ec2_flow_log.md @@ -35,7 +35,8 @@ Specifies a VPC flow log, which enables you to capture IP traffic for a specific ### Read-Only -- `id` (String) The Flow Log ID +- `flow_log_id` (String) The Flow Log ID +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `destination_options` diff --git a/docs/resources/ec2_network_acl.md b/docs/resources/ec2_network_acl.md index 0fc0eb41e..53a7aea7a 100644 --- a/docs/resources/ec2_network_acl.md +++ b/docs/resources/ec2_network_acl.md @@ -50,7 +50,8 @@ resource "awscc_ec2_network_acl" "main" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `network_acl_id` (String) ### Nested Schema for `tags` diff --git a/docs/resources/ec2_network_interface.md b/docs/resources/ec2_network_interface.md index 1d4cd722a..f97499e18 100644 --- a/docs/resources/ec2_network_interface.md +++ b/docs/resources/ec2_network_interface.md @@ -40,7 +40,8 @@ The AWS::EC2::NetworkInterface resource creates network interface ### Read-Only -- `id` (String) Network interface id. +- `id` (String) Uniquely identifies the resource. +- `network_interface_id` (String) Network interface id. - `primary_ipv_6_address` (String) The primary IPv6 address - `primary_private_ip_address` (String) Returns the primary private IP address of the network interface. - `secondary_private_ip_addresses` (List of String) Returns the secondary private IP addresses of the network interface. diff --git a/docs/resources/ec2_security_group.md b/docs/resources/ec2_security_group.md index 67e56e02e..4a06da47b 100644 --- a/docs/resources/ec2_security_group.md +++ b/docs/resources/ec2_security_group.md @@ -30,7 +30,8 @@ Resource Type definition for AWS::EC2::SecurityGroup ### Read-Only - `group_id` (String) The group ID of the specified security group. -- `id` (String) The group name or group ID depending on whether the SG is created in default or specific VPC +- `id` (String) Uniquely identifies the resource. +- `security_group_id` (String) The group name or group ID depending on whether the SG is created in default or specific VPC ### Nested Schema for `security_group_egress` diff --git a/docs/resources/ec2_security_group_egress.md b/docs/resources/ec2_security_group_egress.md index 928ab7221..6f80fb297 100644 --- a/docs/resources/ec2_security_group_egress.md +++ b/docs/resources/ec2_security_group_egress.md @@ -48,7 +48,8 @@ Adds the specified outbound (egress) rule to a security group. ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `security_group_egress_id` (String) ## Import diff --git a/docs/resources/ec2_security_group_ingress.md b/docs/resources/ec2_security_group_ingress.md index 0f5071ec5..682868054 100644 --- a/docs/resources/ec2_security_group_ingress.md +++ b/docs/resources/ec2_security_group_ingress.md @@ -47,7 +47,8 @@ Use this for ICMP and any protocol that uses ports. ### Read-Only -- `id` (String) The Security Group Rule Id +- `id` (String) Uniquely identifies the resource. +- `security_group_ingress_id` (String) The Security Group Rule Id ## Import diff --git a/docs/resources/ec2_spot_fleet.md b/docs/resources/ec2_spot_fleet.md index 7edd895da..f5b83bff8 100644 --- a/docs/resources/ec2_spot_fleet.md +++ b/docs/resources/ec2_spot_fleet.md @@ -21,7 +21,8 @@ Resource Type definition for AWS::EC2::SpotFleet ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `spot_fleet_id` (String) ### Nested Schema for `spot_fleet_request_config_data` diff --git a/docs/resources/ec2_subnet_cidr_block.md b/docs/resources/ec2_subnet_cidr_block.md index 862ff1f98..c6c5148c3 100644 --- a/docs/resources/ec2_subnet_cidr_block.md +++ b/docs/resources/ec2_subnet_cidr_block.md @@ -27,7 +27,8 @@ The AWS::EC2::SubnetCidrBlock resource creates association between subnet and IP ### Read-Only -- `id` (String) Information about the IPv6 association. +- `id` (String) Uniquely identifies the resource. +- `subnet_cidr_block_id` (String) Information about the IPv6 association. ## Import diff --git a/docs/resources/ec2_subnet_route_table_association.md b/docs/resources/ec2_subnet_route_table_association.md index 88eb54f03..1b4eff4fc 100644 --- a/docs/resources/ec2_subnet_route_table_association.md +++ b/docs/resources/ec2_subnet_route_table_association.md @@ -57,7 +57,8 @@ resource "awscc_ec2_subnet" "this" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `subnet_route_table_association_id` (String) ## Import diff --git a/docs/resources/ec2_transit_gateway.md b/docs/resources/ec2_transit_gateway.md index 5fb1d29bd..1477463b9 100644 --- a/docs/resources/ec2_transit_gateway.md +++ b/docs/resources/ec2_transit_gateway.md @@ -50,8 +50,9 @@ resource "awscc_ec2_transit_gateway" "example_transit_gateway" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `transit_gateway_arn` (String) +- `transit_gateway_id` (String) ### Nested Schema for `tags` diff --git a/docs/resources/ec2_transit_gateway_attachment.md b/docs/resources/ec2_transit_gateway_attachment.md index b4bcc223e..7ed8b4036 100644 --- a/docs/resources/ec2_transit_gateway_attachment.md +++ b/docs/resources/ec2_transit_gateway_attachment.md @@ -28,7 +28,8 @@ Resource Type definition for AWS::EC2::TransitGatewayAttachment ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `transit_gateway_attachment_id` (String) ### Nested Schema for `options` diff --git a/docs/resources/ec2_transit_gateway_vpc_attachment.md b/docs/resources/ec2_transit_gateway_vpc_attachment.md index 55d6e4ec3..b8fd90ffb 100644 --- a/docs/resources/ec2_transit_gateway_vpc_attachment.md +++ b/docs/resources/ec2_transit_gateway_vpc_attachment.md @@ -30,7 +30,8 @@ Resource Type definition for AWS::EC2::TransitGatewayVpcAttachment ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `transit_gateway_vpc_attachment_id` (String) ### Nested Schema for `options` diff --git a/docs/resources/ec2_vpc_cidr_block.md b/docs/resources/ec2_vpc_cidr_block.md index 068eb069a..385d513dc 100644 --- a/docs/resources/ec2_vpc_cidr_block.md +++ b/docs/resources/ec2_vpc_cidr_block.md @@ -32,7 +32,8 @@ Resource Type definition for AWS::EC2::VPCCidrBlock ### Read-Only -- `id` (String) The Id of the VPC associated CIDR Block. +- `id` (String) Uniquely identifies the resource. +- `vpc_cidr_block_id` (String) The Id of the VPC associated CIDR Block. ## Import diff --git a/docs/resources/ec2_vpc_endpoint.md b/docs/resources/ec2_vpc_endpoint.md index 9813665a7..e0d9b78b7 100644 --- a/docs/resources/ec2_vpc_endpoint.md +++ b/docs/resources/ec2_vpc_endpoint.md @@ -142,8 +142,9 @@ resource "awscc_ec2_vpc_endpoint" "example" { - `creation_timestamp` (String) - `dns_entries` (List of String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `network_interface_ids` (List of String) +- `vpc_endpoint_id` (String) ## Import diff --git a/docs/resources/ec2_vpc_peering_connection.md b/docs/resources/ec2_vpc_peering_connection.md index 1fb6e78f1..a9db5ed27 100644 --- a/docs/resources/ec2_vpc_peering_connection.md +++ b/docs/resources/ec2_vpc_peering_connection.md @@ -29,7 +29,8 @@ Resource Type definition for AWS::EC2::VPCPeeringConnection ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `vpc_peering_connection_id` (String) ### Nested Schema for `tags` diff --git a/docs/resources/ec2_vpcdhcp_options_association.md b/docs/resources/ec2_vpcdhcp_options_association.md new file mode 100644 index 000000000..573449ecf --- /dev/null +++ b/docs/resources/ec2_vpcdhcp_options_association.md @@ -0,0 +1,33 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ec2_vpcdhcp_options_association Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Associates a set of DHCP options with a VPC, or associates no DHCP options with the VPC. +--- + +# awscc_ec2_vpcdhcp_options_association (Resource) + +Associates a set of DHCP options with a VPC, or associates no DHCP options with the VPC. + + + + +## Schema + +### Required + +- `dhcp_options_id` (String) The ID of the DHCP options set, or default to associate no DHCP options with the VPC. +- `vpc_id` (String) The ID of the VPC. + +### Read-Only + +- `id` (String) Uniquely identifies the resource. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_ec2_vpcdhcp_options_association.example +``` diff --git a/docs/resources/ecs_task_set.md b/docs/resources/ecs_task_set.md index c2d37f6e9..ee820339f 100644 --- a/docs/resources/ecs_task_set.md +++ b/docs/resources/ecs_task_set.md @@ -34,7 +34,8 @@ Create a task set in the specified cluster and service. This is used when a serv ### Read-Only -- `id` (String) The ID of the task set. +- `id` (String) Uniquely identifies the resource. +- `task_set_id` (String) The ID of the task set. ### Nested Schema for `load_balancers` diff --git a/docs/resources/efs_mount_target.md b/docs/resources/efs_mount_target.md index 49c2f4a35..319d44ecb 100644 --- a/docs/resources/efs_mount_target.md +++ b/docs/resources/efs_mount_target.md @@ -63,7 +63,8 @@ resource "awscc_ec2_subnet" "main" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `mount_target_id` (String) ## Import diff --git a/docs/resources/eks_cluster.md b/docs/resources/eks_cluster.md index 7f5107931..c45fa0c81 100644 --- a/docs/resources/eks_cluster.md +++ b/docs/resources/eks_cluster.md @@ -213,10 +213,12 @@ resource "awscc_kms_key" "main" { ### Optional +- `access_config` (Attributes) An object representing the Access Config to use for the cluster. (see [below for nested schema](#nestedatt--access_config)) - `encryption_config` (Attributes List) (see [below for nested schema](#nestedatt--encryption_config)) - `kubernetes_network_config` (Attributes) The Kubernetes network configuration for the cluster. (see [below for nested schema](#nestedatt--kubernetes_network_config)) - `logging` (Attributes) Enable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs based on log types. By default, cluster control plane logs aren't exported to CloudWatch Logs. (see [below for nested schema](#nestedatt--logging)) - `name` (String) The unique name to give to your cluster. +- `outpost_config` (Attributes) An object representing the Outpost configuration to use for AWS EKS outpost cluster. (see [below for nested schema](#nestedatt--outpost_config)) - `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) - `version` (String) The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used. @@ -224,6 +226,7 @@ resource "awscc_kms_key" "main" { - `arn` (String) The ARN of the cluster, such as arn:aws:eks:us-west-2:666666666666:cluster/prod. - `certificate_authority_data` (String) The certificate-authority-data for your cluster. +- `cluster_id` (String) The unique ID given to your cluster. - `cluster_security_group_id` (String) The cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control plane to data plane communication. - `encryption_config_key_arn` (String) Amazon Resource Name (ARN) or alias of the customer master key (CMK). - `endpoint` (String) The endpoint for your Kubernetes API server, such as https://5E1D0CEXAMPLEA591B746AFC5AB30262.yl4.us-west-2.eks.amazonaws.com. @@ -245,6 +248,15 @@ Optional: - `security_group_ids` (List of String) Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used. + +### Nested Schema for `access_config` + +Optional: + +- `authentication_mode` (String) Specify the authentication mode that should be used to create your cluster. +- `bootstrap_cluster_creator_admin_permissions` (Boolean) Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster. + + ### Nested Schema for `encryption_config` @@ -299,6 +311,27 @@ Optional: + +### Nested Schema for `outpost_config` + +Required: + +- `control_plane_instance_type` (String) Specify the Instance type of the machines that should be used to create your cluster. +- `outpost_arns` (List of String) Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster. + +Optional: + +- `control_plane_placement` (Attributes) Specify the placement group of the control plane machines for your cluster. (see [below for nested schema](#nestedatt--outpost_config--control_plane_placement)) + + +### Nested Schema for `outpost_config.control_plane_placement` + +Optional: + +- `group_name` (String) Specify the placement group name of the control place machines for your cluster. + + + ### Nested Schema for `tags` diff --git a/docs/resources/eks_nodegroup.md b/docs/resources/eks_nodegroup.md deleted file mode 100644 index d09c23f4a..000000000 --- a/docs/resources/eks_nodegroup.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_eks_nodegroup Resource - terraform-provider-awscc" -subcategory: "" -description: |- - Resource schema for AWS::EKS::Nodegroup ---- - -# awscc_eks_nodegroup (Resource) - -Resource schema for AWS::EKS::Nodegroup - - - - -## Schema - -### Required - -- `cluster_name` (String) Name of the cluster to create the node group in. -- `node_role` (String) The Amazon Resource Name (ARN) of the IAM role to associate with your node group. -- `subnets` (List of String) The subnets to use for the Auto Scaling group that is created for your node group. - -### Optional - -- `ami_type` (String) The AMI type for your node group. -- `capacity_type` (String) The capacity type of your managed node group. -- `disk_size` (Number) The root device disk size (in GiB) for your node group instances. -- `force_update_enabled` (Boolean) Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue. -- `instance_types` (List of String) Specify the instance types for a node group. -- `labels` (Map of String) The Kubernetes labels to be applied to the nodes in the node group when they are created. -- `launch_template` (Attributes) An object representing a node group's launch template specification. (see [below for nested schema](#nestedatt--launch_template)) -- `nodegroup_name` (String) The unique name to give your node group. -- `release_version` (String) The AMI version of the Amazon EKS-optimized AMI to use with your node group. -- `remote_access` (Attributes) The remote access (SSH) configuration to use with your node group. (see [below for nested schema](#nestedatt--remote_access)) -- `scaling_config` (Attributes) The scaling configuration details for the Auto Scaling group that is created for your node group. (see [below for nested schema](#nestedatt--scaling_config)) -- `tags` (Map of String) The metadata, as key-value pairs, to apply to the node group to assist with categorization and organization. Follows same schema as Labels for consistency. -- `taints` (Attributes List) The Kubernetes taints to be applied to the nodes in the node group when they are created. (see [below for nested schema](#nestedatt--taints)) -- `update_config` (Attributes) The node group update configuration. (see [below for nested schema](#nestedatt--update_config)) -- `version` (String) The Kubernetes version to use for your managed nodes. - -### Read-Only - -- `arn` (String) -- `id` (String) The ID of this resource. - - -### Nested Schema for `launch_template` - -Optional: - -- `id` (String) -- `name` (String) -- `version` (String) - - - -### Nested Schema for `remote_access` - -Required: - -- `ec_2_ssh_key` (String) - -Optional: - -- `source_security_groups` (List of String) - - - -### Nested Schema for `scaling_config` - -Optional: - -- `desired_size` (Number) -- `max_size` (Number) -- `min_size` (Number) - - - -### Nested Schema for `taints` - -Optional: - -- `effect` (String) -- `key` (String) -- `value` (String) - - - -### Nested Schema for `update_config` - -Optional: - -- `max_unavailable` (Number) The maximum number of nodes unavailable at once during a version update. Nodes will be updated in parallel. This value or maxUnavailablePercentage is required to have a value.The maximum number is 100. -- `max_unavailable_percentage` (Number) The maximum percentage of nodes unavailable during a version update. This percentage of nodes will be updated in parallel, up to 100 nodes at once. This value or maxUnavailable is required to have a value. - -## Import - -Import is supported using the following syntax: - -```shell -$ terraform import awscc_eks_nodegroup.example -``` diff --git a/docs/resources/elasticbeanstalk_application_version.md b/docs/resources/elasticbeanstalk_application_version.md index 7ce200959..44a2a6fcd 100644 --- a/docs/resources/elasticbeanstalk_application_version.md +++ b/docs/resources/elasticbeanstalk_application_version.md @@ -26,7 +26,8 @@ Resource Type definition for AWS::ElasticBeanstalk::ApplicationVersion ### Read-Only -- `id` (String) The ID of this resource. +- `application_version_id` (String) +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `source_bundle` diff --git a/docs/resources/emrcontainers_virtual_cluster.md b/docs/resources/emrcontainers_virtual_cluster.md deleted file mode 100644 index 88881076b..000000000 --- a/docs/resources/emrcontainers_virtual_cluster.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_emrcontainers_virtual_cluster Resource - terraform-provider-awscc" -subcategory: "" -description: |- - Resource Schema of AWS::EMRContainers::VirtualCluster Type ---- - -# awscc_emrcontainers_virtual_cluster (Resource) - -Resource Schema of AWS::EMRContainers::VirtualCluster Type - - - - -## Schema - -### Required - -- `container_provider` (Attributes) Container provider of the virtual cluster. (see [below for nested schema](#nestedatt--container_provider)) -- `name` (String) Name of the virtual cluster. - -### Optional - -- `tags` (Attributes Set) An array of key-value pairs to apply to this virtual cluster. (see [below for nested schema](#nestedatt--tags)) - -### Read-Only - -- `arn` (String) -- `id` (String) Id of the virtual cluster. - - -### Nested Schema for `container_provider` - -Required: - -- `id` (String) The ID of the container cluster -- `info` (Attributes) (see [below for nested schema](#nestedatt--container_provider--info)) -- `type` (String) The type of the container provider - - -### Nested Schema for `container_provider.info` - -Required: - -- `eks_info` (Attributes) (see [below for nested schema](#nestedatt--container_provider--info--eks_info)) - - -### Nested Schema for `container_provider.info.eks_info` - -Required: - -- `namespace` (String) - - - - - -### Nested Schema for `tags` - -Required: - -- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. -- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. - -## Import - -Import is supported using the following syntax: - -```shell -$ terraform import awscc_emrcontainers_virtual_cluster.example -``` diff --git a/docs/resources/eventschemas_registry_policy.md b/docs/resources/eventschemas_registry_policy.md index 208d071a1..863d6db55 100644 --- a/docs/resources/eventschemas_registry_policy.md +++ b/docs/resources/eventschemas_registry_policy.md @@ -26,7 +26,8 @@ Resource Type definition for AWS::EventSchemas::RegistryPolicy ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `registry_policy_id` (String) ## Import diff --git a/docs/resources/fis_experiment_template.md b/docs/resources/fis_experiment_template.md index c1b41fd20..aad3f8fcf 100644 --- a/docs/resources/fis_experiment_template.md +++ b/docs/resources/fis_experiment_template.md @@ -31,7 +31,8 @@ Resource schema for AWS::FIS::ExperimentTemplate ### Read-Only -- `id` (String) The ID of this resource. +- `experiment_template_id` (String) +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `stop_conditions` diff --git a/docs/resources/fms_policy.md b/docs/resources/fms_policy.md index 6f4157540..d545ec9ef 100644 --- a/docs/resources/fms_policy.md +++ b/docs/resources/fms_policy.md @@ -38,7 +38,8 @@ Creates an AWS Firewall Manager policy. ### Read-Only - `arn` (String) A resource ARN. -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `policy_id` (String) ### Nested Schema for `security_service_policy_data` diff --git a/docs/resources/fms_resource_set.md b/docs/resources/fms_resource_set.md index 26805ade8..d5e15c101 100644 --- a/docs/resources/fms_resource_set.md +++ b/docs/resources/fms_resource_set.md @@ -28,7 +28,8 @@ Creates an AWS Firewall Manager resource set. ### Read-Only -- `id` (String) A Base62 ID +- `id` (String) Uniquely identifies the resource. +- `resource_set_id` (String) A Base62 ID ### Nested Schema for `tags` diff --git a/docs/resources/gamelift_script.md b/docs/resources/gamelift_script.md index b9e81b039..1f3223905 100644 --- a/docs/resources/gamelift_script.md +++ b/docs/resources/gamelift_script.md @@ -90,7 +90,8 @@ resource "aws_iam_policy" "example" { - `arn` (String) The Amazon Resource Name (ARN) that is assigned to a Amazon GameLift script resource and uniquely identifies it. ARNs are unique across all Regions. In a GameLift script ARN, the resource ID matches the Id value. - `creation_time` (String) A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057"). -- `id` (String) A unique identifier for the Realtime script +- `id` (String) Uniquely identifies the resource. +- `script_id` (String) A unique identifier for the Realtime script - `size_on_disk` (Number) The file size of the uploaded Realtime script, expressed in bytes. When files are uploaded from an S3 location, this value remains at "0". diff --git a/docs/resources/grafana_workspace.md b/docs/resources/grafana_workspace.md index a4ed9e1e1..15dd45b4d 100644 --- a/docs/resources/grafana_workspace.md +++ b/docs/resources/grafana_workspace.md @@ -42,11 +42,12 @@ Definition of AWS::Grafana::Workspace Resource Type - `creation_timestamp` (String) Timestamp when the workspace was created. - `endpoint` (String) Endpoint for the Grafana workspace. -- `id` (String) The id that uniquely identifies a Grafana workspace. +- `id` (String) Uniquely identifies the resource. - `modification_timestamp` (String) Timestamp when the workspace was last modified - `saml_configuration_status` (String) Valid SAML configuration statuses. - `sso_client_id` (String) The client ID of the AWS SSO Managed Application. - `status` (String) These enums represent the status of a workspace. +- `workspace_id` (String) The id that uniquely identifies a Grafana workspace. ### Nested Schema for `network_access_control` diff --git a/docs/resources/groundstation_config.md b/docs/resources/groundstation_config.md new file mode 100644 index 000000000..5b4d124b3 --- /dev/null +++ b/docs/resources/groundstation_config.md @@ -0,0 +1,225 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_groundstation_config Resource - terraform-provider-awscc" +subcategory: "" +description: |- + AWS Ground Station config resource type for CloudFormation. +--- + +# awscc_groundstation_config (Resource) + +AWS Ground Station config resource type for CloudFormation. + + + + +## Schema + +### Required + +- `config_data` (Attributes) (see [below for nested schema](#nestedatt--config_data)) +- `name` (String) + +### Optional + +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `config_id` (String) +- `id` (String) Uniquely identifies the resource. +- `type` (String) + + +### Nested Schema for `config_data` + +Optional: + +- `antenna_downlink_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config)) +- `antenna_downlink_demod_decode_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config)) +- `antenna_uplink_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config)) +- `dataflow_endpoint_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--dataflow_endpoint_config)) +- `s3_recording_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--s3_recording_config)) +- `tracking_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--tracking_config)) +- `uplink_echo_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--uplink_echo_config)) + + +### Nested Schema for `config_data.antenna_downlink_config` + +Optional: + +- `spectrum_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config--spectrum_config)) + + +### Nested Schema for `config_data.antenna_downlink_config.spectrum_config` + +Optional: + +- `bandwidth` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config--spectrum_config--bandwidth)) +- `center_frequency` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_config--spectrum_config--center_frequency)) +- `polarization` (String) + + +### Nested Schema for `config_data.antenna_downlink_config.spectrum_config.polarization` + +Optional: + +- `units` (String) +- `value` (Number) + + + +### Nested Schema for `config_data.antenna_downlink_config.spectrum_config.polarization` + +Optional: + +- `units` (String) +- `value` (Number) + + + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config` + +Optional: + +- `decode_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--decode_config)) +- `demodulation_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--demodulation_config)) +- `spectrum_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--spectrum_config)) + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.decode_config` + +Optional: + +- `unvalidated_json` (String) + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.demodulation_config` + +Optional: + +- `unvalidated_json` (String) + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.spectrum_config` + +Optional: + +- `bandwidth` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--spectrum_config--bandwidth)) +- `center_frequency` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_downlink_demod_decode_config--spectrum_config--center_frequency)) +- `polarization` (String) + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.spectrum_config.polarization` + +Optional: + +- `units` (String) +- `value` (Number) + + + +### Nested Schema for `config_data.antenna_downlink_demod_decode_config.spectrum_config.polarization` + +Optional: + +- `units` (String) +- `value` (Number) + + + + + +### Nested Schema for `config_data.antenna_uplink_config` + +Optional: + +- `spectrum_config` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config--spectrum_config)) +- `target_eirp` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config--target_eirp)) +- `transmit_disabled` (Boolean) + + +### Nested Schema for `config_data.antenna_uplink_config.spectrum_config` + +Optional: + +- `center_frequency` (Attributes) (see [below for nested schema](#nestedatt--config_data--antenna_uplink_config--spectrum_config--center_frequency)) +- `polarization` (String) + + +### Nested Schema for `config_data.antenna_uplink_config.spectrum_config.polarization` + +Optional: + +- `units` (String) +- `value` (Number) + + + + +### Nested Schema for `config_data.antenna_uplink_config.target_eirp` + +Optional: + +- `units` (String) +- `value` (Number) + + + + +### Nested Schema for `config_data.dataflow_endpoint_config` + +Optional: + +- `dataflow_endpoint_name` (String) +- `dataflow_endpoint_region` (String) + + + +### Nested Schema for `config_data.s3_recording_config` + +Optional: + +- `bucket_arn` (String) +- `prefix` (String) +- `role_arn` (String) + + + +### Nested Schema for `config_data.tracking_config` + +Optional: + +- `autotrack` (String) + + + +### Nested Schema for `config_data.uplink_echo_config` + +Optional: + +- `antenna_uplink_config_arn` (String) +- `enabled` (Boolean) + + + + +### Nested Schema for `tags` + +Optional: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_groundstation_config.example +``` diff --git a/docs/resources/groundstation_dataflow_endpoint_group.md b/docs/resources/groundstation_dataflow_endpoint_group.md index 1ed75216d..a6b861527 100644 --- a/docs/resources/groundstation_dataflow_endpoint_group.md +++ b/docs/resources/groundstation_dataflow_endpoint_group.md @@ -28,7 +28,8 @@ AWS Ground Station DataflowEndpointGroup schema for CloudFormation ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `dataflow_endpoint_group_id` (String) +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `endpoint_details` diff --git a/docs/resources/groundstation_mission_profile.md b/docs/resources/groundstation_mission_profile.md index c2770bcae..6a9aeebfb 100644 --- a/docs/resources/groundstation_mission_profile.md +++ b/docs/resources/groundstation_mission_profile.md @@ -33,7 +33,8 @@ AWS Ground Station Mission Profile resource type for CloudFormation. ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `mission_profile_id` (String) - `region` (String) diff --git a/docs/resources/guardduty_detector.md b/docs/resources/guardduty_detector.md index b45a913a3..b4b80afa1 100644 --- a/docs/resources/guardduty_detector.md +++ b/docs/resources/guardduty_detector.md @@ -28,7 +28,8 @@ Resource Type definition for AWS::GuardDuty::Detector ### Read-Only -- `id` (String) The ID of this resource. +- `detector_id` (String) +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `data_sources` diff --git a/docs/resources/guardduty_ip_set.md b/docs/resources/guardduty_ip_set.md index dcd1c5878..3ad07637c 100644 --- a/docs/resources/guardduty_ip_set.md +++ b/docs/resources/guardduty_ip_set.md @@ -29,7 +29,8 @@ Resource Type definition for AWS::GuardDuty::IPSet ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `ip_set_id` (String) ### Nested Schema for `tags` diff --git a/docs/resources/guardduty_threat_intel_set.md b/docs/resources/guardduty_threat_intel_set.md index b8f28dba9..2118c61e3 100644 --- a/docs/resources/guardduty_threat_intel_set.md +++ b/docs/resources/guardduty_threat_intel_set.md @@ -29,7 +29,8 @@ Resource Type definition for AWS::GuardDuty::ThreatIntelSet ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `threat_intel_set_id` (String) ### Nested Schema for `tags` diff --git a/docs/resources/iot_billing_group.md b/docs/resources/iot_billing_group.md new file mode 100644 index 000000000..931595a36 --- /dev/null +++ b/docs/resources/iot_billing_group.md @@ -0,0 +1,52 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_billing_group Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoT::BillingGroup +--- + +# awscc_iot_billing_group (Resource) + +Resource Type definition for AWS::IoT::BillingGroup + + + + +## Schema + +### Optional + +- `billing_group_name` (String) +- `billing_group_properties` (Attributes) (see [below for nested schema](#nestedatt--billing_group_properties)) +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `billing_group_id` (String) +- `id` (String) Uniquely identifies the resource. + + +### Nested Schema for `billing_group_properties` + +Optional: + +- `billing_group_description` (String) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iot_billing_group.example +``` diff --git a/docs/resources/iot_ca_certificate.md b/docs/resources/iot_ca_certificate.md index 50e816bd1..8a196b3cd 100644 --- a/docs/resources/iot_ca_certificate.md +++ b/docs/resources/iot_ca_certificate.md @@ -32,7 +32,8 @@ Registers a CA Certificate in IoT. ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `ca_certificate_id` (String) +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `registration_config` diff --git a/docs/resources/iot_certificate.md b/docs/resources/iot_certificate.md index e544c2e0b..d9a9bd038 100644 --- a/docs/resources/iot_certificate.md +++ b/docs/resources/iot_certificate.md @@ -29,7 +29,8 @@ Use the AWS::IoT::Certificate resource to declare an AWS IoT X.509 certificate. ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `certificate_id` (String) +- `id` (String) Uniquely identifies the resource. ## Import diff --git a/docs/resources/iot_policy.md b/docs/resources/iot_policy.md index 08f9229ac..37c8966dd 100644 --- a/docs/resources/iot_policy.md +++ b/docs/resources/iot_policy.md @@ -27,7 +27,8 @@ Resource Type definition for AWS::IoT::Policy ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `policy_id` (String) ### Nested Schema for `tags` diff --git a/docs/resources/iot_thing.md b/docs/resources/iot_thing.md new file mode 100644 index 000000000..9c450e3ff --- /dev/null +++ b/docs/resources/iot_thing.md @@ -0,0 +1,42 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoT::Thing +--- + +# awscc_iot_thing (Resource) + +Resource Type definition for AWS::IoT::Thing + + + + +## Schema + +### Optional + +- `attribute_payload` (Attributes) (see [below for nested schema](#nestedatt--attribute_payload)) +- `thing_name` (String) + +### Read-Only + +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `thing_id` (String) + + +### Nested Schema for `attribute_payload` + +Optional: + +- `attributes` (Map of String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iot_thing.example +``` diff --git a/docs/resources/iot_thing_group.md b/docs/resources/iot_thing_group.md new file mode 100644 index 000000000..43e82821a --- /dev/null +++ b/docs/resources/iot_thing_group.md @@ -0,0 +1,62 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing_group Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoT::ThingGroup +--- + +# awscc_iot_thing_group (Resource) + +Resource Type definition for AWS::IoT::ThingGroup + + + + +## Schema + +### Optional + +- `parent_group_name` (String) +- `query_string` (String) +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) +- `thing_group_name` (String) +- `thing_group_properties` (Attributes) (see [below for nested schema](#nestedatt--thing_group_properties)) + +### Read-Only + +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `thing_group_id` (String) + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + + + +### Nested Schema for `thing_group_properties` + +Optional: + +- `attribute_payload` (Attributes) (see [below for nested schema](#nestedatt--thing_group_properties--attribute_payload)) +- `thing_group_description` (String) + + +### Nested Schema for `thing_group_properties.attribute_payload` + +Optional: + +- `attributes` (Map of String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iot_thing_group.example +``` diff --git a/docs/resources/iot_thing_type.md b/docs/resources/iot_thing_type.md new file mode 100644 index 000000000..e4e48f275 --- /dev/null +++ b/docs/resources/iot_thing_type.md @@ -0,0 +1,54 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iot_thing_type Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoT::ThingType +--- + +# awscc_iot_thing_type (Resource) + +Resource Type definition for AWS::IoT::ThingType + + + + +## Schema + +### Optional + +- `deprecate_thing_type` (Boolean) +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) +- `thing_type_name` (String) +- `thing_type_properties` (Attributes) (see [below for nested schema](#nestedatt--thing_type_properties)) + +### Read-Only + +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `thing_type_id` (String) + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + + + +### Nested Schema for `thing_type_properties` + +Optional: + +- `searchable_attributes` (List of String) +- `thing_type_description` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iot_thing_type.example +``` diff --git a/docs/resources/iotanalytics_channel.md b/docs/resources/iotanalytics_channel.md new file mode 100644 index 000000000..38e8c818f --- /dev/null +++ b/docs/resources/iotanalytics_channel.md @@ -0,0 +1,75 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_channel Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoTAnalytics::Channel +--- + +# awscc_iotanalytics_channel (Resource) + +Resource Type definition for AWS::IoTAnalytics::Channel + + + + +## Schema + +### Optional + +- `channel_name` (String) +- `channel_storage` (Attributes) (see [below for nested schema](#nestedatt--channel_storage)) +- `retention_period` (Attributes) (see [below for nested schema](#nestedatt--retention_period)) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `channel_id` (String) +- `id` (String) Uniquely identifies the resource. + + +### Nested Schema for `channel_storage` + +Optional: + +- `customer_managed_s3` (Attributes) (see [below for nested schema](#nestedatt--channel_storage--customer_managed_s3)) +- `service_managed_s3` (String) + + +### Nested Schema for `channel_storage.customer_managed_s3` + +Required: + +- `bucket` (String) +- `role_arn` (String) + +Optional: + +- `key_prefix` (String) + + + + +### Nested Schema for `retention_period` + +Optional: + +- `number_of_days` (Number) +- `unlimited` (Boolean) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iotanalytics_channel.example +``` diff --git a/docs/resources/iotanalytics_dataset.md b/docs/resources/iotanalytics_dataset.md new file mode 100644 index 000000000..d55ed247d --- /dev/null +++ b/docs/resources/iotanalytics_dataset.md @@ -0,0 +1,271 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_dataset Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoTAnalytics::Dataset +--- + +# awscc_iotanalytics_dataset (Resource) + +Resource Type definition for AWS::IoTAnalytics::Dataset + + + + +## Schema + +### Required + +- `actions` (Attributes List) (see [below for nested schema](#nestedatt--actions)) + +### Optional + +- `content_delivery_rules` (Attributes List) (see [below for nested schema](#nestedatt--content_delivery_rules)) +- `dataset_name` (String) +- `late_data_rules` (Attributes List) (see [below for nested schema](#nestedatt--late_data_rules)) +- `retention_period` (Attributes) (see [below for nested schema](#nestedatt--retention_period)) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `triggers` (Attributes List) (see [below for nested schema](#nestedatt--triggers)) +- `versioning_configuration` (Attributes) (see [below for nested schema](#nestedatt--versioning_configuration)) + +### Read-Only + +- `dataset_id` (String) +- `id` (String) Uniquely identifies the resource. + + +### Nested Schema for `actions` + +Required: + +- `action_name` (String) + +Optional: + +- `container_action` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action)) +- `query_action` (Attributes) (see [below for nested schema](#nestedatt--actions--query_action)) + + +### Nested Schema for `actions.container_action` + +Required: + +- `execution_role_arn` (String) +- `image` (String) +- `resource_configuration` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action--resource_configuration)) + +Optional: + +- `variables` (Attributes List) (see [below for nested schema](#nestedatt--actions--container_action--variables)) + + +### Nested Schema for `actions.container_action.resource_configuration` + +Required: + +- `compute_type` (String) +- `volume_size_in_gb` (Number) + + + +### Nested Schema for `actions.container_action.variables` + +Required: + +- `variable_name` (String) + +Optional: + +- `dataset_content_version_value` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action--variables--dataset_content_version_value)) +- `double_value` (Number) +- `output_file_uri_value` (Attributes) (see [below for nested schema](#nestedatt--actions--container_action--variables--output_file_uri_value)) +- `string_value` (String) + + +### Nested Schema for `actions.container_action.variables.string_value` + +Required: + +- `dataset_name` (String) + + + +### Nested Schema for `actions.container_action.variables.string_value` + +Required: + +- `file_name` (String) + + + + + +### Nested Schema for `actions.query_action` + +Required: + +- `sql_query` (String) + +Optional: + +- `filters` (Attributes List) (see [below for nested schema](#nestedatt--actions--query_action--filters)) + + +### Nested Schema for `actions.query_action.filters` + +Optional: + +- `delta_time` (Attributes) (see [below for nested schema](#nestedatt--actions--query_action--filters--delta_time)) + + +### Nested Schema for `actions.query_action.filters.delta_time` + +Required: + +- `offset_seconds` (Number) +- `time_expression` (String) + + + + + + +### Nested Schema for `content_delivery_rules` + +Required: + +- `destination` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination)) + +Optional: + +- `entry_name` (String) + + +### Nested Schema for `content_delivery_rules.destination` + +Optional: + +- `iot_events_destination_configuration` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination--iot_events_destination_configuration)) +- `s3_destination_configuration` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination--s3_destination_configuration)) + + +### Nested Schema for `content_delivery_rules.destination.iot_events_destination_configuration` + +Required: + +- `input_name` (String) +- `role_arn` (String) + + + +### Nested Schema for `content_delivery_rules.destination.s3_destination_configuration` + +Required: + +- `bucket` (String) +- `key` (String) +- `role_arn` (String) + +Optional: + +- `glue_configuration` (Attributes) (see [below for nested schema](#nestedatt--content_delivery_rules--destination--s3_destination_configuration--glue_configuration)) + + +### Nested Schema for `content_delivery_rules.destination.s3_destination_configuration.glue_configuration` + +Required: + +- `database_name` (String) +- `table_name` (String) + + + + + + +### Nested Schema for `late_data_rules` + +Required: + +- `rule_configuration` (Attributes) (see [below for nested schema](#nestedatt--late_data_rules--rule_configuration)) + +Optional: + +- `rule_name` (String) + + +### Nested Schema for `late_data_rules.rule_configuration` + +Optional: + +- `delta_time_session_window_configuration` (Attributes) (see [below for nested schema](#nestedatt--late_data_rules--rule_configuration--delta_time_session_window_configuration)) + + +### Nested Schema for `late_data_rules.rule_configuration.delta_time_session_window_configuration` + +Required: + +- `timeout_in_minutes` (Number) + + + + + +### Nested Schema for `retention_period` + +Optional: + +- `number_of_days` (Number) +- `unlimited` (Boolean) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + + + +### Nested Schema for `triggers` + +Optional: + +- `schedule` (Attributes) (see [below for nested schema](#nestedatt--triggers--schedule)) +- `triggering_dataset` (Attributes) (see [below for nested schema](#nestedatt--triggers--triggering_dataset)) + + +### Nested Schema for `triggers.schedule` + +Required: + +- `schedule_expression` (String) + + + +### Nested Schema for `triggers.triggering_dataset` + +Required: + +- `dataset_name` (String) + + + + +### Nested Schema for `versioning_configuration` + +Optional: + +- `max_versions` (Number) +- `unlimited` (Boolean) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iotanalytics_dataset.example +``` diff --git a/docs/resources/iotanalytics_datastore.md b/docs/resources/iotanalytics_datastore.md new file mode 100644 index 000000000..5ab2bb9b4 --- /dev/null +++ b/docs/resources/iotanalytics_datastore.md @@ -0,0 +1,169 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_datastore Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoTAnalytics::Datastore +--- + +# awscc_iotanalytics_datastore (Resource) + +Resource Type definition for AWS::IoTAnalytics::Datastore + + + + +## Schema + +### Optional + +- `datastore_name` (String) +- `datastore_partitions` (Attributes) (see [below for nested schema](#nestedatt--datastore_partitions)) +- `datastore_storage` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage)) +- `file_format_configuration` (Attributes) (see [below for nested schema](#nestedatt--file_format_configuration)) +- `retention_period` (Attributes) (see [below for nested schema](#nestedatt--retention_period)) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `datastore_id` (String) +- `id` (String) Uniquely identifies the resource. + + +### Nested Schema for `datastore_partitions` + +Optional: + +- `partitions` (Attributes List) (see [below for nested schema](#nestedatt--datastore_partitions--partitions)) + + +### Nested Schema for `datastore_partitions.partitions` + +Optional: + +- `partition` (Attributes) (see [below for nested schema](#nestedatt--datastore_partitions--partitions--partition)) +- `timestamp_partition` (Attributes) (see [below for nested schema](#nestedatt--datastore_partitions--partitions--timestamp_partition)) + + +### Nested Schema for `datastore_partitions.partitions.partition` + +Required: + +- `attribute_name` (String) + + + +### Nested Schema for `datastore_partitions.partitions.timestamp_partition` + +Required: + +- `attribute_name` (String) + +Optional: + +- `timestamp_format` (String) + + + + + +### Nested Schema for `datastore_storage` + +Optional: + +- `customer_managed_s3` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage--customer_managed_s3)) +- `iot_site_wise_multi_layer_storage` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage--iot_site_wise_multi_layer_storage)) +- `service_managed_s3` (String) + + +### Nested Schema for `datastore_storage.customer_managed_s3` + +Required: + +- `bucket` (String) +- `role_arn` (String) + +Optional: + +- `key_prefix` (String) + + + +### Nested Schema for `datastore_storage.iot_site_wise_multi_layer_storage` + +Optional: + +- `customer_managed_s3_storage` (Attributes) (see [below for nested schema](#nestedatt--datastore_storage--iot_site_wise_multi_layer_storage--customer_managed_s3_storage)) + + +### Nested Schema for `datastore_storage.iot_site_wise_multi_layer_storage.customer_managed_s3_storage` + +Required: + +- `bucket` (String) + +Optional: + +- `key_prefix` (String) + + + + + +### Nested Schema for `file_format_configuration` + +Optional: + +- `json_configuration` (String) +- `parquet_configuration` (Attributes) (see [below for nested schema](#nestedatt--file_format_configuration--parquet_configuration)) + + +### Nested Schema for `file_format_configuration.parquet_configuration` + +Optional: + +- `schema_definition` (Attributes) (see [below for nested schema](#nestedatt--file_format_configuration--parquet_configuration--schema_definition)) + + +### Nested Schema for `file_format_configuration.parquet_configuration.schema_definition` + +Optional: + +- `columns` (Attributes List) (see [below for nested schema](#nestedatt--file_format_configuration--parquet_configuration--schema_definition--columns)) + + +### Nested Schema for `file_format_configuration.parquet_configuration.schema_definition.columns` + +Required: + +- `name` (String) +- `type` (String) + + + + + + +### Nested Schema for `retention_period` + +Optional: + +- `number_of_days` (Number) +- `unlimited` (Boolean) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iotanalytics_datastore.example +``` diff --git a/docs/resources/iotanalytics_pipeline.md b/docs/resources/iotanalytics_pipeline.md new file mode 100644 index 000000000..a0acd7c34 --- /dev/null +++ b/docs/resources/iotanalytics_pipeline.md @@ -0,0 +1,195 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_iotanalytics_pipeline Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::IoTAnalytics::Pipeline +--- + +# awscc_iotanalytics_pipeline (Resource) + +Resource Type definition for AWS::IoTAnalytics::Pipeline + + + + +## Schema + +### Required + +- `pipeline_activities` (Attributes List) (see [below for nested schema](#nestedatt--pipeline_activities)) + +### Optional + +- `pipeline_name` (String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `id` (String) Uniquely identifies the resource. +- `pipeline_id` (String) + + +### Nested Schema for `pipeline_activities` + +Optional: + +- `add_attributes` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--add_attributes)) +- `channel` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--channel)) +- `datastore` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--datastore)) +- `device_registry_enrich` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--device_registry_enrich)) +- `device_shadow_enrich` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--device_shadow_enrich)) +- `filter` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--filter)) +- `lambda` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--lambda)) +- `math` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--math)) +- `remove_attributes` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--remove_attributes)) +- `select_attributes` (Attributes) (see [below for nested schema](#nestedatt--pipeline_activities--select_attributes)) + + +### Nested Schema for `pipeline_activities.add_attributes` + +Required: + +- `attributes` (Map of String) +- `name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.channel` + +Required: + +- `channel_name` (String) +- `name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.datastore` + +Required: + +- `datastore_name` (String) +- `name` (String) + + + +### Nested Schema for `pipeline_activities.device_registry_enrich` + +Required: + +- `attribute` (String) +- `name` (String) +- `role_arn` (String) +- `thing_name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.device_shadow_enrich` + +Required: + +- `attribute` (String) +- `name` (String) +- `role_arn` (String) +- `thing_name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.filter` + +Required: + +- `filter` (String) +- `name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.lambda` + +Required: + +- `batch_size` (Number) +- `lambda_name` (String) +- `name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.math` + +Required: + +- `attribute` (String) +- `math` (String) +- `name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.remove_attributes` + +Required: + +- `attributes` (List of String) +- `name` (String) + +Optional: + +- `next` (String) + + + +### Nested Schema for `pipeline_activities.select_attributes` + +Required: + +- `attributes` (List of String) +- `name` (String) + +Optional: + +- `next` (String) + + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_iotanalytics_pipeline.example +``` diff --git a/docs/resources/iotfleetwise_fleet.md b/docs/resources/iotfleetwise_fleet.md index 2461e2a84..56b4113f7 100644 --- a/docs/resources/iotfleetwise_fleet.md +++ b/docs/resources/iotfleetwise_fleet.md @@ -17,6 +17,7 @@ Definition of AWS::IoTFleetWise::Fleet Resource Type ### Required +- `fleet_id` (String) - `signal_catalog_arn` (String) ### Optional @@ -28,7 +29,7 @@ Definition of AWS::IoTFleetWise::Fleet Resource Type - `arn` (String) - `creation_time` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `last_modification_time` (String) diff --git a/docs/resources/iotwireless_device_profile.md b/docs/resources/iotwireless_device_profile.md index 02d309af5..fcc6de488 100644 --- a/docs/resources/iotwireless_device_profile.md +++ b/docs/resources/iotwireless_device_profile.md @@ -24,7 +24,8 @@ Device Profile's resource schema demonstrating some basic constructs and validat ### Read-Only - `arn` (String) Service profile Arn. Returned after successful create. -- `id` (String) Service profile Id. Returned after successful create. +- `device_profile_id` (String) Service profile Id. Returned after successful create. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `lo_ra_wan` diff --git a/docs/resources/iotwireless_fuota_task.md b/docs/resources/iotwireless_fuota_task.md index bdf08802b..c1208d02a 100644 --- a/docs/resources/iotwireless_fuota_task.md +++ b/docs/resources/iotwireless_fuota_task.md @@ -34,8 +34,9 @@ Create and manage FUOTA tasks. ### Read-Only - `arn` (String) FUOTA task arn. Returned after successful create. +- `fuota_task_id` (String) FUOTA task id. Returned after successful create. - `fuota_task_status` (String) FUOTA task status. Returned after successful read. -- `id` (String) FUOTA task id. Returned after successful create. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `lo_ra_wan` diff --git a/docs/resources/iotwireless_multicast_group.md b/docs/resources/iotwireless_multicast_group.md index a6158c73e..7b0ae4218 100644 --- a/docs/resources/iotwireless_multicast_group.md +++ b/docs/resources/iotwireless_multicast_group.md @@ -30,7 +30,8 @@ Create and manage Multicast groups. ### Read-Only - `arn` (String) Multicast group arn. Returned after successful create. -- `id` (String) Multicast group id. Returned after successful create. +- `id` (String) Uniquely identifies the resource. +- `multicast_group_id` (String) Multicast group id. Returned after successful create. - `status` (String) Multicast group status. Returned after successful read. diff --git a/docs/resources/iotwireless_service_profile.md b/docs/resources/iotwireless_service_profile.md index 2f2aba520..a104fa83e 100644 --- a/docs/resources/iotwireless_service_profile.md +++ b/docs/resources/iotwireless_service_profile.md @@ -24,7 +24,8 @@ An example resource schema demonstrating some basic constructs and validation ru ### Read-Only - `arn` (String) Service profile Arn. Returned after successful create. -- `id` (String) Service profile Id. Returned after successful create. +- `id` (String) Uniquely identifies the resource. +- `service_profile_id` (String) Service profile Id. Returned after successful create. ### Nested Schema for `lo_ra_wan` diff --git a/docs/resources/iotwireless_task_definition.md b/docs/resources/iotwireless_task_definition.md index 4d0e8f80d..558fe195b 100644 --- a/docs/resources/iotwireless_task_definition.md +++ b/docs/resources/iotwireless_task_definition.md @@ -30,7 +30,8 @@ Creates a gateway task definition. ### Read-Only - `arn` (String) TaskDefinition arn. Returned after successful create. -- `id` (String) The ID of the new wireless gateway task definition +- `id` (String) Uniquely identifies the resource. +- `task_definition_id` (String) The ID of the new wireless gateway task definition ### Nested Schema for `lo_ra_wan_update_gateway_task_entry` diff --git a/docs/resources/iotwireless_wireless_device.md b/docs/resources/iotwireless_wireless_device.md index 56adf32eb..8ef356a64 100644 --- a/docs/resources/iotwireless_wireless_device.md +++ b/docs/resources/iotwireless_wireless_device.md @@ -33,8 +33,9 @@ Create and manage wireless gateways, including LoRa gateways. ### Read-Only - `arn` (String) Wireless device arn. Returned after successful create. -- `id` (String) Wireless device Id. Returned after successful create. +- `id` (String) Uniquely identifies the resource. - `thing_name` (String) Thing Arn. If there is a Thing created, this can be returned with a Get call. +- `wireless_device_id` (String) Wireless device Id. Returned after successful create. ### Nested Schema for `lo_ra_wan` diff --git a/docs/resources/iotwireless_wireless_device_import_task.md b/docs/resources/iotwireless_wireless_device_import_task.md index 3ed4b875b..7a3bb1bff 100644 --- a/docs/resources/iotwireless_wireless_device_import_task.md +++ b/docs/resources/iotwireless_wireless_device_import_task.md @@ -29,12 +29,13 @@ Wireless Device Import Tasks - `arn` (String) Arn for Wireless Device Import Task, Returned upon successful start. - `creation_date` (String) CreationDate for import task - `failed_imported_devices_count` (Number) Failed Imported Devices Count -- `id` (String) Id for Wireless Device Import Task, Returned upon successful start. +- `id` (String) Uniquely identifies the resource. - `initialized_imported_devices_count` (Number) Initialized Imported Devices Count - `onboarded_imported_devices_count` (Number) Onboarded Imported Devices Count - `pending_imported_devices_count` (Number) Pending Imported Devices Count - `status` (String) Status for import task - `status_reason` (String) StatusReason for import task +- `wireless_device_import_task_id` (String) Id for Wireless Device Import Task, Returned upon successful start. ### Nested Schema for `sidewalk` diff --git a/docs/resources/iotwireless_wireless_gateway.md b/docs/resources/iotwireless_wireless_gateway.md index 17610151d..908481ce2 100644 --- a/docs/resources/iotwireless_wireless_gateway.md +++ b/docs/resources/iotwireless_wireless_gateway.md @@ -31,7 +31,8 @@ Create and manage wireless gateways, including LoRa gateways. ### Read-Only - `arn` (String) Arn for Wireless Gateway. Returned upon successful create. -- `id` (String) Id for Wireless Gateway. Returned upon successful create. +- `id` (String) Uniquely identifies the resource. +- `wireless_gateway_id` (String) Id for Wireless Gateway. Returned upon successful create. ### Nested Schema for `lo_ra_wan` diff --git a/docs/resources/ivschat_logging_configuration.md b/docs/resources/ivschat_logging_configuration.md new file mode 100644 index 000000000..1763941a3 --- /dev/null +++ b/docs/resources/ivschat_logging_configuration.md @@ -0,0 +1,82 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ivschat_logging_configuration Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource type definition for AWS::IVSChat::LoggingConfiguration. +--- + +# awscc_ivschat_logging_configuration (Resource) + +Resource type definition for AWS::IVSChat::LoggingConfiguration. + + + + +## Schema + +### Required + +- `destination_configuration` (Attributes) Destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration)) + +### Optional + +- `name` (String) The name of the logging configuration. The value does not need to be unique. +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) LoggingConfiguration ARN is automatically generated on creation and assigned as the unique identifier. +- `id` (String) Uniquely identifies the resource. +- `logging_configuration_id` (String) The system-generated ID of the logging configuration. +- `state` (String) The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content. + + +### Nested Schema for `destination_configuration` + +Optional: + +- `cloudwatch_logs` (Attributes) CloudWatch destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration--cloudwatch_logs)) +- `firehose` (Attributes) Kinesis Firehose destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration--firehose)) +- `s3` (Attributes) S3 destination configuration for IVS Chat logging. (see [below for nested schema](#nestedatt--destination_configuration--s3)) + + +### Nested Schema for `destination_configuration.cloudwatch_logs` + +Required: + +- `log_group_name` (String) Name of the Amazon CloudWatch Logs log group where chat activity will be logged. + + + +### Nested Schema for `destination_configuration.firehose` + +Required: + +- `delivery_stream_name` (String) Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged. + + + +### Nested Schema for `destination_configuration.s3` + +Required: + +- `bucket_name` (String) Name of the Amazon S3 bucket where chat activity will be logged. + + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_ivschat_logging_configuration.example +``` diff --git a/docs/resources/ivschat_room.md b/docs/resources/ivschat_room.md new file mode 100644 index 000000000..88b5b0061 --- /dev/null +++ b/docs/resources/ivschat_room.md @@ -0,0 +1,56 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_ivschat_room Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource type definition for AWS::IVSChat::Room. +--- + +# awscc_ivschat_room (Resource) + +Resource type definition for AWS::IVSChat::Room. + + + + +## Schema + +### Optional + +- `logging_configuration_identifiers` (Set of String) Array of logging configuration identifiers attached to the room. +- `maximum_message_length` (Number) The maximum number of characters in a single message. +- `maximum_message_rate_per_second` (Number) The maximum number of messages per second that can be sent to the room. +- `message_review_handler` (Attributes) Configuration information for optional review of messages. (see [below for nested schema](#nestedatt--message_review_handler)) +- `name` (String) The name of the room. The value does not need to be unique. +- `tags` (Attributes Set) An array of key-value pairs to apply to this resource. (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) Room ARN is automatically generated on creation and assigned as the unique identifier. +- `id` (String) Uniquely identifies the resource. +- `room_id` (String) The system-generated ID of the room. + + +### Nested Schema for `message_review_handler` + +Optional: + +- `fallback_result` (String) Specifies the fallback behavior if the handler does not return a valid response, encounters an error, or times out. +- `uri` (String) Identifier of the message review handler. + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_ivschat_room.example +``` diff --git a/docs/resources/kendra_data_source.md b/docs/resources/kendra_data_source.md index 83024b5db..33704e6cc 100644 --- a/docs/resources/kendra_data_source.md +++ b/docs/resources/kendra_data_source.md @@ -34,7 +34,8 @@ Kendra DataSource ### Read-Only - `arn` (String) -- `id` (String) ID of data source +- `data_source_id` (String) ID of data source +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `custom_document_enrichment_configuration` diff --git a/docs/resources/kendra_faq.md b/docs/resources/kendra_faq.md index 75691318d..26feb6fb6 100644 --- a/docs/resources/kendra_faq.md +++ b/docs/resources/kendra_faq.md @@ -32,7 +32,8 @@ A Kendra FAQ resource ### Read-Only - `arn` (String) -- `id` (String) Unique ID of the FAQ +- `faq_id` (String) Unique ID of the FAQ +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `s3_path` diff --git a/docs/resources/kendra_index.md b/docs/resources/kendra_index.md index 98666c077..b4924e3b1 100644 --- a/docs/resources/kendra_index.md +++ b/docs/resources/kendra_index.md @@ -34,7 +34,8 @@ A Kendra index ### Read-Only - `arn` (String) -- `id` (String) Unique ID of index +- `id` (String) Uniquely identifies the resource. +- `index_id` (String) Unique ID of index ### Nested Schema for `capacity_units` diff --git a/docs/resources/kendraranking_execution_plan.md b/docs/resources/kendraranking_execution_plan.md index a4fcc5685..72849d8a0 100644 --- a/docs/resources/kendraranking_execution_plan.md +++ b/docs/resources/kendraranking_execution_plan.md @@ -28,7 +28,8 @@ A KendraRanking Rescore execution plan ### Read-Only - `arn` (String) -- `id` (String) Unique ID of rescore execution plan +- `execution_plan_id` (String) Unique ID of rescore execution plan +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `capacity_units` diff --git a/docs/resources/lambda_event_source_mapping b/docs/resources/lambda_event_source_mapping index c96872241..dadc602b7 100644 --- a/docs/resources/lambda_event_source_mapping +++ b/docs/resources/lambda_event_source_mapping @@ -69,7 +69,8 @@ resource "awscc_lambda_permission" "example" { ### Read-Only -- `id` (String) Event Source Mapping Identifier UUID. +- `event_source_mapping_id` (String) Event Source Mapping Identifier UUID. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `amazon_managed_kafka_event_source_config` diff --git a/docs/resources/lambda_event_source_mapping.md b/docs/resources/lambda_event_source_mapping.md index 35ad1b9e2..06bc33035 100644 --- a/docs/resources/lambda_event_source_mapping.md +++ b/docs/resources/lambda_event_source_mapping.md @@ -46,7 +46,8 @@ Resource Type definition for AWS::Lambda::EventSourceMapping ### Read-Only -- `id` (String) Event Source Mapping Identifier UUID. +- `event_source_mapping_id` (String) Event Source Mapping Identifier UUID. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `amazon_managed_kafka_event_source_config` diff --git a/docs/resources/lambda_layer_version_permission.md b/docs/resources/lambda_layer_version_permission.md index 011897f71..e2fb91f6d 100644 --- a/docs/resources/lambda_layer_version_permission.md +++ b/docs/resources/lambda_layer_version_permission.md @@ -27,7 +27,8 @@ Schema for Lambda LayerVersionPermission ### Read-Only -- `id` (String) ID generated by service +- `id` (String) Uniquely identifies the resource. +- `layer_version_permission_id` (String) ID generated by service ## Import diff --git a/docs/resources/lambda_permission.md b/docs/resources/lambda_permission.md index ef003680e..c7bb86e9d 100644 --- a/docs/resources/lambda_permission.md +++ b/docs/resources/lambda_permission.md @@ -99,7 +99,8 @@ resource "awscc_iam_role" "default" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `permission_id` (String) ## Import diff --git a/docs/resources/lex_bot.md b/docs/resources/lex_bot.md index 0023bf51a..572a0c322 100644 --- a/docs/resources/lex_bot.md +++ b/docs/resources/lex_bot.md @@ -35,7 +35,8 @@ Amazon Lex conversational bot performing automated tasks such as ordering a pizz ### Read-Only - `arn` (String) -- `id` (String) Unique ID of resource +- `bot_id` (String) Unique ID of resource +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `data_privacy` diff --git a/docs/resources/lex_resource_policy.md b/docs/resources/lex_resource_policy.md index 9364ea22a..463acb339 100644 --- a/docs/resources/lex_resource_policy.md +++ b/docs/resources/lex_resource_policy.md @@ -22,7 +22,8 @@ A resource policy with specified policy statements that attaches to a Lex bot or ### Read-Only -- `id` (String) The Physical ID of the resource policy. +- `id` (String) Uniquely identifies the resource. +- `resource_policy_id` (String) The Physical ID of the resource policy. - `revision_id` (String) The current revision of the resource policy. Use the revision ID to make sure that you are updating the most current version of a resource policy when you add a policy statement to a resource, delete a resource, or update a resource. ## Import diff --git a/docs/resources/macie_allow_list.md b/docs/resources/macie_allow_list.md index b30d423c8..35e781cb0 100644 --- a/docs/resources/macie_allow_list.md +++ b/docs/resources/macie_allow_list.md @@ -27,8 +27,9 @@ Macie AllowList resource schema ### Read-Only +- `allow_list_id` (String) AllowList ID. - `arn` (String) AllowList ARN. -- `id` (String) AllowList ID. +- `id` (String) Uniquely identifies the resource. - `status` (String) AllowList status. diff --git a/docs/resources/macie_custom_data_identifier.md b/docs/resources/macie_custom_data_identifier.md index a9b57fe94..06d7af51c 100644 --- a/docs/resources/macie_custom_data_identifier.md +++ b/docs/resources/macie_custom_data_identifier.md @@ -31,7 +31,8 @@ Macie CustomDataIdentifier resource schema ### Read-Only - `arn` (String) Custom data identifier ARN. -- `id` (String) Custom data identifier ID. +- `custom_data_identifier_id` (String) Custom data identifier ID. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `tags` diff --git a/docs/resources/macie_findings_filter.md b/docs/resources/macie_findings_filter.md index 44249ea0b..2bde8f4b1 100644 --- a/docs/resources/macie_findings_filter.md +++ b/docs/resources/macie_findings_filter.md @@ -30,7 +30,8 @@ Macie FindingsFilter resource schema. ### Read-Only - `arn` (String) Findings filter ARN. -- `id` (String) Findings filter ID. +- `findings_filter_id` (String) Findings filter ID. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `finding_criteria` diff --git a/docs/resources/managedblockchain_accessor.md b/docs/resources/managedblockchain_accessor.md index 99427d513..189d892e8 100644 --- a/docs/resources/managedblockchain_accessor.md +++ b/docs/resources/managedblockchain_accessor.md @@ -26,10 +26,11 @@ Definition of AWS::ManagedBlockchain::com.amazonaws.taiga.webservice.api#Accesso ### Read-Only +- `accessor_id` (String) - `arn` (String) - `billing_token` (String) - `creation_date` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `status` (String) diff --git a/docs/resources/medialive_multiplex.md b/docs/resources/medialive_multiplex.md index b45212ba4..eec0bdbdc 100644 --- a/docs/resources/medialive_multiplex.md +++ b/docs/resources/medialive_multiplex.md @@ -29,7 +29,8 @@ Resource schema for AWS::MediaLive::Multiplex ### Read-Only - `arn` (String) The unique arn of the multiplex. -- `id` (String) The unique id of the multiplex. +- `id` (String) Uniquely identifies the resource. +- `multiplex_id` (String) The unique id of the multiplex. - `pipelines_running_count` (Number) The number of currently healthy pipelines. - `program_count` (Number) The number of programs in the multiplex. - `state` (String) diff --git a/docs/resources/mediapackage_asset.md b/docs/resources/mediapackage_asset.md index 61ad57c1b..1e46e8ff2 100644 --- a/docs/resources/mediapackage_asset.md +++ b/docs/resources/mediapackage_asset.md @@ -17,7 +17,7 @@ Resource schema for AWS::MediaPackage::Asset ### Required -- `id` (String) The unique identifier for the Asset. +- `asset_id` (String) The unique identifier for the Asset. - `packaging_group_id` (String) The ID of the PackagingGroup for the Asset. - `source_arn` (String) ARN of the source object in S3. - `source_role_arn` (String) The IAM role_arn used to access the source S3 bucket. @@ -32,6 +32,7 @@ Resource schema for AWS::MediaPackage::Asset - `arn` (String) The ARN of the Asset. - `created_at` (String) The time the Asset was initially submitted for Ingest. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `egress_endpoints` diff --git a/docs/resources/mediapackage_channel.md b/docs/resources/mediapackage_channel.md deleted file mode 100644 index e60d38339..000000000 --- a/docs/resources/mediapackage_channel.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_mediapackage_channel Resource - terraform-provider-awscc" -subcategory: "" -description: |- - Resource schema for AWS::MediaPackage::Channel ---- - -# awscc_mediapackage_channel (Resource) - -Resource schema for AWS::MediaPackage::Channel - - - - -## Schema - -### Required - -- `id` (String) The ID of the Channel. - -### Optional - -- `description` (String) A short text description of the Channel. -- `egress_access_logs` (Attributes) The configuration parameters for egress access logging. (see [below for nested schema](#nestedatt--egress_access_logs)) -- `hls_ingest` (Attributes) An HTTP Live Streaming (HLS) ingest resource configuration. (see [below for nested schema](#nestedatt--hls_ingest)) -- `ingress_access_logs` (Attributes) The configuration parameters for egress access logging. (see [below for nested schema](#nestedatt--ingress_access_logs)) -- `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) - -### Read-Only - -- `arn` (String) The Amazon Resource Name (ARN) assigned to the Channel. - - -### Nested Schema for `egress_access_logs` - -Optional: - -- `log_group_name` (String) Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs. - - - -### Nested Schema for `hls_ingest` - -Optional: - -- `ingest_endpoints` (Attributes List) A list of endpoints to which the source stream should be sent. (see [below for nested schema](#nestedatt--hls_ingest--ingest_endpoints)) - - -### Nested Schema for `hls_ingest.ingest_endpoints` - -Required: - -- `id` (String) The system generated unique identifier for the IngestEndpoint -- `password` (String) The system generated password for ingest authentication. -- `url` (String) The ingest URL to which the source stream should be sent. -- `username` (String) The system generated username for ingest authentication. - - - - -### Nested Schema for `ingress_access_logs` - -Optional: - -- `log_group_name` (String) Sets a custom AWS CloudWatch log group name for access logs. If a log group name isn't specified, the defaults are used: /aws/MediaPackage/EgressAccessLogs for egress access logs and /aws/MediaPackage/IngressAccessLogs for ingress access logs. - - - -### Nested Schema for `tags` - -Required: - -- `key` (String) -- `value` (String) - -## Import - -Import is supported using the following syntax: - -```shell -$ terraform import awscc_mediapackage_channel.example -``` diff --git a/docs/resources/mediapackage_origin_endpoint.md b/docs/resources/mediapackage_origin_endpoint.md deleted file mode 100644 index e154f9bf6..000000000 --- a/docs/resources/mediapackage_origin_endpoint.md +++ /dev/null @@ -1,340 +0,0 @@ ---- -# generated by https://github.com/hashicorp/terraform-plugin-docs -page_title: "awscc_mediapackage_origin_endpoint Resource - terraform-provider-awscc" -subcategory: "" -description: |- - Resource schema for AWS::MediaPackage::OriginEndpoint ---- - -# awscc_mediapackage_origin_endpoint (Resource) - -Resource schema for AWS::MediaPackage::OriginEndpoint - - - - -## Schema - -### Required - -- `channel_id` (String) The ID of the Channel the OriginEndpoint is associated with. -- `id` (String) The ID of the OriginEndpoint. - -### Optional - -- `authorization` (Attributes) CDN Authorization credentials (see [below for nested schema](#nestedatt--authorization)) -- `cmaf_package` (Attributes) A Common Media Application Format (CMAF) packaging configuration. (see [below for nested schema](#nestedatt--cmaf_package)) -- `dash_package` (Attributes) A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration. (see [below for nested schema](#nestedatt--dash_package)) -- `description` (String) A short text description of the OriginEndpoint. -- `hls_package` (Attributes) An HTTP Live Streaming (HLS) packaging configuration. (see [below for nested schema](#nestedatt--hls_package)) -- `manifest_name` (String) A short string appended to the end of the OriginEndpoint URL. -- `mss_package` (Attributes) A Microsoft Smooth Streaming (MSS) packaging configuration. (see [below for nested schema](#nestedatt--mss_package)) -- `origination` (String) Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination -- `startover_window_seconds` (Number) Maximum duration (seconds) of content to retain for startover playback. If not specified, startover playback will be disabled for the OriginEndpoint. -- `tags` (Attributes List) A collection of tags associated with a resource (see [below for nested schema](#nestedatt--tags)) -- `time_delay_seconds` (Number) Amount of delay (seconds) to enforce on the playback of live content. If not specified, there will be no time delay in effect for the OriginEndpoint. -- `whitelist` (List of String) A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint. - -### Read-Only - -- `arn` (String) The Amazon Resource Name (ARN) assigned to the OriginEndpoint. -- `url` (String) The URL of the packaged OriginEndpoint for consumption. - - -### Nested Schema for `authorization` - -Required: - -- `cdn_identifier_secret` (String) The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint. -- `secrets_role_arn` (String) The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager. - - - -### Nested Schema for `cmaf_package` - -Optional: - -- `encryption` (Attributes) A Common Media Application Format (CMAF) encryption configuration. (see [below for nested schema](#nestedatt--cmaf_package--encryption)) -- `hls_manifests` (Attributes List) A list of HLS manifest configurations (see [below for nested schema](#nestedatt--cmaf_package--hls_manifests)) -- `segment_duration_seconds` (Number) Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration. -- `segment_prefix` (String) An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--cmaf_package--stream_selection)) - - -### Nested Schema for `cmaf_package.encryption` - -Required: - -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--cmaf_package--encryption--speke_key_provider)) - -Optional: - -- `constant_initialization_vector` (String) An optional 128-bit, 16-byte hex value represented by a 32-character string, used in conjunction with the key for encrypting blocks. If you don't specify a value, then MediaPackage creates the constant initialization vector (IV). -- `encryption_method` (String) The encryption method used -- `key_rotation_interval_seconds` (Number) Time (in seconds) between each encryption key rotation. - - -### Nested Schema for `cmaf_package.encryption.speke_key_provider` - -Required: - -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - -Optional: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--cmaf_package--encryption--speke_key_provider--encryption_contract_configuration)) - - -### Nested Schema for `cmaf_package.encryption.speke_key_provider.encryption_contract_configuration` - -Required: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `cmaf_package.hls_manifests` - -Required: - -- `id` (String) The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created. - -Optional: - -- `ad_markers` (String) This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0. -- `ad_triggers` (List of String) A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types. -- `ads_on_delivery_restrictions` (String) This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers. -- `include_iframe_only_stream` (Boolean) When enabled, an I-Frame only stream will be included in the output. -- `manifest_name` (String) An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint. -- `playlist_type` (String) The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist. -- `playlist_window_seconds` (Number) Time window (in seconds) contained in each parent manifest. -- `program_date_time_interval_seconds` (Number) The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output. -- `url` (String) The URL of the packaged OriginEndpoint for consumption. - - - -### Nested Schema for `cmaf_package.stream_selection` - -Optional: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `dash_package` - -Optional: - -- `ad_triggers` (List of String) A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types. -- `ads_on_delivery_restrictions` (String) This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers. -- `encryption` (Attributes) A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration. (see [below for nested schema](#nestedatt--dash_package--encryption)) -- `include_iframe_only_stream` (Boolean) When enabled, an I-Frame only stream will be included in the output. -- `manifest_layout` (String) Determines the position of some tags in the Media Presentation Description (MPD). When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation. When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level. -- `manifest_window_seconds` (Number) Time window (in seconds) contained in each manifest. -- `min_buffer_time_seconds` (Number) Minimum duration (in seconds) that a player will buffer media before starting the presentation. -- `min_update_period_seconds` (Number) Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD). -- `period_triggers` (List of String) A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not be partitioned into more than one period. If the list contains "ADS", new periods will be created where the Channel source contains SCTE-35 ad markers. -- `profile` (String) The Dynamic Adaptive Streaming over HTTP (DASH) profile type. When set to "HBBTV_1_5", HbbTV 1.5 compliant output is enabled. -- `segment_duration_seconds` (Number) Duration (in seconds) of each segment. Actual segments will be rounded to the nearest multiple of the source segment duration. -- `segment_template_format` (String) Determines the type of SegmentTemplate included in the Media Presentation Description (MPD). When set to NUMBER_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs. When set to TIME_WITH_TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER_WITH_DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--dash_package--stream_selection)) -- `suggested_presentation_delay_seconds` (Number) Duration (in seconds) to delay live content before presentation. -- `utc_timing` (String) Determines the type of UTCTiming included in the Media Presentation Description (MPD) -- `utc_timing_uri` (String) Specifies the value attribute of the UTCTiming field when utcTiming is set to HTTP-ISO, HTTP-HEAD or HTTP-XSDATE - - -### Nested Schema for `dash_package.encryption` - -Required: - -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--dash_package--encryption--speke_key_provider)) - -Optional: - -- `key_rotation_interval_seconds` (Number) Time (in seconds) between each encryption key rotation. - - -### Nested Schema for `dash_package.encryption.speke_key_provider` - -Required: - -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - -Optional: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--dash_package--encryption--speke_key_provider--encryption_contract_configuration)) - - -### Nested Schema for `dash_package.encryption.speke_key_provider.encryption_contract_configuration` - -Required: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `dash_package.stream_selection` - -Optional: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `hls_package` - -Optional: - -- `ad_markers` (String) This setting controls how ad markers are included in the packaged OriginEndpoint. "NONE" will omit all SCTE-35 ad markers from the output. "PASSTHROUGH" causes the manifest to contain a copy of the SCTE-35 ad markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest. "SCTE35_ENHANCED" generates ad markers and blackout tags based on SCTE-35 messages in the input source. "DATERANGE" inserts EXT-X-DATERANGE tags to signal ad and program transition events in HLS and CMAF manifests. For this option, you must set a programDateTimeIntervalSeconds value that is greater than 0. -- `ad_triggers` (List of String) A list of SCTE-35 message types that are treated as ad markers in the output. If empty, no ad markers are output. Specify multiple items to create ad markers for all of the included message types. -- `ads_on_delivery_restrictions` (String) This setting allows the delivery restriction flags on SCTE-35 segmentation descriptors to determine whether a message signals an ad. Choosing "NONE" means no SCTE-35 messages become ads. Choosing "RESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that contain delivery restrictions will be treated as ads. Choosing "UNRESTRICTED" means SCTE-35 messages of the types specified in AdTriggers that do not contain delivery restrictions will be treated as ads. Choosing "BOTH" means all SCTE-35 messages of the types specified in AdTriggers will be treated as ads. Note that Splice Insert messages do not have these flags and are always treated as ads if specified in AdTriggers. -- `encryption` (Attributes) An HTTP Live Streaming (HLS) encryption configuration. (see [below for nested schema](#nestedatt--hls_package--encryption)) -- `include_dvb_subtitles` (Boolean) When enabled, MediaPackage passes through digital video broadcasting (DVB) subtitles into the output. -- `include_iframe_only_stream` (Boolean) When enabled, an I-Frame only stream will be included in the output. -- `playlist_type` (String) The HTTP Live Streaming (HLS) playlist type. When either "EVENT" or "VOD" is specified, a corresponding EXT-X-PLAYLIST-TYPE entry will be included in the media playlist. -- `playlist_window_seconds` (Number) Time window (in seconds) contained in each parent manifest. -- `program_date_time_interval_seconds` (Number) The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag inserted into manifests. Additionally, when an interval is specified ID3Timed Metadata messages will be generated every 5 seconds using the ingest time of the content. If the interval is not specified, or set to 0, then no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no ID3Timed Metadata messages will be generated. Note that irrespective of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input, it will be passed through to HLS output. -- `segment_duration_seconds` (Number) Duration (in seconds) of each fragment. Actual fragments will be rounded to the nearest multiple of the source fragment duration. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--hls_package--stream_selection)) -- `use_audio_rendition_group` (Boolean) When enabled, audio streams will be placed in rendition groups in the output. - - -### Nested Schema for `hls_package.encryption` - -Required: - -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--hls_package--encryption--speke_key_provider)) - -Optional: - -- `constant_initialization_vector` (String) A constant initialization vector for encryption (optional). When not specified the initialization vector will be periodically rotated. -- `encryption_method` (String) The encryption method to use. -- `key_rotation_interval_seconds` (Number) Interval (in seconds) between each encryption key rotation. -- `repeat_ext_x_key` (Boolean) When enabled, the EXT-X-KEY tag will be repeated in output manifests. - - -### Nested Schema for `hls_package.encryption.speke_key_provider` - -Required: - -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - -Optional: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--hls_package--encryption--speke_key_provider--encryption_contract_configuration)) - - -### Nested Schema for `hls_package.encryption.speke_key_provider.encryption_contract_configuration` - -Required: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `hls_package.stream_selection` - -Optional: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `mss_package` - -Optional: - -- `encryption` (Attributes) A Microsoft Smooth Streaming (MSS) encryption configuration. (see [below for nested schema](#nestedatt--mss_package--encryption)) -- `manifest_window_seconds` (Number) The time window (in seconds) contained in each manifest. -- `segment_duration_seconds` (Number) The duration (in seconds) of each segment. -- `stream_selection` (Attributes) A StreamSelection configuration. (see [below for nested schema](#nestedatt--mss_package--stream_selection)) - - -### Nested Schema for `mss_package.encryption` - -Required: - -- `speke_key_provider` (Attributes) A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys. (see [below for nested schema](#nestedatt--mss_package--encryption--speke_key_provider)) - - -### Nested Schema for `mss_package.encryption.speke_key_provider` - -Required: - -- `resource_id` (String) The resource ID to include in key requests. -- `role_arn` (String) An Amazon Resource Name (ARN) of an IAM role that AWS Elemental MediaPackage will assume when accessing the key provider service. -- `system_ids` (List of String) The system IDs to include in key requests. -- `url` (String) The URL of the external key provider service. - -Optional: - -- `certificate_arn` (String) An Amazon Resource Name (ARN) of a Certificate Manager certificate that MediaPackage will use for enforcing secure end-to-end data transfer with the key provider service. -- `encryption_contract_configuration` (Attributes) The configuration to use for encrypting one or more content tracks separately for endpoints that use SPEKE 2.0. (see [below for nested schema](#nestedatt--mss_package--encryption--speke_key_provider--encryption_contract_configuration)) - - -### Nested Schema for `mss_package.encryption.speke_key_provider.encryption_contract_configuration` - -Required: - -- `preset_speke_20_audio` (String) A collection of audio encryption presets. -- `preset_speke_20_video` (String) A collection of video encryption presets. - - - - - -### Nested Schema for `mss_package.stream_selection` - -Optional: - -- `max_video_bits_per_second` (Number) The maximum video bitrate (bps) to include in output. -- `min_video_bits_per_second` (Number) The minimum video bitrate (bps) to include in output. -- `stream_order` (String) A directive that determines the order of streams in the output. - - - - -### Nested Schema for `tags` - -Required: - -- `key` (String) -- `value` (String) - -## Import - -Import is supported using the following syntax: - -```shell -$ terraform import awscc_mediapackage_origin_endpoint.example -``` diff --git a/docs/resources/mediapackage_packaging_configuration.md b/docs/resources/mediapackage_packaging_configuration.md index cf839b5fb..2e49d1f0d 100644 --- a/docs/resources/mediapackage_packaging_configuration.md +++ b/docs/resources/mediapackage_packaging_configuration.md @@ -17,7 +17,7 @@ Resource schema for AWS::MediaPackage::PackagingConfiguration ### Required -- `id` (String) The ID of the PackagingConfiguration. +- `packaging_configuration_id` (String) The ID of the PackagingConfiguration. - `packaging_group_id` (String) The ID of a PackagingGroup. ### Optional @@ -31,6 +31,7 @@ Resource schema for AWS::MediaPackage::PackagingConfiguration ### Read-Only - `arn` (String) The ARN of the PackagingConfiguration. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `cmaf_package` diff --git a/docs/resources/mediapackage_packaging_group.md b/docs/resources/mediapackage_packaging_group.md index daf99fcbc..5ee9c4eb5 100644 --- a/docs/resources/mediapackage_packaging_group.md +++ b/docs/resources/mediapackage_packaging_group.md @@ -17,7 +17,7 @@ Resource schema for AWS::MediaPackage::PackagingGroup ### Required -- `id` (String) The ID of the PackagingGroup. +- `packaging_group_id` (String) The ID of the PackagingGroup. ### Optional @@ -29,6 +29,7 @@ Resource schema for AWS::MediaPackage::PackagingGroup - `arn` (String) The ARN of the PackagingGroup. - `domain_name` (String) The fully qualified domain name for Assets in the PackagingGroup. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `authorization` diff --git a/docs/resources/networkmanager_global_network.md b/docs/resources/networkmanager_global_network.md index f94dde86d..492a59713 100644 --- a/docs/resources/networkmanager_global_network.md +++ b/docs/resources/networkmanager_global_network.md @@ -37,7 +37,8 @@ resource "awscc_networkmanager_global_network" "example" { ### Read-Only - `arn` (String) The Amazon Resource Name (ARN) of the global network. -- `id` (String) The ID of the global network. +- `global_network_id` (String) The ID of the global network. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `tags` diff --git a/docs/resources/omics_run_group.md b/docs/resources/omics_run_group.md index 9433b2870..12c49bea6 100644 --- a/docs/resources/omics_run_group.md +++ b/docs/resources/omics_run_group.md @@ -28,7 +28,8 @@ Definition of AWS::Omics::RunGroup Resource Type - `arn` (String) - `creation_time` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `run_group_id` (String) ## Import diff --git a/docs/resources/omics_variant_store.md b/docs/resources/omics_variant_store.md new file mode 100644 index 000000000..a0adc1a63 --- /dev/null +++ b/docs/resources/omics_variant_store.md @@ -0,0 +1,65 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_omics_variant_store Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Definition of AWS::Omics::VariantStore Resource Type +--- + +# awscc_omics_variant_store (Resource) + +Definition of AWS::Omics::VariantStore Resource Type + + + + +## Schema + +### Required + +- `name` (String) +- `reference` (Attributes) (see [below for nested schema](#nestedatt--reference)) + +### Optional + +- `description` (String) +- `sse_config` (Attributes) (see [below for nested schema](#nestedatt--sse_config)) +- `tags` (Map of String) + +### Read-Only + +- `creation_time` (String) +- `id` (String) Uniquely identifies the resource. +- `status` (String) +- `status_message` (String) +- `store_arn` (String) +- `store_size_bytes` (Number) +- `update_time` (String) +- `variant_store_id` (String) + + +### Nested Schema for `reference` + +Required: + +- `reference_arn` (String) + + + +### Nested Schema for `sse_config` + +Required: + +- `type` (String) + +Optional: + +- `key_arn` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_omics_variant_store.example +``` diff --git a/docs/resources/omics_workflow.md b/docs/resources/omics_workflow.md index 9fae8460a..4a767e541 100644 --- a/docs/resources/omics_workflow.md +++ b/docs/resources/omics_workflow.md @@ -31,9 +31,10 @@ Definition of AWS::Omics::Workflow Resource Type - `arn` (String) - `creation_time` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. - `status` (String) - `type` (String) +- `workflow_id` (String) ### Nested Schema for `parameter_template` diff --git a/docs/resources/opensearchserverless_collection.md b/docs/resources/opensearchserverless_collection.md index 76ffde62c..7f7e91586 100644 --- a/docs/resources/opensearchserverless_collection.md +++ b/docs/resources/opensearchserverless_collection.md @@ -64,8 +64,9 @@ Contains between 3 and 32 characters - `arn` (String) The Amazon Resource Name (ARN) of the collection. - `collection_endpoint` (String) The endpoint for the collection. +- `collection_id` (String) The identifier of the collection - `dashboard_endpoint` (String) The OpenSearch Dashboards endpoint for the collection. -- `id` (String) The identifier of the collection +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `tags` diff --git a/docs/resources/opensearchserverless_security_config.md b/docs/resources/opensearchserverless_security_config.md index 9e57dc5e9..b807ef9d3 100644 --- a/docs/resources/opensearchserverless_security_config.md +++ b/docs/resources/opensearchserverless_security_config.md @@ -54,7 +54,8 @@ resource "awscc_opensearchserverless_security_config" "config" { ### Read-Only -- `id` (String) The identifier of the security config +- `id` (String) Uniquely identifies the resource. +- `security_config_id` (String) The identifier of the security config ### Nested Schema for `saml_options` diff --git a/docs/resources/opensearchserverless_vpc_endpoint.md b/docs/resources/opensearchserverless_vpc_endpoint.md index 0ed69be20..87bedc299 100644 --- a/docs/resources/opensearchserverless_vpc_endpoint.md +++ b/docs/resources/opensearchserverless_vpc_endpoint.md @@ -27,7 +27,8 @@ Amazon OpenSearchServerless vpc endpoint resource ### Read-Only -- `id` (String) The identifier of the VPC Endpoint +- `id` (String) Uniquely identifies the resource. +- `vpc_endpoint_id` (String) The identifier of the VPC Endpoint ## Import diff --git a/docs/resources/opensearchservice_domain.md b/docs/resources/opensearchservice_domain.md new file mode 100644 index 000000000..bc0613705 --- /dev/null +++ b/docs/resources/opensearchservice_domain.md @@ -0,0 +1,275 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_opensearchservice_domain Resource - terraform-provider-awscc" +subcategory: "" +description: |- + An example resource schema demonstrating some basic constructs and validation rules. +--- + +# awscc_opensearchservice_domain (Resource) + +An example resource schema demonstrating some basic constructs and validation rules. + + + + +## Schema + +### Optional + +- `access_policies` (String) +- `advanced_options` (Map of String) +- `advanced_security_options` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options)) +- `cluster_config` (Attributes) (see [below for nested schema](#nestedatt--cluster_config)) +- `cognito_options` (Attributes) (see [below for nested schema](#nestedatt--cognito_options)) +- `domain_endpoint_options` (Attributes) (see [below for nested schema](#nestedatt--domain_endpoint_options)) +- `domain_name` (String) +- `ebs_options` (Attributes) (see [below for nested schema](#nestedatt--ebs_options)) +- `encryption_at_rest_options` (Attributes) (see [below for nested schema](#nestedatt--encryption_at_rest_options)) +- `engine_version` (String) +- `ip_address_type` (String) +- `log_publishing_options` (Attributes Map) (see [below for nested schema](#nestedatt--log_publishing_options)) +- `node_to_node_encryption_options` (Attributes) (see [below for nested schema](#nestedatt--node_to_node_encryption_options)) +- `off_peak_window_options` (Attributes) (see [below for nested schema](#nestedatt--off_peak_window_options)) +- `snapshot_options` (Attributes) (see [below for nested schema](#nestedatt--snapshot_options)) +- `software_update_options` (Attributes) (see [below for nested schema](#nestedatt--software_update_options)) +- `tags` (Attributes List) An arbitrary set of tags (key-value pairs) for this Domain. (see [below for nested schema](#nestedatt--tags)) +- `vpc_options` (Attributes) (see [below for nested schema](#nestedatt--vpc_options)) + +### Read-Only + +- `arn` (String) +- `domain_arn` (String) +- `domain_endpoint` (String) +- `domain_endpoint_v2` (String) +- `domain_endpoints` (Map of String) +- `domain_id` (String) +- `id` (String) Uniquely identifies the resource. +- `service_software_options` (Attributes) (see [below for nested schema](#nestedatt--service_software_options)) + + +### Nested Schema for `advanced_security_options` + +Optional: + +- `anonymous_auth_enabled` (Boolean) +- `enabled` (Boolean) +- `internal_user_database_enabled` (Boolean) +- `master_user_options` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options--master_user_options)) +- `saml_options` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options--saml_options)) + +Read-Only: + +- `anonymous_auth_disable_date` (String) + + +### Nested Schema for `advanced_security_options.master_user_options` + +Optional: + +- `master_user_arn` (String) +- `master_user_name` (String) +- `master_user_password` (String) + + + +### Nested Schema for `advanced_security_options.saml_options` + +Optional: + +- `enabled` (Boolean) +- `idp` (Attributes) (see [below for nested schema](#nestedatt--advanced_security_options--saml_options--idp)) +- `master_backend_role` (String) +- `master_user_name` (String) +- `roles_key` (String) +- `session_timeout_minutes` (Number) +- `subject_key` (String) + + +### Nested Schema for `advanced_security_options.saml_options.idp` + +Required: + +- `entity_id` (String) +- `metadata_content` (String) + + + + + +### Nested Schema for `cluster_config` + +Optional: + +- `cold_storage_options` (Attributes) (see [below for nested schema](#nestedatt--cluster_config--cold_storage_options)) +- `dedicated_master_count` (Number) +- `dedicated_master_enabled` (Boolean) +- `dedicated_master_type` (String) +- `instance_count` (Number) +- `instance_type` (String) +- `multi_az_with_standby_enabled` (Boolean) +- `warm_count` (Number) +- `warm_enabled` (Boolean) +- `warm_type` (String) +- `zone_awareness_config` (Attributes) (see [below for nested schema](#nestedatt--cluster_config--zone_awareness_config)) +- `zone_awareness_enabled` (Boolean) + + +### Nested Schema for `cluster_config.cold_storage_options` + +Optional: + +- `enabled` (Boolean) + + + +### Nested Schema for `cluster_config.zone_awareness_config` + +Optional: + +- `availability_zone_count` (Number) + + + + +### Nested Schema for `cognito_options` + +Optional: + +- `enabled` (Boolean) +- `identity_pool_id` (String) +- `role_arn` (String) +- `user_pool_id` (String) + + + +### Nested Schema for `domain_endpoint_options` + +Optional: + +- `custom_endpoint` (String) +- `custom_endpoint_certificate_arn` (String) +- `custom_endpoint_enabled` (Boolean) +- `enforce_https` (Boolean) +- `tls_security_policy` (String) + + + +### Nested Schema for `ebs_options` + +Optional: + +- `ebs_enabled` (Boolean) +- `iops` (Number) +- `throughput` (Number) +- `volume_size` (Number) +- `volume_type` (String) + + + +### Nested Schema for `encryption_at_rest_options` + +Optional: + +- `enabled` (Boolean) +- `kms_key_id` (String) + + + +### Nested Schema for `log_publishing_options` + +Optional: + +- `cloudwatch_logs_log_group_arn` (String) +- `enabled` (Boolean) + + + +### Nested Schema for `node_to_node_encryption_options` + +Optional: + +- `enabled` (Boolean) + + + +### Nested Schema for `off_peak_window_options` + +Optional: + +- `enabled` (Boolean) +- `off_peak_window` (Attributes) (see [below for nested schema](#nestedatt--off_peak_window_options--off_peak_window)) + + +### Nested Schema for `off_peak_window_options.off_peak_window` + +Optional: + +- `window_start_time` (Attributes) (see [below for nested schema](#nestedatt--off_peak_window_options--off_peak_window--window_start_time)) + + +### Nested Schema for `off_peak_window_options.off_peak_window.window_start_time` + +Required: + +- `hours` (Number) +- `minutes` (Number) + + + + + +### Nested Schema for `snapshot_options` + +Optional: + +- `automated_snapshot_start_hour` (Number) + + + +### Nested Schema for `software_update_options` + +Optional: + +- `auto_software_update_enabled` (Boolean) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The value of the tag. +- `value` (String) The key of the tag. + + + +### Nested Schema for `vpc_options` + +Optional: + +- `security_group_ids` (List of String) +- `subnet_ids` (List of String) + + + +### Nested Schema for `service_software_options` + +Read-Only: + +- `automated_update_date` (String) +- `cancellable` (Boolean) +- `current_version` (String) +- `description` (String) +- `new_version` (String) +- `optional_deployment` (Boolean) +- `update_available` (Boolean) +- `update_status` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_opensearchservice_domain.example +``` diff --git a/docs/resources/opsworkscm_server.md b/docs/resources/opsworkscm_server.md new file mode 100644 index 000000000..243e93ced --- /dev/null +++ b/docs/resources/opsworkscm_server.md @@ -0,0 +1,74 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_opsworkscm_server Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::OpsWorksCM::Server +--- + +# awscc_opsworkscm_server (Resource) + +Resource Type definition for AWS::OpsWorksCM::Server + + + + +## Schema + +### Required + +- `instance_profile_arn` (String) +- `instance_type` (String) +- `service_role_arn` (String) + +### Optional + +- `associate_public_ip_address` (Boolean) +- `backup_id` (String) +- `backup_retention_count` (Number) +- `custom_certificate` (String) +- `custom_domain` (String) +- `custom_private_key` (String) +- `disable_automated_backup` (Boolean) +- `engine` (String) +- `engine_attributes` (Attributes List) (see [below for nested schema](#nestedatt--engine_attributes)) +- `engine_model` (String) +- `engine_version` (String) +- `key_pair` (String) +- `preferred_backup_window` (String) +- `preferred_maintenance_window` (String) +- `security_group_ids` (List of String) +- `subnet_ids` (List of String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `endpoint` (String) +- `id` (String) Uniquely identifies the resource. +- `server_name` (String) + + +### Nested Schema for `engine_attributes` + +Optional: + +- `name` (String) +- `value` (String) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_opsworkscm_server.example +``` diff --git a/docs/resources/organizations_organization.md b/docs/resources/organizations_organization.md index 946978a12..284924001 100644 --- a/docs/resources/organizations_organization.md +++ b/docs/resources/organizations_organization.md @@ -22,10 +22,11 @@ Resource schema for AWS::Organizations::Organization ### Read-Only - `arn` (String) The Amazon Resource Name (ARN) of an organization. -- `id` (String) The unique identifier (ID) of an organization. +- `id` (String) Uniquely identifies the resource. - `management_account_arn` (String) The Amazon Resource Name (ARN) of the account that is designated as the management account for the organization. - `management_account_email` (String) The email address that is associated with the AWS account that is designated as the management account for the organization. - `management_account_id` (String) The unique identifier (ID) of the management account of an organization. +- `organization_id` (String) The unique identifier (ID) of an organization. - `root_id` (String) The unique identifier (ID) for the root. ## Import diff --git a/docs/resources/organizations_organizational_unit.md b/docs/resources/organizations_organizational_unit.md index a96bdbed9..bc9ba429d 100644 --- a/docs/resources/organizations_organizational_unit.md +++ b/docs/resources/organizations_organizational_unit.md @@ -51,7 +51,8 @@ resource "awscc_organizations_organizational_unit" "level_2_ou" { ### Read-Only - `arn` (String) The Amazon Resource Name (ARN) of this OU. -- `id` (String) The unique identifier (ID) associated with this OU. +- `id` (String) Uniquely identifies the resource. +- `organizational_unit_id` (String) The unique identifier (ID) associated with this OU. ### Nested Schema for `tags` diff --git a/docs/resources/organizations_policy.md b/docs/resources/organizations_policy.md index 63fd5f5dc..2c0f2131d 100644 --- a/docs/resources/organizations_policy.md +++ b/docs/resources/organizations_policy.md @@ -31,7 +31,8 @@ Policies in AWS Organizations enable you to manage different features of the AWS - `arn` (String) ARN of the Policy - `aws_managed` (Boolean) A boolean value that indicates whether the specified policy is an AWS managed policy. If true, then you can attach the policy to roots, OUs, or accounts, but you cannot edit it. -- `id` (String) Id of the Policy +- `id` (String) Uniquely identifies the resource. +- `policy_id` (String) Id of the Policy ### Nested Schema for `tags` diff --git a/docs/resources/organizations_resource_policy.md b/docs/resources/organizations_resource_policy.md index 251c77a0f..cd4728daa 100644 --- a/docs/resources/organizations_resource_policy.md +++ b/docs/resources/organizations_resource_policy.md @@ -26,7 +26,8 @@ You can use AWS::Organizations::ResourcePolicy to delegate policy management for ### Read-Only - `arn` (String) The Amazon Resource Name (ARN) of the resource policy. -- `id` (String) The unique identifier (ID) associated with this resource policy. +- `id` (String) Uniquely identifies the resource. +- `resource_policy_id` (String) The unique identifier (ID) associated with this resource policy. ### Nested Schema for `tags` diff --git a/docs/resources/proton_environment_account_connection.md b/docs/resources/proton_environment_account_connection.md new file mode 100644 index 000000000..a4816b086 --- /dev/null +++ b/docs/resources/proton_environment_account_connection.md @@ -0,0 +1,51 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_proton_environment_account_connection Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Schema describing various properties for AWS Proton Environment Account Connections resources. +--- + +# awscc_proton_environment_account_connection (Resource) + +Resource Schema describing various properties for AWS Proton Environment Account Connections resources. + + + + +## Schema + +### Optional + +- `codebuild_role_arn` (String) The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account. +- `component_role_arn` (String) The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account. +- `environment_account_id` (String) The environment account that's connected to the environment account connection. +- `environment_name` (String) The name of the AWS Proton environment that's created in the associated management account. +- `management_account_id` (String) The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account. +- `role_arn` (String) The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account. +- `tags` (Attributes Set)

An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.

+

For more information, see Proton resources and tagging in the + Proton User Guide.

(see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) The Amazon Resource Name (ARN) of the environment account connection. +- `environment_account_connection_id` (String) The ID of the environment account connection. +- `id` (String) Uniquely identifies the resource. +- `status` (String) The status of the environment account connection. + + +### Nested Schema for `tags` + +Required: + +- `key` (String)

The key of the resource tag.

+- `value` (String)

The value of the resource tag.

+ +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_proton_environment_account_connection.example +``` diff --git a/docs/resources/qldb_stream.md b/docs/resources/qldb_stream.md index e78b822ba..2894aff97 100644 --- a/docs/resources/qldb_stream.md +++ b/docs/resources/qldb_stream.md @@ -31,7 +31,8 @@ Resource schema for AWS::QLDB::Stream. ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `stream_id` (String) ### Nested Schema for `kinesis_configuration` diff --git a/docs/resources/redshift_cluster.md b/docs/resources/redshift_cluster.md new file mode 100644 index 000000000..183d317f2 --- /dev/null +++ b/docs/resources/redshift_cluster.md @@ -0,0 +1,129 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_redshift_cluster Resource - terraform-provider-awscc" +subcategory: "" +description: |- + An example resource schema demonstrating some basic constructs and validation rules. +--- + +# awscc_redshift_cluster (Resource) + +An example resource schema demonstrating some basic constructs and validation rules. + + + + +## Schema + +### Required + +- `cluster_type` (String) The type of the cluster. When cluster type is specified as single-node, the NumberOfNodes parameter is not required and if multi-node, the NumberOfNodes parameter is required +- `db_name` (String) The name of the first database to be created when the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database. +- `master_username` (String) The user name associated with the master user account for the cluster that is being created. The user name can't be PUBLIC and first character must be a letter. +- `node_type` (String) The node type to be provisioned for the cluster.Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge + +### Optional + +- `allow_version_upgrade` (Boolean) Major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default value is True +- `aqua_configuration_status` (String) The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values include the following. + +enabled - Use AQUA if it is available for the current Region and Amazon Redshift node type. +disabled - Don't use AQUA. +auto - Amazon Redshift determines whether to use AQUA. +- `automated_snapshot_retention_period` (Number) The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Default value is 1 +- `availability_zone` (String) The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint +- `availability_zone_relocation` (Boolean) The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster modification is complete. +- `availability_zone_relocation_status` (String) The availability zone relocation status of the cluster +- `classic` (Boolean) A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false , the resize type is elastic. +- `cluster_identifier` (String) A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account +- `cluster_parameter_group_name` (String) The name of the parameter group to be associated with this cluster. +- `cluster_security_groups` (List of String) A list of security groups to be associated with this cluster. +- `cluster_subnet_group_name` (String) The name of a cluster subnet group to be associated with this cluster. +- `cluster_version` (String) The version of the Amazon Redshift engine software that you want to deploy on the cluster.The version selected runs on all the nodes in the cluster. +- `defer_maintenance` (Boolean) A boolean indicating whether to enable the deferred maintenance window. +- `defer_maintenance_duration` (Number) An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 45 days or less. +- `defer_maintenance_end_time` (String) A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration. +- `defer_maintenance_start_time` (String) A timestamp indicating the start time for the deferred maintenance window. +- `destination_region` (String) The destination AWS Region that you want to copy snapshots to. Constraints: Must be the name of a valid AWS Region. For more information, see Regions and Endpoints in the Amazon Web Services [https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region] General Reference +- `elastic_ip` (String) The Elastic IP (EIP) address for the cluster. +- `encrypted` (Boolean) If true, the data in the cluster is encrypted at rest. +- `endpoint` (Attributes) (see [below for nested schema](#nestedatt--endpoint)) +- `enhanced_vpc_routing` (Boolean) An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide. + +If this option is true , enhanced VPC routing is enabled. + +Default: false +- `hsm_client_certificate_identifier` (String) Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM +- `hsm_configuration_identifier` (String) Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM. +- `iam_roles` (List of String) A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 50 IAM roles in a single request +- `kms_key_id` (String) The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster. +- `logging_properties` (Attributes) (see [below for nested schema](#nestedatt--logging_properties)) +- `maintenance_track_name` (String) The name for the maintenance track that you want to assign for the cluster. This name change is asynchronous. The new track name stays in the PendingModifiedValues for the cluster until the next maintenance window. When the maintenance track changes, the cluster is switched to the latest cluster release available for the maintenance track. At this point, the maintenance track name is applied. +- `manage_master_password` (Boolean) A boolean indicating if the redshift cluster's admin user credentials is managed by Redshift or not. You can't use MasterUserPassword if ManageMasterPassword is true. If ManageMasterPassword is false or not set, Amazon Redshift uses MasterUserPassword for the admin user account's password. +- `manual_snapshot_retention_period` (Number) The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely. + +The value must be either -1 or an integer between 1 and 3,653. +- `master_password_secret_kms_key_id` (String) The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin user credentials secret. +- `master_user_password` (String) The password associated with the master user account for the cluster that is being created. You can't use MasterUserPassword if ManageMasterPassword is true. Password must be between 8 and 64 characters in length, should have at least one uppercase letter.Must contain at least one lowercase letter.Must contain one number.Can be any printable ASCII character. +- `multi_az` (Boolean) A boolean indicating if the redshift cluster is multi-az or not. If you don't provide this parameter or set the value to false, the redshift cluster will be single-az. +- `namespace_resource_policy` (String) The namespace resource policy document that will be attached to a Redshift cluster. +- `number_of_nodes` (Number) The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node. +- `owner_account` (String) +- `port` (Number) The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings +- `preferred_maintenance_window` (String) The weekly time range (in UTC) during which automated cluster maintenance can occur. +- `publicly_accessible` (Boolean) If true, the cluster can be accessed from a public network. +- `resource_action` (String) The Redshift operation to be performed. Resource Action supports pause-cluster, resume-cluster, failover-primary-compute APIs +- `revision_target` (String) The identifier of the database revision. You can retrieve this value from the response to the DescribeClusterDbRevisions request. +- `rotate_encryption_key` (Boolean) A boolean indicating if we want to rotate Encryption Keys. +- `snapshot_cluster_identifier` (String) The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name. +- `snapshot_copy_grant_name` (String) The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region. +- `snapshot_copy_manual` (Boolean) Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots. +- `snapshot_copy_retention_period` (Number) The number of days to retain automated snapshots in the destination region after they are copied from the source region. + + Default is 7. + + Constraints: Must be at least 1 and no more than 35. +- `snapshot_identifier` (String) The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive. +- `tags` (Attributes List) The list of tags for the cluster parameter group. (see [below for nested schema](#nestedatt--tags)) +- `vpc_security_group_ids` (List of String) A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster. + +### Read-Only + +- `cluster_namespace_arn` (String) The Amazon Resource Name (ARN) of the cluster namespace. +- `defer_maintenance_identifier` (String) A unique identifier for the deferred maintenance window. +- `id` (String) Uniquely identifies the resource. +- `master_password_secret_arn` (String) The Amazon Resource Name (ARN) for the cluster's admin user credentials secret. + + +### Nested Schema for `endpoint` + +Read-Only: + +- `address` (String) +- `port` (String) + + + +### Nested Schema for `logging_properties` + +Optional: + +- `bucket_name` (String) +- `s3_key_prefix` (String) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_redshift_cluster.example +``` diff --git a/docs/resources/route53_cidr_collection.md b/docs/resources/route53_cidr_collection.md index 0ff672042..edc63e277 100644 --- a/docs/resources/route53_cidr_collection.md +++ b/docs/resources/route53_cidr_collection.md @@ -26,7 +26,8 @@ Resource schema for AWS::Route53::CidrCollection. ### Read-Only - `arn` (String) The Amazon resource name (ARN) to uniquely identify the AWS resource. -- `id` (String) UUID of the CIDR collection. +- `cidr_collection_id` (String) UUID of the CIDR collection. +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `locations` diff --git a/docs/resources/route53_hosted_zone.md b/docs/resources/route53_hosted_zone.md index d94c1c374..b1fc9ee26 100644 --- a/docs/resources/route53_hosted_zone.md +++ b/docs/resources/route53_hosted_zone.md @@ -64,7 +64,8 @@ Creates a new public or private hosted zone. You create records in a public host ### Read-Only -- `id` (String) The ID of this resource. +- `hosted_zone_id` (String) +- `id` (String) Uniquely identifies the resource. - `name_servers` (List of String) diff --git a/docs/resources/route53resolver_firewall_domain_list.md b/docs/resources/route53resolver_firewall_domain_list.md index 9b46eb9aa..c88a1e195 100644 --- a/docs/resources/route53resolver_firewall_domain_list.md +++ b/docs/resources/route53resolver_firewall_domain_list.md @@ -28,7 +28,8 @@ Resource schema for AWS::Route53Resolver::FirewallDomainList. - `creation_time` (String) Rfc3339TimeString - `creator_request_id` (String) The id of the creator request. - `domain_count` (Number) Count -- `id` (String) ResourceId +- `firewall_domain_list_id` (String) ResourceId +- `id` (String) Uniquely identifies the resource. - `managed_owner_name` (String) ServicePrincipal - `modification_time` (String) Rfc3339TimeString - `status` (String) ResolverFirewallDomainList, possible values are COMPLETE, DELETING, UPDATING, COMPLETE_IMPORT_FAILED, IMPORTING, and INACTIVE_OWNER_ACCOUNT_CLOSED. diff --git a/docs/resources/route53resolver_firewall_rule_group.md b/docs/resources/route53resolver_firewall_rule_group.md index a7804d515..4119fcae8 100644 --- a/docs/resources/route53resolver_firewall_rule_group.md +++ b/docs/resources/route53resolver_firewall_rule_group.md @@ -26,7 +26,8 @@ Resource schema for AWS::Route53Resolver::FirewallRuleGroup. - `arn` (String) Arn - `creation_time` (String) Rfc3339TimeString - `creator_request_id` (String) The id of the creator request. -- `id` (String) ResourceId +- `firewall_rule_group_id` (String) ResourceId +- `id` (String) Uniquely identifies the resource. - `modification_time` (String) Rfc3339TimeString - `owner_id` (String) AccountId - `rule_count` (Number) Count diff --git a/docs/resources/route53resolver_firewall_rule_group_association.md b/docs/resources/route53resolver_firewall_rule_group_association.md index 539908080..a3d23a9de 100644 --- a/docs/resources/route53resolver_firewall_rule_group_association.md +++ b/docs/resources/route53resolver_firewall_rule_group_association.md @@ -32,7 +32,8 @@ Resource schema for AWS::Route53Resolver::FirewallRuleGroupAssociation. - `arn` (String) Arn - `creation_time` (String) Rfc3339TimeString - `creator_request_id` (String) The id of the creator request. -- `id` (String) Id +- `firewall_rule_group_association_id` (String) Id +- `id` (String) Uniquely identifies the resource. - `managed_owner_name` (String) ServicePrincipal - `modification_time` (String) Rfc3339TimeString - `status` (String) ResolverFirewallRuleGroupAssociation, possible values are COMPLETE, DELETING, UPDATING, and INACTIVE_OWNER_ACCOUNT_CLOSED. diff --git a/docs/resources/route53resolver_resolver_config.md b/docs/resources/route53resolver_resolver_config.md index a38f80af7..abddd7ec4 100644 --- a/docs/resources/route53resolver_resolver_config.md +++ b/docs/resources/route53resolver_resolver_config.md @@ -23,8 +23,9 @@ Resource schema for AWS::Route53Resolver::ResolverConfig. ### Read-Only - `autodefined_reverse` (String) ResolverAutodefinedReverseStatus, possible values are ENABLING, ENABLED, DISABLING AND DISABLED. -- `id` (String) Id +- `id` (String) Uniquely identifies the resource. - `owner_id` (String) AccountId +- `resolver_config_id` (String) Id ## Import diff --git a/docs/resources/route53resolver_resolver_dnssec_config.md b/docs/resources/route53resolver_resolver_dnssec_config.md index a559198e3..88a2c5f71 100644 --- a/docs/resources/route53resolver_resolver_dnssec_config.md +++ b/docs/resources/route53resolver_resolver_dnssec_config.md @@ -21,8 +21,9 @@ Resource schema for AWS::Route53Resolver::ResolverDNSSECConfig. ### Read-Only -- `id` (String) Id +- `id` (String) Uniquely identifies the resource. - `owner_id` (String) AccountId +- `resolver_dnssec_config_id` (String) Id - `validation_status` (String) ResolverDNSSECValidationStatus, possible values are ENABLING, ENABLED, DISABLING AND DISABLED. ## Import diff --git a/docs/resources/route53resolver_resolver_query_logging_config.md b/docs/resources/route53resolver_resolver_query_logging_config.md index 53cbaefa5..d2cd51b46 100644 --- a/docs/resources/route53resolver_resolver_query_logging_config.md +++ b/docs/resources/route53resolver_resolver_query_logging_config.md @@ -26,8 +26,9 @@ Resource schema for AWS::Route53Resolver::ResolverQueryLoggingConfig. - `association_count` (Number) Count - `creation_time` (String) Rfc3339TimeString - `creator_request_id` (String) The id of the creator request. -- `id` (String) ResourceId +- `id` (String) Uniquely identifies the resource. - `owner_id` (String) AccountId +- `resolver_query_logging_config_id` (String) ResourceId - `share_status` (String) ShareStatus, possible values are NOT_SHARED, SHARED_WITH_ME, SHARED_BY_ME. - `status` (String) ResolverQueryLogConfigStatus, possible values are CREATING, CREATED, DELETED AND FAILED. diff --git a/docs/resources/route53resolver_resolver_query_logging_config_association.md b/docs/resources/route53resolver_resolver_query_logging_config_association.md index a95e7f63e..bbfd3f0e9 100644 --- a/docs/resources/route53resolver_resolver_query_logging_config_association.md +++ b/docs/resources/route53resolver_resolver_query_logging_config_association.md @@ -25,7 +25,8 @@ Resource schema for AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation. - `creation_time` (String) Rfc3339TimeString - `error` (String) ResolverQueryLogConfigAssociationError - `error_message` (String) ResolverQueryLogConfigAssociationErrorMessage -- `id` (String) Id +- `id` (String) Uniquely identifies the resource. +- `resolver_query_logging_config_association_id` (String) Id - `status` (String) ResolverQueryLogConfigAssociationStatus ## Import diff --git a/docs/resources/rum_app_monitor.md b/docs/resources/rum_app_monitor.md index fb86ea584..4bfe9031c 100644 --- a/docs/resources/rum_app_monitor.md +++ b/docs/resources/rum_app_monitor.md @@ -29,6 +29,7 @@ Resource Type definition for AWS::RUM::AppMonitor ### Read-Only +- `app_monitor_id` (String) The unique ID of the new app monitor. - `id` (String) Uniquely identifies the resource. @@ -67,7 +68,7 @@ This parameter specifies the ARN of an IAM role that RUM will assume to write to Required: -- `name` (String) The name for the metric that is defined in this structure. Valid values are the following: +- `name` (String) The name for the metric that is defined in this structure. For extended metrics, valid values are the following: PerformanceNavigationDuration @@ -95,7 +96,7 @@ Optional: - `dimension_keys` (Map of String) Use this field only if you are sending the metric to CloudWatch. -This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following: +This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following: "metadata.pageId": "PageId" @@ -123,6 +124,7 @@ Example event patterns: '{ "event_type": ["com.amazon.rum.performance_navigation_event"], "metadata": { "browserName": [ "Chrome", "Safari" ], "countryCode": [ "US" ] }, "event_details": { "duration": [{ "numeric": [ ">=", 2000, "<", 8000 ] }] } }' If the metrics destination' is CloudWatch and the event also matches a value in DimensionKeys, then the metric is published with the specified dimensions. +- `namespace` (String) The namespace used by CloudWatch Metrics for the metric that is defined in this structure - `unit_label` (String) The CloudWatch metric unit to use for this metric. If you omit this field, the metric is recorded with no unit. - `value_key` (String) The field within the event object that the metric value is sourced from. diff --git a/docs/resources/s3outposts_endpoint.md b/docs/resources/s3outposts_endpoint.md new file mode 100644 index 000000000..da36e9cab --- /dev/null +++ b/docs/resources/s3outposts_endpoint.md @@ -0,0 +1,62 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_s3outposts_endpoint Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type Definition for AWS::S3Outposts::Endpoint +--- + +# awscc_s3outposts_endpoint (Resource) + +Resource Type Definition for AWS::S3Outposts::Endpoint + + + + +## Schema + +### Required + +- `outpost_id` (String) The id of the customer outpost on which the bucket resides. +- `security_group_id` (String) The ID of the security group to use with the endpoint. +- `subnet_id` (String) The ID of the subnet in the selected VPC. The subnet must belong to the Outpost. + +### Optional + +- `access_type` (String) The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool. +- `customer_owned_ipv_4_pool` (String) The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint. +- `failed_reason` (Attributes) The failure reason, if any, for a create or delete endpoint operation. (see [below for nested schema](#nestedatt--failed_reason)) + +### Read-Only + +- `arn` (String) The Amazon Resource Name (ARN) of the endpoint. +- `cidr_block` (String) The VPC CIDR committed by this endpoint. +- `creation_time` (String) The time the endpoint was created. +- `endpoint_id` (String) The ID of the endpoint. +- `id` (String) Uniquely identifies the resource. +- `network_interfaces` (Attributes Set) The network interfaces of the endpoint. (see [below for nested schema](#nestedatt--network_interfaces)) +- `status` (String) + + +### Nested Schema for `failed_reason` + +Optional: + +- `error_code` (String) The failure code, if any, for a create or delete endpoint operation. +- `message` (String) Additional error details describing the endpoint failure and recommended action. + + + +### Nested Schema for `network_interfaces` + +Read-Only: + +- `network_interface_id` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_s3outposts_endpoint.example +``` diff --git a/docs/resources/secretsmanager_secret.md b/docs/resources/secretsmanager_secret.md index 88dfa2003..41c830bf7 100644 --- a/docs/resources/secretsmanager_secret.md +++ b/docs/resources/secretsmanager_secret.md @@ -80,7 +80,8 @@ resource "awscc_secretsmanager_secret" "example_replica" { ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `secret_id` (String) ### Nested Schema for `generate_secret_string` diff --git a/docs/resources/servicecatalog_service_action.md b/docs/resources/servicecatalog_service_action.md index 217abe0db..9aee2ab84 100644 --- a/docs/resources/servicecatalog_service_action.md +++ b/docs/resources/servicecatalog_service_action.md @@ -28,7 +28,8 @@ Resource Schema for AWS::ServiceCatalog::ServiceAction ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `service_action_id` (String) ### Nested Schema for `definition` diff --git a/docs/resources/servicecatalogappregistry_application.md b/docs/resources/servicecatalogappregistry_application.md index ad59e5fcb..8aaa55669 100644 --- a/docs/resources/servicecatalogappregistry_application.md +++ b/docs/resources/servicecatalogappregistry_application.md @@ -26,11 +26,12 @@ Resource Schema for AWS::ServiceCatalogAppRegistry::Application ### Read-Only +- `application_id` (String) - `application_name` (String) The name of the application. - `application_tag_key` (String) The key of the AWS application tag, which is awsApplication. Applications created before 11/13/2023 or applications without the AWS application tag resource group return no value. - `application_tag_value` (String) The value of the AWS application tag, which is the identifier of an associated resource. Applications created before 11/13/2023 or applications without the AWS application tag resource group return no value. - `arn` (String) -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. ## Import diff --git a/docs/resources/servicecatalogappregistry_attribute_group.md b/docs/resources/servicecatalogappregistry_attribute_group.md index f9a948604..95571bc52 100644 --- a/docs/resources/servicecatalogappregistry_attribute_group.md +++ b/docs/resources/servicecatalogappregistry_attribute_group.md @@ -28,7 +28,8 @@ Resource Schema for AWS::ServiceCatalogAppRegistry::AttributeGroup. ### Read-Only - `arn` (String) -- `id` (String) The ID of this resource. +- `attribute_group_id` (String) +- `id` (String) Uniquely identifies the resource. ## Import diff --git a/docs/resources/ses_configuration_set_event_destination.md b/docs/resources/ses_configuration_set_event_destination.md index 60285739b..7ebfa4e60 100644 --- a/docs/resources/ses_configuration_set_event_destination.md +++ b/docs/resources/ses_configuration_set_event_destination.md @@ -22,7 +22,8 @@ Resource Type definition for AWS::SES::ConfigurationSetEventDestination ### Read-Only -- `id` (String) The ID of this resource. +- `configuration_set_event_destination_id` (String) +- `id` (String) Uniquely identifies the resource. ### Nested Schema for `event_destination` diff --git a/docs/resources/ses_template.md b/docs/resources/ses_template.md index d3d9da27e..e83821d92 100644 --- a/docs/resources/ses_template.md +++ b/docs/resources/ses_template.md @@ -21,7 +21,8 @@ Resource Type definition for AWS::SES::Template ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `template_id` (String) ### Nested Schema for `template` diff --git a/docs/resources/sns_topic.md b/docs/resources/sns_topic.md new file mode 100644 index 000000000..38c02219d --- /dev/null +++ b/docs/resources/sns_topic.md @@ -0,0 +1,90 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_sns_topic Resource - terraform-provider-awscc" +subcategory: "" +description: |- + The AWS::SNS::Topic resource creates a topic to which notifications can be published. + One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see endpoints and quotas https://docs.aws.amazon.com/general/latest/gr/sns.html in the General Reference. + The structure of AUTHPARAMS depends on the .signature of the API request. For more information, see Examples of the complete Signature Version 4 signing process https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html in the General Reference. +--- + +# awscc_sns_topic (Resource) + +The ``AWS::SNS::Topic`` resource creates a topic to which notifications can be published. + One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see [endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/sns.html) in the *General Reference*. + The structure of ``AUTHPARAMS`` depends on the .signature of the API request. For more information, see [Examples of the complete Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html) in the *General Reference*. + + + + +## Schema + +### Optional + +- `archive_policy` (String) The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days. +- `content_based_deduplication` (Boolean) Enables content-based deduplication for FIFO topics. + + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action. + + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message). + (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action. +- `data_protection_policy` (String) The body of the policy document you want to use for this topic. + You can only add one policy per topic. + The policy must be in JSON string format. + Length Constraints: Maximum length of 30,720. +- `delivery_status_logging` (Attributes Set) (see [below for nested schema](#nestedatt--delivery_status_logging)) +- `display_name` (String) The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs. +- `fifo_topic` (Boolean) Set to true to create a FIFO topic. +- `kms_master_key_id` (String) The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*. + This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html). +- `signature_version` (String) The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``. +- `subscription` (Attributes List) The SNS subscriptions (endpoints) for this topic. + If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted. (see [below for nested schema](#nestedatt--subscription)) +- `tags` (Attributes List) The list of tags to add to a new topic. + To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions. (see [below for nested schema](#nestedatt--tags)) +- `topic_name` (String) The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``. + If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html). + If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. +- `tracing_config` (String) Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true. + +### Read-Only + +- `id` (String) Uniquely identifies the resource. +- `topic_arn` (String) + + +### Nested Schema for `delivery_status_logging` + +Required: + +- `protocol` (String) + +Optional: + +- `failure_feedback_role_arn` (String) +- `success_feedback_role_arn` (String) +- `success_feedback_sample_rate` (String) + + + +### Nested Schema for `subscription` + +Required: + +- `endpoint` (String) The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the ``Endpoint`` parameter of the ``Subscribe`` action in the *API Reference*. +- `protocol` (String) The subscription's protocol. For more information, see the ``Protocol`` parameter of the ``Subscribe`` action in the *API Reference*. + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The required key portion of the tag. +- `value` (String) The optional value portion of the tag. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_sns_topic.example +``` diff --git a/docs/resources/sns_topic_policy.md b/docs/resources/sns_topic_policy.md index c8c95241c..d5e1f81e3 100644 --- a/docs/resources/sns_topic_policy.md +++ b/docs/resources/sns_topic_policy.md @@ -22,7 +22,8 @@ The ``AWS::SNS::TopicPolicy`` resource associates SNS topics with a policy. For ### Read-Only -- `id` (String) The ID of this resource. +- `id` (String) Uniquely identifies the resource. +- `topic_policy_id` (String) ## Import diff --git a/docs/resources/ssm_patch_baseline.md b/docs/resources/ssm_patch_baseline.md index 2203719de..c0b26d4f6 100644 --- a/docs/resources/ssm_patch_baseline.md +++ b/docs/resources/ssm_patch_baseline.md @@ -37,7 +37,8 @@ Resource Type definition for AWS::SSM::PatchBaseline ### Read-Only -- `id` (String) The ID of the patch baseline. +- `id` (String) Uniquely identifies the resource. +- `patch_baseline_id` (String) The ID of the patch baseline. ### Nested Schema for `approval_rules` diff --git a/docs/resources/synthetics_canary.md b/docs/resources/synthetics_canary.md new file mode 100644 index 000000000..1a40ea7b7 --- /dev/null +++ b/docs/resources/synthetics_canary.md @@ -0,0 +1,155 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_synthetics_canary Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::Synthetics::Canary +--- + +# awscc_synthetics_canary (Resource) + +Resource Type definition for AWS::Synthetics::Canary + + + + +## Schema + +### Required + +- `artifact_s3_location` (String) Provide the s3 bucket output location for test results +- `code` (Attributes) Provide the canary script source (see [below for nested schema](#nestedatt--code)) +- `execution_role_arn` (String) Lambda Execution role used to run your canaries +- `name` (String) Name of the canary. +- `runtime_version` (String) Runtime version of Synthetics Library +- `schedule` (Attributes) Frequency to run your canaries (see [below for nested schema](#nestedatt--schedule)) + +### Optional + +- `artifact_config` (Attributes) Provide artifact configuration (see [below for nested schema](#nestedatt--artifact_config)) +- `delete_lambda_resources_on_canary_deletion` (Boolean) Deletes associated lambda resources created by Synthetics if set to True. Default is False +- `failure_retention_period` (Number) Retention period of failed canary runs represented in number of days +- `run_config` (Attributes) Provide canary run configuration (see [below for nested schema](#nestedatt--run_config)) +- `start_canary_after_creation` (Boolean) Runs canary if set to True. Default is False +- `success_retention_period` (Number) Retention period of successful canary runs represented in number of days +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) +- `visual_reference` (Attributes) Visual reference configuration for visual testing (see [below for nested schema](#nestedatt--visual_reference)) +- `vpc_config` (Attributes) Provide VPC Configuration if enabled. (see [below for nested schema](#nestedatt--vpc_config)) + +### Read-Only + +- `canary_id` (String) Id of the canary +- `id` (String) Uniquely identifies the resource. +- `state` (String) State of the canary + + +### Nested Schema for `code` + +Required: + +- `handler` (String) + +Optional: + +- `s3_bucket` (String) +- `s3_key` (String) +- `s3_object_version` (String) +- `script` (String) + +Read-Only: + +- `source_location_arn` (String) + + + +### Nested Schema for `schedule` + +Required: + +- `expression` (String) + +Optional: + +- `duration_in_seconds` (String) + + + +### Nested Schema for `artifact_config` + +Optional: + +- `s3_encryption` (Attributes) Encryption configuration for uploading artifacts to S3 (see [below for nested schema](#nestedatt--artifact_config--s3_encryption)) + + +### Nested Schema for `artifact_config.s3_encryption` + +Optional: + +- `encryption_mode` (String) Encryption mode for encrypting artifacts when uploading to S3. Valid values: SSE_S3 and SSE_KMS. +- `kms_key_arn` (String) KMS key Arn for encrypting artifacts when uploading to S3. You must specify KMS key Arn for SSE_KMS encryption mode only. + + + + +### Nested Schema for `run_config` + +Optional: + +- `active_tracing` (Boolean) Enable active tracing if set to true +- `environment_variables` (Map of String) Environment variable key-value pairs. +- `memory_in_mb` (Number) Provide maximum memory available for canary in MB +- `timeout_in_seconds` (Number) Provide maximum canary timeout per run in seconds + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + + + +### Nested Schema for `visual_reference` + +Required: + +- `base_canary_run_id` (String) Canary run id to be used as base reference for visual testing + +Optional: + +- `base_screenshots` (Attributes List) List of screenshots used as base reference for visual testing (see [below for nested schema](#nestedatt--visual_reference--base_screenshots)) + + +### Nested Schema for `visual_reference.base_screenshots` + +Required: + +- `screenshot_name` (String) Name of the screenshot to be used as base reference for visual testing + +Optional: + +- `ignore_coordinates` (List of String) List of coordinates of rectangles to be ignored during visual testing + + + + +### Nested Schema for `vpc_config` + +Required: + +- `security_group_ids` (List of String) +- `subnet_ids` (List of String) + +Optional: + +- `vpc_id` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_synthetics_canary.example +``` diff --git a/docs/resources/synthetics_group.md b/docs/resources/synthetics_group.md new file mode 100644 index 000000000..a04faa33a --- /dev/null +++ b/docs/resources/synthetics_group.md @@ -0,0 +1,46 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_synthetics_group Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Resource Type definition for AWS::Synthetics::Group +--- + +# awscc_synthetics_group (Resource) + +Resource Type definition for AWS::Synthetics::Group + + + + +## Schema + +### Required + +- `name` (String) Name of the group. + +### Optional + +- `resource_arns` (List of String) +- `tags` (Attributes List) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `group_id` (String) Id of the group. +- `id` (String) Uniquely identifies the resource. + + +### Nested Schema for `tags` + +Required: + +- `key` (String) The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. +- `value` (String) The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_synthetics_group.example +``` diff --git a/docs/resources/vpclattice_access_log_subscription.md b/docs/resources/vpclattice_access_log_subscription.md new file mode 100644 index 000000000..15ccc269e --- /dev/null +++ b/docs/resources/vpclattice_access_log_subscription.md @@ -0,0 +1,49 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_access_log_subscription Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Enables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner will only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network. +--- + +# awscc_vpclattice_access_log_subscription (Resource) + +Enables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner will only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network. + + + + +## Schema + +### Required + +- `destination_arn` (String) + +### Optional + +- `resource_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `access_log_subscription_id` (String) +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `resource_arn` (String) +- `resource_id` (String) + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_access_log_subscription.example +``` diff --git a/docs/resources/vpclattice_listener.md b/docs/resources/vpclattice_listener.md new file mode 100644 index 000000000..af2a98bb5 --- /dev/null +++ b/docs/resources/vpclattice_listener.md @@ -0,0 +1,89 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_listener Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services. +--- + +# awscc_vpclattice_listener (Resource) + +Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services. + + + + +## Schema + +### Required + +- `default_action` (Attributes) (see [below for nested schema](#nestedatt--default_action)) +- `protocol` (String) + +### Optional + +- `name` (String) +- `port` (Number) +- `service_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `listener_id` (String) +- `service_arn` (String) +- `service_id` (String) + + +### Nested Schema for `default_action` + +Optional: + +- `fixed_response` (Attributes) (see [below for nested schema](#nestedatt--default_action--fixed_response)) +- `forward` (Attributes) (see [below for nested schema](#nestedatt--default_action--forward)) + + +### Nested Schema for `default_action.fixed_response` + +Required: + +- `status_code` (Number) + + + +### Nested Schema for `default_action.forward` + +Required: + +- `target_groups` (Attributes List) (see [below for nested schema](#nestedatt--default_action--forward--target_groups)) + + +### Nested Schema for `default_action.forward.target_groups` + +Required: + +- `target_group_identifier` (String) + +Optional: + +- `weight` (Number) + + + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_listener.example +``` diff --git a/docs/resources/vpclattice_rule.md b/docs/resources/vpclattice_rule.md new file mode 100644 index 000000000..4fd6b4230 --- /dev/null +++ b/docs/resources/vpclattice_rule.md @@ -0,0 +1,150 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_rule Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Creates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions. +--- + +# awscc_vpclattice_rule (Resource) + +Creates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions. + + + + +## Schema + +### Required + +- `action` (Attributes) (see [below for nested schema](#nestedatt--action)) +- `match` (Attributes) (see [below for nested schema](#nestedatt--match)) +- `priority` (Number) + +### Optional + +- `listener_identifier` (String) +- `name` (String) +- `service_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `id` (String) Uniquely identifies the resource. +- `rule_id` (String) + + +### Nested Schema for `action` + +Optional: + +- `fixed_response` (Attributes) (see [below for nested schema](#nestedatt--action--fixed_response)) +- `forward` (Attributes) (see [below for nested schema](#nestedatt--action--forward)) + + +### Nested Schema for `action.fixed_response` + +Required: + +- `status_code` (Number) + + + +### Nested Schema for `action.forward` + +Required: + +- `target_groups` (Attributes List) (see [below for nested schema](#nestedatt--action--forward--target_groups)) + + +### Nested Schema for `action.forward.target_groups` + +Required: + +- `target_group_identifier` (String) + +Optional: + +- `weight` (Number) + + + + + +### Nested Schema for `match` + +Required: + +- `http_match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match)) + + +### Nested Schema for `match.http_match` + +Optional: + +- `header_matches` (Attributes List) (see [below for nested schema](#nestedatt--match--http_match--header_matches)) +- `method` (String) +- `path_match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match--path_match)) + + +### Nested Schema for `match.http_match.header_matches` + +Required: + +- `match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match--header_matches--match)) +- `name` (String) + +Optional: + +- `case_sensitive` (Boolean) + + +### Nested Schema for `match.http_match.header_matches.case_sensitive` + +Optional: + +- `contains` (String) +- `exact` (String) +- `prefix` (String) + + + + +### Nested Schema for `match.http_match.path_match` + +Required: + +- `match` (Attributes) (see [below for nested schema](#nestedatt--match--http_match--path_match--match)) + +Optional: + +- `case_sensitive` (Boolean) + + +### Nested Schema for `match.http_match.path_match.case_sensitive` + +Optional: + +- `exact` (String) +- `prefix` (String) + + + + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_rule.example +``` diff --git a/docs/resources/vpclattice_service.md b/docs/resources/vpclattice_service.md new file mode 100644 index 000000000..f387d9562 --- /dev/null +++ b/docs/resources/vpclattice_service.md @@ -0,0 +1,59 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service Resource - terraform-provider-awscc" +subcategory: "" +description: |- + A service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC). +--- + +# awscc_vpclattice_service (Resource) + +A service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC). + + + + +## Schema + +### Optional + +- `auth_type` (String) +- `certificate_arn` (String) +- `custom_domain_name` (String) +- `dns_entry` (Attributes) (see [below for nested schema](#nestedatt--dns_entry)) +- `name` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `created_at` (String) +- `id` (String) Uniquely identifies the resource. +- `last_updated_at` (String) +- `service_id` (String) +- `status` (String) + + +### Nested Schema for `dns_entry` + +Read-Only: + +- `domain_name` (String) +- `hosted_zone_id` (String) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_service.example +``` diff --git a/docs/resources/vpclattice_service_network.md b/docs/resources/vpclattice_service_network.md new file mode 100644 index 000000000..5a8b6491c --- /dev/null +++ b/docs/resources/vpclattice_service_network.md @@ -0,0 +1,46 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network Resource - terraform-provider-awscc" +subcategory: "" +description: |- + A service network is a logical boundary for a collection of services. You can associate services and VPCs with a service network. +--- + +# awscc_vpclattice_service_network (Resource) + +A service network is a logical boundary for a collection of services. You can associate services and VPCs with a service network. + + + + +## Schema + +### Optional + +- `auth_type` (String) +- `name` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `created_at` (String) +- `id` (String) Uniquely identifies the resource. +- `last_updated_at` (String) +- `service_network_id` (String) + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_service_network.example +``` diff --git a/docs/resources/vpclattice_service_network_service_association.md b/docs/resources/vpclattice_service_network_service_association.md new file mode 100644 index 000000000..048df73de --- /dev/null +++ b/docs/resources/vpclattice_service_network_service_association.md @@ -0,0 +1,62 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network_service_association Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Associates a service with a service network. +--- + +# awscc_vpclattice_service_network_service_association (Resource) + +Associates a service with a service network. + + + + +## Schema + +### Optional + +- `dns_entry` (Attributes) (see [below for nested schema](#nestedatt--dns_entry)) +- `service_identifier` (String) +- `service_network_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) + +### Read-Only + +- `arn` (String) +- `created_at` (String) +- `id` (String) Uniquely identifies the resource. +- `service_arn` (String) +- `service_id` (String) +- `service_name` (String) +- `service_network_arn` (String) +- `service_network_id` (String) +- `service_network_name` (String) +- `service_network_service_association_id` (String) +- `status` (String) + + +### Nested Schema for `dns_entry` + +Read-Only: + +- `domain_name` (String) +- `hosted_zone_id` (String) + + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_service_network_service_association.example +``` diff --git a/docs/resources/vpclattice_service_network_vpc_association.md b/docs/resources/vpclattice_service_network_vpc_association.md new file mode 100644 index 000000000..13501005a --- /dev/null +++ b/docs/resources/vpclattice_service_network_vpc_association.md @@ -0,0 +1,51 @@ +--- +# generated by https://github.com/hashicorp/terraform-plugin-docs +page_title: "awscc_vpclattice_service_network_vpc_association Resource - terraform-provider-awscc" +subcategory: "" +description: |- + Associates a VPC with a service network. +--- + +# awscc_vpclattice_service_network_vpc_association (Resource) + +Associates a VPC with a service network. + + + + +## Schema + +### Optional + +- `security_group_ids` (Set of String) +- `service_network_identifier` (String) +- `tags` (Attributes Set) (see [below for nested schema](#nestedatt--tags)) +- `vpc_identifier` (String) + +### Read-Only + +- `arn` (String) +- `created_at` (String) +- `id` (String) Uniquely identifies the resource. +- `service_network_arn` (String) +- `service_network_id` (String) +- `service_network_name` (String) +- `service_network_vpc_association_id` (String) +- `status` (String) +- `vpc_id` (String) + + +### Nested Schema for `tags` + +Required: + +- `key` (String) +- `value` (String) + +## Import + +Import is supported using the following syntax: + +```shell +$ terraform import awscc_vpclattice_service_network_vpc_association.example +``` diff --git a/docs/resources/wafv2_ip_set.md b/docs/resources/wafv2_ip_set.md index f1290c23e..916888632 100644 --- a/docs/resources/wafv2_ip_set.md +++ b/docs/resources/wafv2_ip_set.md @@ -30,7 +30,8 @@ Contains a list of IP addresses. This can be either IPV4 or IPV6. The list will ### Read-Only - `arn` (String) ARN of the WAF entity. -- `id` (String) Id of the IPSet +- `id` (String) Uniquely identifies the resource. +- `ip_set_id` (String) Id of the IPSet ### Nested Schema for `tags` diff --git a/docs/resources/wafv2_regex_pattern_set.md b/docs/resources/wafv2_regex_pattern_set.md index b68a15a58..29d3120ae 100644 --- a/docs/resources/wafv2_regex_pattern_set.md +++ b/docs/resources/wafv2_regex_pattern_set.md @@ -29,7 +29,8 @@ Contains a list of Regular expressions based on the provided inputs. RegexPatter ### Read-Only - `arn` (String) ARN of the WAF entity. -- `id` (String) Id of the RegexPatternSet +- `id` (String) Uniquely identifies the resource. +- `regex_pattern_set_id` (String) Id of the RegexPatternSet ### Nested Schema for `tags` diff --git a/docs/resources/workspacesthinclient_environment.md b/docs/resources/workspacesthinclient_environment.md index 02e96a8c0..dd8fc28e2 100644 --- a/docs/resources/workspacesthinclient_environment.md +++ b/docs/resources/workspacesthinclient_environment.md @@ -36,7 +36,8 @@ Resource type definition for AWS::WorkSpacesThinClient::Environment. - `arn` (String) The environment ARN. - `created_at` (String) The timestamp in unix epoch format when environment was created. - `desktop_type` (String) The type of VDI. -- `id` (String) Unique identifier of the environment. +- `environment_id` (String) Unique identifier of the environment. +- `id` (String) Uniquely identifies the resource. - `pending_software_set_id` (String) The ID of the software set that is pending to be installed. - `pending_software_set_version` (String) The version of the software set that is pending to be installed. - `registered_devices_count` (Number) Number of devices registered to the environment. diff --git a/examples/resources/awscc_apigateway_base_path_mapping/import.sh b/examples/resources/awscc_apigateway_base_path_mapping/import.sh new file mode 100644 index 000000000..6d27f2c90 --- /dev/null +++ b/examples/resources/awscc_apigateway_base_path_mapping/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_apigateway_base_path_mapping.example \ No newline at end of file diff --git a/examples/resources/awscc_appintegrations_application/import.sh b/examples/resources/awscc_appintegrations_application/import.sh new file mode 100644 index 000000000..49ce0bb65 --- /dev/null +++ b/examples/resources/awscc_appintegrations_application/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_appintegrations_application.example \ No newline at end of file diff --git a/examples/resources/awscc_applicationautoscaling_scalable_target/import.sh b/examples/resources/awscc_applicationautoscaling_scalable_target/import.sh new file mode 100644 index 000000000..78f79ea4b --- /dev/null +++ b/examples/resources/awscc_applicationautoscaling_scalable_target/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_applicationautoscaling_scalable_target.example \ No newline at end of file diff --git a/examples/resources/awscc_cloudfront_key_value_store/import.sh b/examples/resources/awscc_cloudfront_key_value_store/import.sh new file mode 100644 index 000000000..d22290489 --- /dev/null +++ b/examples/resources/awscc_cloudfront_key_value_store/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_cloudfront_key_value_store.example \ No newline at end of file diff --git a/examples/resources/awscc_connect_instance/import.sh b/examples/resources/awscc_connect_instance/import.sh new file mode 100644 index 000000000..90361a923 --- /dev/null +++ b/examples/resources/awscc_connect_instance/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_connect_instance.example \ No newline at end of file diff --git a/examples/resources/awscc_ec2_vpcdhcp_options_association/import.sh b/examples/resources/awscc_ec2_vpcdhcp_options_association/import.sh new file mode 100644 index 000000000..d1fb79fef --- /dev/null +++ b/examples/resources/awscc_ec2_vpcdhcp_options_association/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_ec2_vpcdhcp_options_association.example \ No newline at end of file diff --git a/examples/resources/awscc_groundstation_config/import.sh b/examples/resources/awscc_groundstation_config/import.sh new file mode 100644 index 000000000..c5f478d2a --- /dev/null +++ b/examples/resources/awscc_groundstation_config/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_groundstation_config.example \ No newline at end of file diff --git a/examples/resources/awscc_iot_billing_group/import.sh b/examples/resources/awscc_iot_billing_group/import.sh new file mode 100644 index 000000000..67b07af3a --- /dev/null +++ b/examples/resources/awscc_iot_billing_group/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iot_billing_group.example \ No newline at end of file diff --git a/examples/resources/awscc_iot_thing/import.sh b/examples/resources/awscc_iot_thing/import.sh new file mode 100644 index 000000000..ac2d4e901 --- /dev/null +++ b/examples/resources/awscc_iot_thing/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iot_thing.example \ No newline at end of file diff --git a/examples/resources/awscc_iot_thing_group/import.sh b/examples/resources/awscc_iot_thing_group/import.sh new file mode 100644 index 000000000..1fd10d576 --- /dev/null +++ b/examples/resources/awscc_iot_thing_group/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iot_thing_group.example \ No newline at end of file diff --git a/examples/resources/awscc_iot_thing_type/import.sh b/examples/resources/awscc_iot_thing_type/import.sh new file mode 100644 index 000000000..28d030588 --- /dev/null +++ b/examples/resources/awscc_iot_thing_type/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iot_thing_type.example \ No newline at end of file diff --git a/examples/resources/awscc_iotanalytics_channel/import.sh b/examples/resources/awscc_iotanalytics_channel/import.sh new file mode 100644 index 000000000..027dff8e7 --- /dev/null +++ b/examples/resources/awscc_iotanalytics_channel/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iotanalytics_channel.example \ No newline at end of file diff --git a/examples/resources/awscc_iotanalytics_dataset/import.sh b/examples/resources/awscc_iotanalytics_dataset/import.sh new file mode 100644 index 000000000..92f8e638a --- /dev/null +++ b/examples/resources/awscc_iotanalytics_dataset/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iotanalytics_dataset.example \ No newline at end of file diff --git a/examples/resources/awscc_iotanalytics_datastore/import.sh b/examples/resources/awscc_iotanalytics_datastore/import.sh new file mode 100644 index 000000000..c760d2639 --- /dev/null +++ b/examples/resources/awscc_iotanalytics_datastore/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iotanalytics_datastore.example \ No newline at end of file diff --git a/examples/resources/awscc_iotanalytics_pipeline/import.sh b/examples/resources/awscc_iotanalytics_pipeline/import.sh new file mode 100644 index 000000000..17f454be1 --- /dev/null +++ b/examples/resources/awscc_iotanalytics_pipeline/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_iotanalytics_pipeline.example \ No newline at end of file diff --git a/examples/resources/awscc_ivschat_logging_configuration/import.sh b/examples/resources/awscc_ivschat_logging_configuration/import.sh new file mode 100644 index 000000000..1b5dc4af4 --- /dev/null +++ b/examples/resources/awscc_ivschat_logging_configuration/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_ivschat_logging_configuration.example \ No newline at end of file diff --git a/examples/resources/awscc_ivschat_room/import.sh b/examples/resources/awscc_ivschat_room/import.sh new file mode 100644 index 000000000..3eab9778e --- /dev/null +++ b/examples/resources/awscc_ivschat_room/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_ivschat_room.example \ No newline at end of file diff --git a/examples/resources/awscc_omics_variant_store/import.sh b/examples/resources/awscc_omics_variant_store/import.sh new file mode 100644 index 000000000..9bfd9b51f --- /dev/null +++ b/examples/resources/awscc_omics_variant_store/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_omics_variant_store.example \ No newline at end of file diff --git a/examples/resources/awscc_opensearchservice_domain/import.sh b/examples/resources/awscc_opensearchservice_domain/import.sh new file mode 100644 index 000000000..aeff57458 --- /dev/null +++ b/examples/resources/awscc_opensearchservice_domain/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_opensearchservice_domain.example \ No newline at end of file diff --git a/examples/resources/awscc_opsworkscm_server/import.sh b/examples/resources/awscc_opsworkscm_server/import.sh new file mode 100644 index 000000000..943317cf2 --- /dev/null +++ b/examples/resources/awscc_opsworkscm_server/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_opsworkscm_server.example \ No newline at end of file diff --git a/examples/resources/awscc_proton_environment_account_connection/import.sh b/examples/resources/awscc_proton_environment_account_connection/import.sh new file mode 100644 index 000000000..9559e2850 --- /dev/null +++ b/examples/resources/awscc_proton_environment_account_connection/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_proton_environment_account_connection.example \ No newline at end of file diff --git a/examples/resources/awscc_redshift_cluster/import.sh b/examples/resources/awscc_redshift_cluster/import.sh new file mode 100644 index 000000000..7876fbe8a --- /dev/null +++ b/examples/resources/awscc_redshift_cluster/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_redshift_cluster.example \ No newline at end of file diff --git a/examples/resources/awscc_s3outposts_endpoint/import.sh b/examples/resources/awscc_s3outposts_endpoint/import.sh new file mode 100644 index 000000000..ac9cc4fb8 --- /dev/null +++ b/examples/resources/awscc_s3outposts_endpoint/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_s3outposts_endpoint.example \ No newline at end of file diff --git a/examples/resources/awscc_sns_topic/import.sh b/examples/resources/awscc_sns_topic/import.sh new file mode 100644 index 000000000..87ad617a7 --- /dev/null +++ b/examples/resources/awscc_sns_topic/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_sns_topic.example \ No newline at end of file diff --git a/examples/resources/awscc_synthetics_canary/import.sh b/examples/resources/awscc_synthetics_canary/import.sh new file mode 100644 index 000000000..64c06540e --- /dev/null +++ b/examples/resources/awscc_synthetics_canary/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_synthetics_canary.example \ No newline at end of file diff --git a/examples/resources/awscc_synthetics_group/import.sh b/examples/resources/awscc_synthetics_group/import.sh new file mode 100644 index 000000000..22cd75d06 --- /dev/null +++ b/examples/resources/awscc_synthetics_group/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_synthetics_group.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_access_log_subscription/import.sh b/examples/resources/awscc_vpclattice_access_log_subscription/import.sh new file mode 100644 index 000000000..a7da8cd97 --- /dev/null +++ b/examples/resources/awscc_vpclattice_access_log_subscription/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_access_log_subscription.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_listener/import.sh b/examples/resources/awscc_vpclattice_listener/import.sh new file mode 100644 index 000000000..1b734d809 --- /dev/null +++ b/examples/resources/awscc_vpclattice_listener/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_listener.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_rule/import.sh b/examples/resources/awscc_vpclattice_rule/import.sh new file mode 100644 index 000000000..756909d12 --- /dev/null +++ b/examples/resources/awscc_vpclattice_rule/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_rule.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_service/import.sh b/examples/resources/awscc_vpclattice_service/import.sh new file mode 100644 index 000000000..5d5ca57d0 --- /dev/null +++ b/examples/resources/awscc_vpclattice_service/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_service.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_service_network/import.sh b/examples/resources/awscc_vpclattice_service_network/import.sh new file mode 100644 index 000000000..5021bdc1d --- /dev/null +++ b/examples/resources/awscc_vpclattice_service_network/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_service_network.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_service_network_service_association/import.sh b/examples/resources/awscc_vpclattice_service_network_service_association/import.sh new file mode 100644 index 000000000..8d323b0f3 --- /dev/null +++ b/examples/resources/awscc_vpclattice_service_network_service_association/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_service_network_service_association.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_service_network_vpc_association/import.sh b/examples/resources/awscc_vpclattice_service_network_vpc_association/import.sh new file mode 100644 index 000000000..efd2b461a --- /dev/null +++ b/examples/resources/awscc_vpclattice_service_network_vpc_association/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_service_network_vpc_association.example \ No newline at end of file diff --git a/examples/resources/awscc_vpclattice_target_group/import.sh b/examples/resources/awscc_vpclattice_target_group/import.sh new file mode 100644 index 000000000..a2558d557 --- /dev/null +++ b/examples/resources/awscc_vpclattice_target_group/import.sh @@ -0,0 +1 @@ +$ terraform import awscc_vpclattice_target_group.example \ No newline at end of file diff --git a/internal/aws/accessanalyzer/analyzer_resource_gen.go b/internal/aws/accessanalyzer/analyzer_resource_gen.go index ee70c2dba..e2d4544de 100644 --- a/internal/aws/accessanalyzer/analyzer_resource_gen.go +++ b/internal/aws/accessanalyzer/analyzer_resource_gen.go @@ -350,6 +350,7 @@ func analyzerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -368,7 +369,6 @@ func analyzerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AccessAnalyzer::Analyzer").WithTerraformTypeName("awscc_accessanalyzer_analyzer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "analyzer_configuration": "AnalyzerConfiguration", "analyzer_name": "AnalyzerName", diff --git a/internal/aws/acmpca/certificate_authority_activation_resource_gen.go b/internal/aws/acmpca/certificate_authority_activation_resource_gen.go index d8e7cf73c..4cec8c1e3 100644 --- a/internal/aws/acmpca/certificate_authority_activation_resource_gen.go +++ b/internal/aws/acmpca/certificate_authority_activation_resource_gen.go @@ -97,6 +97,7 @@ func certificateAuthorityActivationResource(ctx context.Context) (resource.Resou }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -115,7 +116,6 @@ func certificateAuthorityActivationResource(ctx context.Context) (resource.Resou opts = opts.WithCloudFormationTypeName("AWS::ACMPCA::CertificateAuthorityActivation").WithTerraformTypeName("awscc_acmpca_certificate_authority_activation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate": "Certificate", "certificate_authority_arn": "CertificateAuthorityArn", diff --git a/internal/aws/acmpca/certificate_authority_resource_gen.go b/internal/aws/acmpca/certificate_authority_resource_gen.go index 1e30578d0..2551d114a 100644 --- a/internal/aws/acmpca/certificate_authority_resource_gen.go +++ b/internal/aws/acmpca/certificate_authority_resource_gen.go @@ -1153,6 +1153,7 @@ func certificateAuthorityResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1171,7 +1172,6 @@ func certificateAuthorityResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::ACMPCA::CertificateAuthority").WithTerraformTypeName("awscc_acmpca_certificate_authority") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_location": "AccessLocation", "access_method": "AccessMethod", diff --git a/internal/aws/acmpca/certificate_resource_gen.go b/internal/aws/acmpca/certificate_resource_gen.go index 3e9c6e7a4..060793e86 100644 --- a/internal/aws/acmpca/certificate_resource_gen.go +++ b/internal/aws/acmpca/certificate_resource_gen.go @@ -1266,6 +1266,7 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1284,7 +1285,6 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ACMPCA::Certificate").WithTerraformTypeName("awscc_acmpca_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_passthrough": "ApiPassthrough", "arn": "Arn", diff --git a/internal/aws/acmpca/permission_resource_gen.go b/internal/aws/acmpca/permission_resource_gen.go index a38963d9f..c8ce11416 100644 --- a/internal/aws/acmpca/permission_resource_gen.go +++ b/internal/aws/acmpca/permission_resource_gen.go @@ -92,6 +92,7 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -110,7 +111,6 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ACMPCA::Permission").WithTerraformTypeName("awscc_acmpca_permission") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "certificate_authority_arn": "CertificateAuthorityArn", diff --git a/internal/aws/amplify/app_resource_gen.go b/internal/aws/amplify/app_resource_gen.go index b6b06b3cd..d1c8e66b7 100644 --- a/internal/aws/amplify/app_resource_gen.go +++ b/internal/aws/amplify/app_resource_gen.go @@ -817,6 +817,7 @@ func appResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -835,7 +836,6 @@ func appResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Amplify::App").WithTerraformTypeName("awscc_amplify_app") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_token": "AccessToken", "app_id": "AppId", diff --git a/internal/aws/amplify/branch_resource_gen.go b/internal/aws/amplify/branch_resource_gen.go index 8ed22e4b5..6d4358563 100644 --- a/internal/aws/amplify/branch_resource_gen.go +++ b/internal/aws/amplify/branch_resource_gen.go @@ -431,6 +431,7 @@ func branchResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -449,7 +450,6 @@ func branchResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Amplify::Branch").WithTerraformTypeName("awscc_amplify_branch") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_id": "AppId", "arn": "Arn", diff --git a/internal/aws/amplify/domain_resource_gen.go b/internal/aws/amplify/domain_resource_gen.go index f194e3210..1b7409af5 100644 --- a/internal/aws/amplify/domain_resource_gen.go +++ b/internal/aws/amplify/domain_resource_gen.go @@ -372,6 +372,7 @@ func domainResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -390,7 +391,6 @@ func domainResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Amplify::Domain").WithTerraformTypeName("awscc_amplify_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_id": "AppId", "arn": "Arn", diff --git a/internal/aws/apigateway/account_resource_gen.go b/internal/aws/apigateway/account_resource_gen.go index 51f44bf91..5b2b41e23 100644 --- a/internal/aws/apigateway/account_resource_gen.go +++ b/internal/aws/apigateway/account_resource_gen.go @@ -46,7 +46,7 @@ func accountResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "account_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -55,6 +55,15 @@ func accountResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The ``AWS::ApiGateway::Account`` resource specifies the IAM role that Amazon API Gateway uses to write API logs to Amazon CloudWatch Logs. To avoid overwriting other roles, you should only have one ``AWS::ApiGateway::Account`` resource per region per account.", Version: 1, @@ -65,10 +74,9 @@ func accountResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Account").WithTerraformTypeName("awscc_apigateway_account") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ + "account_id": "Id", "cloudwatch_role_arn": "CloudWatchRoleArn", - "id": "Id", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/apigateway/account_singular_data_source_gen.go b/internal/aws/apigateway/account_singular_data_source_gen.go index ec66ff769..af05e3f4d 100644 --- a/internal/aws/apigateway/account_singular_data_source_gen.go +++ b/internal/aws/apigateway/account_singular_data_source_gen.go @@ -40,7 +40,7 @@ func accountDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "account_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -61,8 +61,8 @@ func accountDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Account").WithTerraformTypeName("awscc_apigateway_account") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ + "account_id": "Id", "cloudwatch_role_arn": "CloudWatchRoleArn", - "id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/apigateway/api_key_resource_gen.go b/internal/aws/apigateway/api_key_resource_gen.go index 899cafc3b..73cfaeeae 100644 --- a/internal/aws/apigateway/api_key_resource_gen.go +++ b/internal/aws/apigateway/api_key_resource_gen.go @@ -255,6 +255,7 @@ func apiKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -273,7 +274,6 @@ func apiKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::ApiKey").WithTerraformTypeName("awscc_apigateway_api_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_key_id": "APIKeyId", "customer_id": "CustomerId", diff --git a/internal/aws/apigateway/authorizer_resource_gen.go b/internal/aws/apigateway/authorizer_resource_gen.go index 2e5c6ab4f..9eef3f2a4 100644 --- a/internal/aws/apigateway/authorizer_resource_gen.go +++ b/internal/aws/apigateway/authorizer_resource_gen.go @@ -190,6 +190,7 @@ func authorizerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -208,7 +209,6 @@ func authorizerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Authorizer").WithTerraformTypeName("awscc_apigateway_authorizer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auth_type": "AuthType", "authorizer_credentials": "AuthorizerCredentials", diff --git a/internal/aws/apigateway/base_path_mapping_plural_data_source_gen.go b/internal/aws/apigateway/base_path_mapping_plural_data_source_gen.go new file mode 100644 index 000000000..e4bb44655 --- /dev/null +++ b/internal/aws/apigateway/base_path_mapping_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package apigateway + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_apigateway_base_path_mappings", basePathMappingsDataSource) +} + +// basePathMappingsDataSource returns the Terraform awscc_apigateway_base_path_mappings data source. +// This Terraform data source corresponds to the CloudFormation AWS::ApiGateway::BasePathMapping resource. +func basePathMappingsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::ApiGateway::BasePathMapping", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::BasePathMapping").WithTerraformTypeName("awscc_apigateway_base_path_mappings") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/apigateway/base_path_mapping_plural_data_source_gen_test.go b/internal/aws/apigateway/base_path_mapping_plural_data_source_gen_test.go new file mode 100644 index 000000000..d8e57a521 --- /dev/null +++ b/internal/aws/apigateway/base_path_mapping_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package apigateway_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSApiGatewayBasePathMappingsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApiGateway::BasePathMapping", "awscc_apigateway_base_path_mappings", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/apigateway/base_path_mapping_resource_gen.go b/internal/aws/apigateway/base_path_mapping_resource_gen.go new file mode 100644 index 000000000..87d043b1f --- /dev/null +++ b/internal/aws/apigateway/base_path_mapping_resource_gen.go @@ -0,0 +1,126 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package apigateway + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_apigateway_base_path_mapping", basePathMappingResource) +} + +// basePathMappingResource returns the Terraform awscc_apigateway_base_path_mapping resource. +// This Terraform resource corresponds to the CloudFormation AWS::ApiGateway::BasePathMapping resource. +func basePathMappingResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BasePath + // CloudFormation resource type schema: + // + // { + // "description": "The base path name that callers of the API must provide as part of the URL after the domain name.", + // "type": "string" + // } + "base_path": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The base path name that callers of the API must provide as part of the URL after the domain name.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainName + // CloudFormation resource type schema: + // + // { + // "description": "The domain name of the BasePathMapping resource to be described.", + // "type": "string" + // } + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The domain name of the BasePathMapping resource to be described.", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RestApiId + // CloudFormation resource type schema: + // + // { + // "description": "The string identifier of the associated RestApi.", + // "type": "string" + // } + "rest_api_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The string identifier of the associated RestApi.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Stage + // CloudFormation resource type schema: + // + // { + // "description": "The name of the associated stage.", + // "type": "string" + // } + "stage": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the associated stage.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "The ``AWS::ApiGateway::BasePathMapping`` resource creates a base path that clients who call your API must use in the invocation URL.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::BasePathMapping").WithTerraformTypeName("awscc_apigateway_base_path_mapping") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "base_path": "BasePath", + "domain_name": "DomainName", + "rest_api_id": "RestApiId", + "stage": "Stage", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/apigateway/base_path_mapping_resource_gen_test.go b/internal/aws/apigateway/base_path_mapping_resource_gen_test.go new file mode 100644 index 000000000..35b761793 --- /dev/null +++ b/internal/aws/apigateway/base_path_mapping_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package apigateway_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSApiGatewayBasePathMapping_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApiGateway::BasePathMapping", "awscc_apigateway_base_path_mapping", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/apigateway/base_path_mapping_singular_data_source_gen.go b/internal/aws/apigateway/base_path_mapping_singular_data_source_gen.go new file mode 100644 index 000000000..2a8e7e25a --- /dev/null +++ b/internal/aws/apigateway/base_path_mapping_singular_data_source_gen.go @@ -0,0 +1,99 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package apigateway + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_apigateway_base_path_mapping", basePathMappingDataSource) +} + +// basePathMappingDataSource returns the Terraform awscc_apigateway_base_path_mapping data source. +// This Terraform data source corresponds to the CloudFormation AWS::ApiGateway::BasePathMapping resource. +func basePathMappingDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BasePath + // CloudFormation resource type schema: + // + // { + // "description": "The base path name that callers of the API must provide as part of the URL after the domain name.", + // "type": "string" + // } + "base_path": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The base path name that callers of the API must provide as part of the URL after the domain name.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainName + // CloudFormation resource type schema: + // + // { + // "description": "The domain name of the BasePathMapping resource to be described.", + // "type": "string" + // } + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The domain name of the BasePathMapping resource to be described.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RestApiId + // CloudFormation resource type schema: + // + // { + // "description": "The string identifier of the associated RestApi.", + // "type": "string" + // } + "rest_api_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The string identifier of the associated RestApi.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Stage + // CloudFormation resource type schema: + // + // { + // "description": "The name of the associated stage.", + // "type": "string" + // } + "stage": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the associated stage.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::ApiGateway::BasePathMapping", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::BasePathMapping").WithTerraformTypeName("awscc_apigateway_base_path_mapping") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "base_path": "BasePath", + "domain_name": "DomainName", + "rest_api_id": "RestApiId", + "stage": "Stage", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/apigateway/base_path_mapping_singular_data_source_gen_test.go b/internal/aws/apigateway/base_path_mapping_singular_data_source_gen_test.go new file mode 100644 index 000000000..2a8a39102 --- /dev/null +++ b/internal/aws/apigateway/base_path_mapping_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package apigateway_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSApiGatewayBasePathMappingDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApiGateway::BasePathMapping", "awscc_apigateway_base_path_mapping", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSApiGatewayBasePathMappingDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApiGateway::BasePathMapping", "awscc_apigateway_base_path_mapping", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/apigateway/client_certificate_resource_gen.go b/internal/aws/apigateway/client_certificate_resource_gen.go index 9cc031525..f77a8f2c5 100644 --- a/internal/aws/apigateway/client_certificate_resource_gen.go +++ b/internal/aws/apigateway/client_certificate_resource_gen.go @@ -101,6 +101,7 @@ func clientCertificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func clientCertificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::ClientCertificate").WithTerraformTypeName("awscc_apigateway_client_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "client_certificate_id": "ClientCertificateId", "description": "Description", diff --git a/internal/aws/apigateway/deployment_resource_gen.go b/internal/aws/apigateway/deployment_resource_gen.go index ed27ff190..d05a4da2f 100644 --- a/internal/aws/apigateway/deployment_resource_gen.go +++ b/internal/aws/apigateway/deployment_resource_gen.go @@ -700,6 +700,7 @@ func deploymentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -718,7 +719,6 @@ func deploymentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Deployment").WithTerraformTypeName("awscc_apigateway_deployment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_log_setting": "AccessLogSetting", "cache_cluster_enabled": "CacheClusterEnabled", diff --git a/internal/aws/apigateway/documentation_part_resource_gen.go b/internal/aws/apigateway/documentation_part_resource_gen.go index 873f6bead..3b7c5b594 100644 --- a/internal/aws/apigateway/documentation_part_resource_gen.go +++ b/internal/aws/apigateway/documentation_part_resource_gen.go @@ -182,6 +182,7 @@ func documentationPartResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -200,7 +201,6 @@ func documentationPartResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::DocumentationPart").WithTerraformTypeName("awscc_apigateway_documentation_part") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "documentation_part_id": "DocumentationPartId", "location": "Location", diff --git a/internal/aws/apigateway/documentation_version_resource_gen.go b/internal/aws/apigateway/documentation_version_resource_gen.go index 9ca8f227a..03e3a69f7 100644 --- a/internal/aws/apigateway/documentation_version_resource_gen.go +++ b/internal/aws/apigateway/documentation_version_resource_gen.go @@ -79,6 +79,7 @@ func documentationVersionResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -97,7 +98,6 @@ func documentationVersionResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::DocumentationVersion").WithTerraformTypeName("awscc_apigateway_documentation_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "documentation_version": "DocumentationVersion", diff --git a/internal/aws/apigateway/domain_name_resource_gen.go b/internal/aws/apigateway/domain_name_resource_gen.go index 1d0401794..a725ec5c5 100644 --- a/internal/aws/apigateway/domain_name_resource_gen.go +++ b/internal/aws/apigateway/domain_name_resource_gen.go @@ -261,6 +261,7 @@ func domainNameResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -279,7 +280,6 @@ func domainNameResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::DomainName").WithTerraformTypeName("awscc_apigateway_domain_name") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_arn": "CertificateArn", "distribution_domain_name": "DistributionDomainName", diff --git a/internal/aws/apigateway/method_resource_gen.go b/internal/aws/apigateway/method_resource_gen.go index 9dd58b2eb..161bb7dae 100644 --- a/internal/aws/apigateway/method_resource_gen.go +++ b/internal/aws/apigateway/method_resource_gen.go @@ -698,6 +698,7 @@ func methodResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -716,7 +717,6 @@ func methodResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Method").WithTerraformTypeName("awscc_apigateway_method") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_key_required": "ApiKeyRequired", "authorization_scopes": "AuthorizationScopes", diff --git a/internal/aws/apigateway/model_resource_gen.go b/internal/aws/apigateway/model_resource_gen.go index 2855c4595..7c77ce33d 100644 --- a/internal/aws/apigateway/model_resource_gen.go +++ b/internal/aws/apigateway/model_resource_gen.go @@ -102,6 +102,7 @@ func modelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -120,7 +121,6 @@ func modelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Model").WithTerraformTypeName("awscc_apigateway_model") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "content_type": "ContentType", "description": "Description", diff --git a/internal/aws/apigateway/request_validator_resource_gen.go b/internal/aws/apigateway/request_validator_resource_gen.go index d48f90074..be6ed80cd 100644 --- a/internal/aws/apigateway/request_validator_resource_gen.go +++ b/internal/aws/apigateway/request_validator_resource_gen.go @@ -101,6 +101,7 @@ func requestValidatorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func requestValidatorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::RequestValidator").WithTerraformTypeName("awscc_apigateway_request_validator") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "name": "Name", "request_validator_id": "RequestValidatorId", diff --git a/internal/aws/apigateway/resource_resource_gen.go b/internal/aws/apigateway/resource_resource_gen.go index c0fe97435..60ad53571 100644 --- a/internal/aws/apigateway/resource_resource_gen.go +++ b/internal/aws/apigateway/resource_resource_gen.go @@ -82,6 +82,7 @@ func resourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -100,7 +101,6 @@ func resourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Resource").WithTerraformTypeName("awscc_apigateway_resource") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "parent_id": "ParentId", "path_part": "PathPart", diff --git a/internal/aws/apigateway/rest_api_resource_gen.go b/internal/aws/apigateway/rest_api_resource_gen.go index 19db37b40..8c501b922 100644 --- a/internal/aws/apigateway/rest_api_resource_gen.go +++ b/internal/aws/apigateway/rest_api_resource_gen.go @@ -440,6 +440,7 @@ func restApiResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -458,7 +459,6 @@ func restApiResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::RestApi").WithTerraformTypeName("awscc_apigateway_rest_api") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_key_source_type": "ApiKeySourceType", "binary_media_types": "BinaryMediaTypes", diff --git a/internal/aws/apigateway/stage_resource_gen.go b/internal/aws/apigateway/stage_resource_gen.go index 0b85c0056..272b1b41c 100644 --- a/internal/aws/apigateway/stage_resource_gen.go +++ b/internal/aws/apigateway/stage_resource_gen.go @@ -554,6 +554,7 @@ func stageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -572,7 +573,6 @@ func stageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Stage").WithTerraformTypeName("awscc_apigateway_stage") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_log_setting": "AccessLogSetting", "cache_cluster_enabled": "CacheClusterEnabled", diff --git a/internal/aws/apigateway/usage_plan_key_resource_gen.go b/internal/aws/apigateway/usage_plan_key_resource_gen.go index e95afcd97..d7b57a6b2 100644 --- a/internal/aws/apigateway/usage_plan_key_resource_gen.go +++ b/internal/aws/apigateway/usage_plan_key_resource_gen.go @@ -33,7 +33,7 @@ func usagePlanKeyResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "usage_plan_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -92,6 +92,15 @@ func usagePlanKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The ``AWS::ApiGateway::UsagePlanKey`` resource associates an API key with a usage plan. This association determines which users the usage plan is applied to.", Version: 1, @@ -102,12 +111,11 @@ func usagePlanKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::UsagePlanKey").WithTerraformTypeName("awscc_apigateway_usage_plan_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "key_id": "KeyId", - "key_type": "KeyType", - "usage_plan_id": "UsagePlanId", + "key_id": "KeyId", + "key_type": "KeyType", + "usage_plan_id": "UsagePlanId", + "usage_plan_key_id": "Id", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/apigateway/usage_plan_key_singular_data_source_gen.go b/internal/aws/apigateway/usage_plan_key_singular_data_source_gen.go index 346b84cdf..c2834b6b4 100644 --- a/internal/aws/apigateway/usage_plan_key_singular_data_source_gen.go +++ b/internal/aws/apigateway/usage_plan_key_singular_data_source_gen.go @@ -29,7 +29,7 @@ func usagePlanKeyDataSource(ctx context.Context) (datasource.DataSource, error) // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "usage_plan_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -86,10 +86,10 @@ func usagePlanKeyDataSource(ctx context.Context) (datasource.DataSource, error) opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::UsagePlanKey").WithTerraformTypeName("awscc_apigateway_usage_plan_key") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "key_id": "KeyId", - "key_type": "KeyType", - "usage_plan_id": "UsagePlanId", + "key_id": "KeyId", + "key_type": "KeyType", + "usage_plan_id": "UsagePlanId", + "usage_plan_key_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/apigateway/usage_plan_resource_gen.go b/internal/aws/apigateway/usage_plan_resource_gen.go index f476243e9..bb5221c87 100644 --- a/internal/aws/apigateway/usage_plan_resource_gen.go +++ b/internal/aws/apigateway/usage_plan_resource_gen.go @@ -174,7 +174,7 @@ func usagePlanResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "usage_plan_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -380,6 +380,15 @@ func usagePlanResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The ``AWS::ApiGateway::UsagePlan`` resource creates a usage plan for deployed APIs. A usage plan sets a target for the throttling and quota limits on individual client API keys. For more information, see [Creating and Using API Usage Plans in Amazon API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-usage-plans.html) in the *API Gateway Developer Guide*.\n In some cases clients can exceed the targets that you set. Don?t rely on usage plans to control costs. Consider using [](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html) to monitor costs and [](https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html) to manage API requests.", Version: 1, @@ -390,13 +399,11 @@ func usagePlanResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::UsagePlan").WithTerraformTypeName("awscc_apigateway_usage_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "api_stages": "ApiStages", "burst_limit": "BurstLimit", "description": "Description", - "id": "Id", "key": "Key", "limit": "Limit", "offset": "Offset", @@ -406,6 +413,7 @@ func usagePlanResource(ctx context.Context) (resource.Resource, error) { "stage": "Stage", "tags": "Tags", "throttle": "Throttle", + "usage_plan_id": "Id", "usage_plan_name": "UsagePlanName", "value": "Value", }) diff --git a/internal/aws/apigateway/usage_plan_singular_data_source_gen.go b/internal/aws/apigateway/usage_plan_singular_data_source_gen.go index cdefe0096..20c2e9154 100644 --- a/internal/aws/apigateway/usage_plan_singular_data_source_gen.go +++ b/internal/aws/apigateway/usage_plan_singular_data_source_gen.go @@ -125,7 +125,7 @@ func usagePlanDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "usage_plan_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -292,7 +292,6 @@ func usagePlanDataSource(ctx context.Context) (datasource.DataSource, error) { "api_stages": "ApiStages", "burst_limit": "BurstLimit", "description": "Description", - "id": "Id", "key": "Key", "limit": "Limit", "offset": "Offset", @@ -302,6 +301,7 @@ func usagePlanDataSource(ctx context.Context) (datasource.DataSource, error) { "stage": "Stage", "tags": "Tags", "throttle": "Throttle", + "usage_plan_id": "Id", "usage_plan_name": "UsagePlanName", "value": "Value", }) diff --git a/internal/aws/apigateway/vpc_link_resource_gen.go b/internal/aws/apigateway/vpc_link_resource_gen.go index c6a470c36..6f9d27f52 100644 --- a/internal/aws/apigateway/vpc_link_resource_gen.go +++ b/internal/aws/apigateway/vpc_link_resource_gen.go @@ -135,6 +135,7 @@ func vpcLinkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -153,7 +154,6 @@ func vpcLinkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::VpcLink").WithTerraformTypeName("awscc_apigateway_vpc_link") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "key": "Key", diff --git a/internal/aws/apigatewayv2/api_mapping_resource_gen.go b/internal/aws/apigatewayv2/api_mapping_resource_gen.go index 78f7e8fd7..13d6fa3d3 100644 --- a/internal/aws/apigatewayv2/api_mapping_resource_gen.go +++ b/internal/aws/apigatewayv2/api_mapping_resource_gen.go @@ -91,6 +91,7 @@ func apiMappingResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -109,7 +110,6 @@ func apiMappingResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::ApiMapping").WithTerraformTypeName("awscc_apigatewayv2_api_mapping") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "api_mapping_id": "ApiMappingId", diff --git a/internal/aws/apigatewayv2/api_resource_gen.go b/internal/aws/apigatewayv2/api_resource_gen.go index 98e51cde8..82f450c50 100644 --- a/internal/aws/apigatewayv2/api_resource_gen.go +++ b/internal/aws/apigatewayv2/api_resource_gen.go @@ -498,6 +498,7 @@ func apiResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -516,7 +517,6 @@ func apiResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::Api").WithTerraformTypeName("awscc_apigatewayv2_api") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_credentials": "AllowCredentials", "allow_headers": "AllowHeaders", diff --git a/internal/aws/apigatewayv2/authorizer_resource_gen.go b/internal/aws/apigatewayv2/authorizer_resource_gen.go index f683bd160..c8d088761 100644 --- a/internal/aws/apigatewayv2/authorizer_resource_gen.go +++ b/internal/aws/apigatewayv2/authorizer_resource_gen.go @@ -242,6 +242,7 @@ func authorizerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -260,7 +261,6 @@ func authorizerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::Authorizer").WithTerraformTypeName("awscc_apigatewayv2_authorizer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "audience": "Audience", diff --git a/internal/aws/apigatewayv2/deployment_resource_gen.go b/internal/aws/apigatewayv2/deployment_resource_gen.go index 2f66eacf2..5dbcb811b 100644 --- a/internal/aws/apigatewayv2/deployment_resource_gen.go +++ b/internal/aws/apigatewayv2/deployment_resource_gen.go @@ -85,6 +85,7 @@ func deploymentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -103,7 +104,6 @@ func deploymentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::Deployment").WithTerraformTypeName("awscc_apigatewayv2_deployment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "deployment_id": "DeploymentId", diff --git a/internal/aws/apigatewayv2/domain_name_resource_gen.go b/internal/aws/apigatewayv2/domain_name_resource_gen.go index f1572224f..5a492c870 100644 --- a/internal/aws/apigatewayv2/domain_name_resource_gen.go +++ b/internal/aws/apigatewayv2/domain_name_resource_gen.go @@ -233,6 +233,7 @@ func domainNameResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -251,7 +252,6 @@ func domainNameResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::DomainName").WithTerraformTypeName("awscc_apigatewayv2_domain_name") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_arn": "CertificateArn", "certificate_name": "CertificateName", diff --git a/internal/aws/apigatewayv2/integration_response_resource_gen.go b/internal/aws/apigatewayv2/integration_response_resource_gen.go index a4e64a44d..4328c3a07 100644 --- a/internal/aws/apigatewayv2/integration_response_resource_gen.go +++ b/internal/aws/apigatewayv2/integration_response_resource_gen.go @@ -142,6 +142,7 @@ func integrationResponseResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -160,7 +161,6 @@ func integrationResponseResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::IntegrationResponse").WithTerraformTypeName("awscc_apigatewayv2_integration_response") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "content_handling_strategy": "ContentHandlingStrategy", diff --git a/internal/aws/apigatewayv2/model_resource_gen.go b/internal/aws/apigatewayv2/model_resource_gen.go index b7e409882..c2d702f3c 100644 --- a/internal/aws/apigatewayv2/model_resource_gen.go +++ b/internal/aws/apigatewayv2/model_resource_gen.go @@ -108,6 +108,7 @@ func modelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -126,7 +127,6 @@ func modelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::Model").WithTerraformTypeName("awscc_apigatewayv2_model") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "content_type": "ContentType", diff --git a/internal/aws/apigatewayv2/route_resource_gen.go b/internal/aws/apigatewayv2/route_resource_gen.go index 0422486ed..fad4072fc 100644 --- a/internal/aws/apigatewayv2/route_resource_gen.go +++ b/internal/aws/apigatewayv2/route_resource_gen.go @@ -231,6 +231,7 @@ func routeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -249,7 +250,6 @@ func routeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::Route").WithTerraformTypeName("awscc_apigatewayv2_route") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "api_key_required": "ApiKeyRequired", diff --git a/internal/aws/apigatewayv2/vpc_link_resource_gen.go b/internal/aws/apigatewayv2/vpc_link_resource_gen.go index 58aa5d9ee..4cf094362 100644 --- a/internal/aws/apigatewayv2/vpc_link_resource_gen.go +++ b/internal/aws/apigatewayv2/vpc_link_resource_gen.go @@ -117,6 +117,7 @@ func vpcLinkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -135,7 +136,6 @@ func vpcLinkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApiGatewayV2::VpcLink").WithTerraformTypeName("awscc_apigatewayv2_vpc_link") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "name": "Name", "security_group_ids": "SecurityGroupIds", diff --git a/internal/aws/appconfig/application_resource_gen.go b/internal/aws/appconfig/application_resource_gen.go index e47f7eeaf..8f703e31b 100644 --- a/internal/aws/appconfig/application_resource_gen.go +++ b/internal/aws/appconfig/application_resource_gen.go @@ -130,6 +130,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -148,7 +149,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppConfig::Application").WithTerraformTypeName("awscc_appconfig_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_id": "ApplicationId", "description": "Description", diff --git a/internal/aws/appconfig/configuration_profile_resource_gen.go b/internal/aws/appconfig/configuration_profile_resource_gen.go index b45a3f27d..54aae2307 100644 --- a/internal/aws/appconfig/configuration_profile_resource_gen.go +++ b/internal/aws/appconfig/configuration_profile_resource_gen.go @@ -326,6 +326,7 @@ func configurationProfileResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -344,7 +345,6 @@ func configurationProfileResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::AppConfig::ConfigurationProfile").WithTerraformTypeName("awscc_appconfig_configuration_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_id": "ApplicationId", "configuration_profile_id": "ConfigurationProfileId", diff --git a/internal/aws/appconfig/environment_resource_gen.go b/internal/aws/appconfig/environment_resource_gen.go index c7e37b232..8f08c989f 100644 --- a/internal/aws/appconfig/environment_resource_gen.go +++ b/internal/aws/appconfig/environment_resource_gen.go @@ -232,6 +232,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -250,7 +251,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppConfig::Environment").WithTerraformTypeName("awscc_appconfig_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarm_arn": "AlarmArn", "alarm_role_arn": "AlarmRoleArn", diff --git a/internal/aws/appconfig/extension_association_resource_gen.go b/internal/aws/appconfig/extension_association_resource_gen.go index 8816ffc05..29851881c 100644 --- a/internal/aws/appconfig/extension_association_resource_gen.go +++ b/internal/aws/appconfig/extension_association_resource_gen.go @@ -89,7 +89,7 @@ func extensionAssociationResource(ctx context.Context) (resource.Resource, error // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "extension_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -208,6 +208,15 @@ func extensionAssociationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "An example resource schema demonstrating some basic constructs and validation rules.", Version: 1, @@ -218,13 +227,12 @@ func extensionAssociationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::AppConfig::ExtensionAssociation").WithTerraformTypeName("awscc_appconfig_extension_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "extension_arn": "ExtensionArn", + "extension_association_id": "Id", "extension_identifier": "ExtensionIdentifier", "extension_version_number": "ExtensionVersionNumber", - "id": "Id", "key": "Key", "parameters": "Parameters", "resource_arn": "ResourceArn", diff --git a/internal/aws/appconfig/extension_association_singular_data_source_gen.go b/internal/aws/appconfig/extension_association_singular_data_source_gen.go index 2d32675fa..cf0d9db83 100644 --- a/internal/aws/appconfig/extension_association_singular_data_source_gen.go +++ b/internal/aws/appconfig/extension_association_singular_data_source_gen.go @@ -65,7 +65,7 @@ func extensionAssociationDataSource(ctx context.Context) (datasource.DataSource, // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "extension_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Parameters @@ -172,9 +172,9 @@ func extensionAssociationDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "extension_arn": "ExtensionArn", + "extension_association_id": "Id", "extension_identifier": "ExtensionIdentifier", "extension_version_number": "ExtensionVersionNumber", - "id": "Id", "key": "Key", "parameters": "Parameters", "resource_arn": "ResourceArn", diff --git a/internal/aws/appconfig/hosted_configuration_version_resource_gen.go b/internal/aws/appconfig/hosted_configuration_version_resource_gen.go index 099a72423..9e2a0fe5c 100644 --- a/internal/aws/appconfig/hosted_configuration_version_resource_gen.go +++ b/internal/aws/appconfig/hosted_configuration_version_resource_gen.go @@ -174,6 +174,7 @@ func hostedConfigurationVersionResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func hostedConfigurationVersionResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::AppConfig::HostedConfigurationVersion").WithTerraformTypeName("awscc_appconfig_hosted_configuration_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_id": "ApplicationId", "configuration_profile_id": "ConfigurationProfileId", diff --git a/internal/aws/appflow/connector_profile_resource_gen.go b/internal/aws/appflow/connector_profile_resource_gen.go index 31e2a1d41..0a255410f 100644 --- a/internal/aws/appflow/connector_profile_resource_gen.go +++ b/internal/aws/appflow/connector_profile_resource_gen.go @@ -2938,6 +2938,7 @@ func connectorProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -2956,7 +2957,6 @@ func connectorProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppFlow::ConnectorProfile").WithTerraformTypeName("awscc_appflow_connector_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_key_id": "AccessKeyId", "access_token": "AccessToken", diff --git a/internal/aws/appflow/connector_resource_gen.go b/internal/aws/appflow/connector_resource_gen.go index bbc9b556a..e8cbd0b57 100644 --- a/internal/aws/appflow/connector_resource_gen.go +++ b/internal/aws/appflow/connector_resource_gen.go @@ -159,6 +159,7 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -177,7 +178,6 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppFlow::Connector").WithTerraformTypeName("awscc_appflow_connector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "connector_arn": "ConnectorArn", "connector_label": "ConnectorLabel", diff --git a/internal/aws/appflow/flow_resource_gen.go b/internal/aws/appflow/flow_resource_gen.go index ff4fe7036..aa182308d 100644 --- a/internal/aws/appflow/flow_resource_gen.go +++ b/internal/aws/appflow/flow_resource_gen.go @@ -4156,6 +4156,7 @@ func flowResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -4174,7 +4175,6 @@ func flowResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppFlow::Flow").WithTerraformTypeName("awscc_appflow_flow") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation_config": "AggregationConfig", "aggregation_type": "AggregationType", diff --git a/internal/aws/appintegrations/application_plural_data_source_gen.go b/internal/aws/appintegrations/application_plural_data_source_gen.go new file mode 100644 index 000000000..5e22d5570 --- /dev/null +++ b/internal/aws/appintegrations/application_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package appintegrations + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_appintegrations_applications", applicationsDataSource) +} + +// applicationsDataSource returns the Terraform awscc_appintegrations_applications data source. +// This Terraform data source corresponds to the CloudFormation AWS::AppIntegrations::Application resource. +func applicationsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::AppIntegrations::Application", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::AppIntegrations::Application").WithTerraformTypeName("awscc_appintegrations_applications") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/appintegrations/application_plural_data_source_gen_test.go b/internal/aws/appintegrations/application_plural_data_source_gen_test.go new file mode 100644 index 000000000..93e398550 --- /dev/null +++ b/internal/aws/appintegrations/application_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package appintegrations_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSAppIntegrationsApplicationsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::AppIntegrations::Application", "awscc_appintegrations_applications", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/appintegrations/application_resource_gen.go b/internal/aws/appintegrations/application_resource_gen.go new file mode 100644 index 000000000..3105041dd --- /dev/null +++ b/internal/aws/appintegrations/application_resource_gen.go @@ -0,0 +1,309 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package appintegrations + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_appintegrations_application", applicationResource) +} + +// applicationResource returns the Terraform awscc_appintegrations_application resource. +// This Terraform resource corresponds to the CloudFormation AWS::AppIntegrations::Application resource. +func applicationResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ApplicationArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the application.", + // "maxLength": 2048, + // "minLength": 1, + // "type": "string" + // } + "application_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the application.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ApplicationSourceConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Application source config", + // "properties": { + // "ExternalUrlConfig": { + // "additionalProperties": false, + // "properties": { + // "AccessUrl": { + // "maxLength": 1000, + // "minLength": 1, + // "pattern": "^\\w+\\:\\/\\/.*$", + // "type": "string" + // }, + // "ApprovedOrigins": { + // "insertionOrder": false, + // "items": { + // "maxLength": 1000, + // "minLength": 1, + // "pattern": "^\\w+\\:\\/\\/.*$", + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array" + // } + // }, + // "required": [ + // "AccessUrl", + // "ApprovedOrigins" + // ], + // "type": "object" + // } + // }, + // "required": [ + // "ExternalUrlConfig" + // ], + // "type": "object" + // } + "application_source_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ExternalUrlConfig + "external_url_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessUrl + "access_url": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 1000), + stringvalidator.RegexMatches(regexp.MustCompile("^\\w+\\:\\/\\/.*$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: ApprovedOrigins + "approved_origins": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 50), + listvalidator.ValueStringsAre( + stringvalidator.LengthBetween(1, 1000), + stringvalidator.RegexMatches(regexp.MustCompile("^\\w+\\:\\/\\/.*$"), ""), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Application source config", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Description + // CloudFormation resource type schema: + // + // { + // "description": "The application description.", + // "maxLength": 1000, + // "minLength": 1, + // "type": "string" + // } + "description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The application description.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 1000), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The id of the application.", + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9/\\._\\-]+$", + // "type": "string" + // } + "application_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The id of the application.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "The name of the application.", + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9/\\._\\-]+$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the application.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9/\\._\\-]+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Namespace + // CloudFormation resource type schema: + // + // { + // "description": "The namespace of the application.", + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9/\\._\\-]+$", + // "type": "string" + // } + "namespace": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The namespace of the application.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9/\\._\\-]+$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "The tags (keys and values) associated with the application.", + // "items": { + // "additionalProperties": false, + // "description": "A label for tagging Application resources", + // "properties": { + // "Key": { + // "description": "A key to identify the tag.", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // }, + // "Value": { + // "description": "Corresponding tag value for the key.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 200, + // "minItems": 0, + // "type": "array" + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A key to identify the tag.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Corresponding tag value for the key.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The tags (keys and values) associated with the application.", + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 200), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS:AppIntegrations::Application", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::AppIntegrations::Application").WithTerraformTypeName("awscc_appintegrations_application") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_url": "AccessUrl", + "application_arn": "ApplicationArn", + "application_id": "Id", + "application_source_config": "ApplicationSourceConfig", + "approved_origins": "ApprovedOrigins", + "description": "Description", + "external_url_config": "ExternalUrlConfig", + "key": "Key", + "name": "Name", + "namespace": "Namespace", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/appintegrations/application_resource_gen_test.go b/internal/aws/appintegrations/application_resource_gen_test.go new file mode 100644 index 000000000..32e4500e7 --- /dev/null +++ b/internal/aws/appintegrations/application_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package appintegrations_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSAppIntegrationsApplication_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::AppIntegrations::Application", "awscc_appintegrations_application", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/appintegrations/application_singular_data_source_gen.go b/internal/aws/appintegrations/application_singular_data_source_gen.go new file mode 100644 index 000000000..32e510c9b --- /dev/null +++ b/internal/aws/appintegrations/application_singular_data_source_gen.go @@ -0,0 +1,245 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package appintegrations + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_appintegrations_application", applicationDataSource) +} + +// applicationDataSource returns the Terraform awscc_appintegrations_application data source. +// This Terraform data source corresponds to the CloudFormation AWS::AppIntegrations::Application resource. +func applicationDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ApplicationArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the application.", + // "maxLength": 2048, + // "minLength": 1, + // "type": "string" + // } + "application_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the application.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ApplicationSourceConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Application source config", + // "properties": { + // "ExternalUrlConfig": { + // "additionalProperties": false, + // "properties": { + // "AccessUrl": { + // "maxLength": 1000, + // "minLength": 1, + // "pattern": "^\\w+\\:\\/\\/.*$", + // "type": "string" + // }, + // "ApprovedOrigins": { + // "insertionOrder": false, + // "items": { + // "maxLength": 1000, + // "minLength": 1, + // "pattern": "^\\w+\\:\\/\\/.*$", + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array" + // } + // }, + // "required": [ + // "AccessUrl", + // "ApprovedOrigins" + // ], + // "type": "object" + // } + // }, + // "required": [ + // "ExternalUrlConfig" + // ], + // "type": "object" + // } + "application_source_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ExternalUrlConfig + "external_url_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessUrl + "access_url": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ApprovedOrigins + "approved_origins": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Application source config", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Description + // CloudFormation resource type schema: + // + // { + // "description": "The application description.", + // "maxLength": 1000, + // "minLength": 1, + // "type": "string" + // } + "description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The application description.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The id of the application.", + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9/\\._\\-]+$", + // "type": "string" + // } + "application_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The id of the application.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "The name of the application.", + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9/\\._\\-]+$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the application.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Namespace + // CloudFormation resource type schema: + // + // { + // "description": "The namespace of the application.", + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9/\\._\\-]+$", + // "type": "string" + // } + "namespace": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The namespace of the application.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "The tags (keys and values) associated with the application.", + // "items": { + // "additionalProperties": false, + // "description": "A label for tagging Application resources", + // "properties": { + // "Key": { + // "description": "A key to identify the tag.", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // }, + // "Value": { + // "description": "Corresponding tag value for the key.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 200, + // "minItems": 0, + // "type": "array" + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A key to identify the tag.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Corresponding tag value for the key.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The tags (keys and values) associated with the application.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::AppIntegrations::Application", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::AppIntegrations::Application").WithTerraformTypeName("awscc_appintegrations_application") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_url": "AccessUrl", + "application_arn": "ApplicationArn", + "application_id": "Id", + "application_source_config": "ApplicationSourceConfig", + "approved_origins": "ApprovedOrigins", + "description": "Description", + "external_url_config": "ExternalUrlConfig", + "key": "Key", + "name": "Name", + "namespace": "Namespace", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/appintegrations/application_singular_data_source_gen_test.go b/internal/aws/appintegrations/application_singular_data_source_gen_test.go new file mode 100644 index 000000000..df3294c34 --- /dev/null +++ b/internal/aws/appintegrations/application_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package appintegrations_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSAppIntegrationsApplicationDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::AppIntegrations::Application", "awscc_appintegrations_application", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSAppIntegrationsApplicationDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::AppIntegrations::Application", "awscc_appintegrations_application", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/appintegrations/event_integration_resource_gen.go b/internal/aws/appintegrations/event_integration_resource_gen.go index 412a6e81f..ed784be5c 100644 --- a/internal/aws/appintegrations/event_integration_resource_gen.go +++ b/internal/aws/appintegrations/event_integration_resource_gen.go @@ -212,6 +212,7 @@ func eventIntegrationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -230,7 +231,6 @@ func eventIntegrationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppIntegrations::EventIntegration").WithTerraformTypeName("awscc_appintegrations_event_integration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "event_bridge_bus": "EventBridgeBus", diff --git a/internal/aws/applicationautoscaling/scalable_target_plural_data_source_gen.go b/internal/aws/applicationautoscaling/scalable_target_plural_data_source_gen.go new file mode 100644 index 000000000..aea97b405 --- /dev/null +++ b/internal/aws/applicationautoscaling/scalable_target_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package applicationautoscaling + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_applicationautoscaling_scalable_targets", scalableTargetsDataSource) +} + +// scalableTargetsDataSource returns the Terraform awscc_applicationautoscaling_scalable_targets data source. +// This Terraform data source corresponds to the CloudFormation AWS::ApplicationAutoScaling::ScalableTarget resource. +func scalableTargetsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::ApplicationAutoScaling::ScalableTarget", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::ApplicationAutoScaling::ScalableTarget").WithTerraformTypeName("awscc_applicationautoscaling_scalable_targets") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/applicationautoscaling/scalable_target_plural_data_source_gen_test.go b/internal/aws/applicationautoscaling/scalable_target_plural_data_source_gen_test.go new file mode 100644 index 000000000..eded592f7 --- /dev/null +++ b/internal/aws/applicationautoscaling/scalable_target_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package applicationautoscaling_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSApplicationAutoScalingScalableTargetsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApplicationAutoScaling::ScalableTarget", "awscc_applicationautoscaling_scalable_targets", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/applicationautoscaling/scalable_target_resource_gen.go b/internal/aws/applicationautoscaling/scalable_target_resource_gen.go new file mode 100644 index 000000000..74c3f9d7a --- /dev/null +++ b/internal/aws/applicationautoscaling/scalable_target_resource_gen.go @@ -0,0 +1,353 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package applicationautoscaling + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_applicationautoscaling_scalable_target", scalableTargetResource) +} + +// scalableTargetResource returns the Terraform awscc_applicationautoscaling_scalable_target resource. +// This Terraform resource corresponds to the CloudFormation AWS::ApplicationAutoScaling::ScalableTarget resource. +func scalableTargetResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "This value can be returned by using the Ref function. Ref returns the Cloudformation generated ID of the resource in format - ResourceId|ScalableDimension|ServiceNamespace", + // "type": "string" + // } + "scalable_target_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "This value can be returned by using the Ref function. Ref returns the Cloudformation generated ID of the resource in format - ResourceId|ScalableDimension|ServiceNamespace", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MaxCapacity + // CloudFormation resource type schema: + // + // { + // "description": "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", + // "type": "integer" + // } + "max_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "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", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: MinCapacity + // CloudFormation resource type schema: + // + // { + // "description": "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", + // "type": "integer" + // } + "min_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "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", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceId + // CloudFormation resource type schema: + // + // { + // "description": "The identifier of the resource associated with the scalable target", + // "type": "string" + // } + "resource_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The identifier of the resource associated with the scalable target", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleARN + // CloudFormation resource type schema: + // + // { + // "description": "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. ", + // "type": "string" + // } + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "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. ", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // RoleARN is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ScalableDimension + // CloudFormation resource type schema: + // + // { + // "description": "The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property", + // "type": "string" + // } + "scalable_dimension": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ScheduledActions + // CloudFormation resource type schema: + // + // { + // "description": "The scheduled actions for the scalable target. Duplicates aren't allowed.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "specifies a scheduled action for a scalable target", + // "properties": { + // "EndTime": { + // "type": "string" + // }, + // "ScalableTargetAction": { + // "additionalProperties": false, + // "description": "specifies the minimum and maximum capacity", + // "properties": { + // "MaxCapacity": { + // "type": "integer" + // }, + // "MinCapacity": { + // "type": "integer" + // } + // }, + // "type": "object" + // }, + // "Schedule": { + // "type": "string" + // }, + // "ScheduledActionName": { + // "type": "string" + // }, + // "StartTime": { + // "type": "string" + // }, + // "Timezone": { + // "type": "string" + // } + // }, + // "required": [ + // "ScheduledActionName", + // "Schedule" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "scheduled_actions": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EndTime + "end_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ScalableTargetAction + "scalable_target_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: MaxCapacity + "max_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MinCapacity + "min_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "specifies the minimum and maximum capacity", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Schedule + "schedule": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: ScheduledActionName + "scheduled_action_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: StartTime + "start_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Timezone + "timezone": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The scheduled actions for the scalable target. Duplicates aren't allowed.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNamespace + // CloudFormation resource type schema: + // + // { + // "description": "The namespace of the AWS service that provides the resource, or a custom-resource", + // "type": "string" + // } + "service_namespace": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The namespace of the AWS service that provides the resource, or a custom-resource", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SuspendedState + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "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.", + // "properties": { + // "DynamicScalingInSuspended": { + // "type": "boolean" + // }, + // "DynamicScalingOutSuspended": { + // "type": "boolean" + // }, + // "ScheduledScalingSuspended": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "suspended_state": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DynamicScalingInSuspended + "dynamic_scaling_in_suspended": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DynamicScalingOutSuspended + "dynamic_scaling_out_suspended": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ScheduledScalingSuspended + "scheduled_scaling_suspended": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "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.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::ApplicationAutoScaling::ScalableTarget", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::ApplicationAutoScaling::ScalableTarget").WithTerraformTypeName("awscc_applicationautoscaling_scalable_target") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "dynamic_scaling_in_suspended": "DynamicScalingInSuspended", + "dynamic_scaling_out_suspended": "DynamicScalingOutSuspended", + "end_time": "EndTime", + "max_capacity": "MaxCapacity", + "min_capacity": "MinCapacity", + "resource_id": "ResourceId", + "role_arn": "RoleARN", + "scalable_dimension": "ScalableDimension", + "scalable_target_action": "ScalableTargetAction", + "scalable_target_id": "Id", + "schedule": "Schedule", + "scheduled_action_name": "ScheduledActionName", + "scheduled_actions": "ScheduledActions", + "scheduled_scaling_suspended": "ScheduledScalingSuspended", + "service_namespace": "ServiceNamespace", + "start_time": "StartTime", + "suspended_state": "SuspendedState", + "timezone": "Timezone", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/RoleARN", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/applicationautoscaling/scalable_target_resource_gen_test.go b/internal/aws/applicationautoscaling/scalable_target_resource_gen_test.go new file mode 100644 index 000000000..0a30baf4c --- /dev/null +++ b/internal/aws/applicationautoscaling/scalable_target_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package applicationautoscaling_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSApplicationAutoScalingScalableTarget_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApplicationAutoScaling::ScalableTarget", "awscc_applicationautoscaling_scalable_target", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/applicationautoscaling/scalable_target_singular_data_source_gen.go b/internal/aws/applicationautoscaling/scalable_target_singular_data_source_gen.go new file mode 100644 index 000000000..3eeca4e00 --- /dev/null +++ b/internal/aws/applicationautoscaling/scalable_target_singular_data_source_gen.go @@ -0,0 +1,274 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package applicationautoscaling + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_applicationautoscaling_scalable_target", scalableTargetDataSource) +} + +// scalableTargetDataSource returns the Terraform awscc_applicationautoscaling_scalable_target data source. +// This Terraform data source corresponds to the CloudFormation AWS::ApplicationAutoScaling::ScalableTarget resource. +func scalableTargetDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "This value can be returned by using the Ref function. Ref returns the Cloudformation generated ID of the resource in format - ResourceId|ScalableDimension|ServiceNamespace", + // "type": "string" + // } + "scalable_target_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "This value can be returned by using the Ref function. Ref returns the Cloudformation generated ID of the resource in format - ResourceId|ScalableDimension|ServiceNamespace", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MaxCapacity + // CloudFormation resource type schema: + // + // { + // "description": "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", + // "type": "integer" + // } + "max_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "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", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MinCapacity + // CloudFormation resource type schema: + // + // { + // "description": "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", + // "type": "integer" + // } + "min_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "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", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceId + // CloudFormation resource type schema: + // + // { + // "description": "The identifier of the resource associated with the scalable target", + // "type": "string" + // } + "resource_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The identifier of the resource associated with the scalable target", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleARN + // CloudFormation resource type schema: + // + // { + // "description": "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. ", + // "type": "string" + // } + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "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. ", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ScalableDimension + // CloudFormation resource type schema: + // + // { + // "description": "The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property", + // "type": "string" + // } + "scalable_dimension": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ScheduledActions + // CloudFormation resource type schema: + // + // { + // "description": "The scheduled actions for the scalable target. Duplicates aren't allowed.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "specifies a scheduled action for a scalable target", + // "properties": { + // "EndTime": { + // "type": "string" + // }, + // "ScalableTargetAction": { + // "additionalProperties": false, + // "description": "specifies the minimum and maximum capacity", + // "properties": { + // "MaxCapacity": { + // "type": "integer" + // }, + // "MinCapacity": { + // "type": "integer" + // } + // }, + // "type": "object" + // }, + // "Schedule": { + // "type": "string" + // }, + // "ScheduledActionName": { + // "type": "string" + // }, + // "StartTime": { + // "type": "string" + // }, + // "Timezone": { + // "type": "string" + // } + // }, + // "required": [ + // "ScheduledActionName", + // "Schedule" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "scheduled_actions": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EndTime + "end_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ScalableTargetAction + "scalable_target_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: MaxCapacity + "max_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MinCapacity + "min_capacity": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "specifies the minimum and maximum capacity", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Schedule + "schedule": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ScheduledActionName + "scheduled_action_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: StartTime + "start_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Timezone + "timezone": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The scheduled actions for the scalable target. Duplicates aren't allowed.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNamespace + // CloudFormation resource type schema: + // + // { + // "description": "The namespace of the AWS service that provides the resource, or a custom-resource", + // "type": "string" + // } + "service_namespace": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The namespace of the AWS service that provides the resource, or a custom-resource", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SuspendedState + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "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.", + // "properties": { + // "DynamicScalingInSuspended": { + // "type": "boolean" + // }, + // "DynamicScalingOutSuspended": { + // "type": "boolean" + // }, + // "ScheduledScalingSuspended": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "suspended_state": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DynamicScalingInSuspended + "dynamic_scaling_in_suspended": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DynamicScalingOutSuspended + "dynamic_scaling_out_suspended": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ScheduledScalingSuspended + "scheduled_scaling_suspended": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "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.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::ApplicationAutoScaling::ScalableTarget", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::ApplicationAutoScaling::ScalableTarget").WithTerraformTypeName("awscc_applicationautoscaling_scalable_target") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "dynamic_scaling_in_suspended": "DynamicScalingInSuspended", + "dynamic_scaling_out_suspended": "DynamicScalingOutSuspended", + "end_time": "EndTime", + "max_capacity": "MaxCapacity", + "min_capacity": "MinCapacity", + "resource_id": "ResourceId", + "role_arn": "RoleARN", + "scalable_dimension": "ScalableDimension", + "scalable_target_action": "ScalableTargetAction", + "scalable_target_id": "Id", + "schedule": "Schedule", + "scheduled_action_name": "ScheduledActionName", + "scheduled_actions": "ScheduledActions", + "scheduled_scaling_suspended": "ScheduledScalingSuspended", + "service_namespace": "ServiceNamespace", + "start_time": "StartTime", + "suspended_state": "SuspendedState", + "timezone": "Timezone", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/applicationautoscaling/scalable_target_singular_data_source_gen_test.go b/internal/aws/applicationautoscaling/scalable_target_singular_data_source_gen_test.go new file mode 100644 index 000000000..9a577569c --- /dev/null +++ b/internal/aws/applicationautoscaling/scalable_target_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package applicationautoscaling_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSApplicationAutoScalingScalableTargetDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApplicationAutoScaling::ScalableTarget", "awscc_applicationautoscaling_scalable_target", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSApplicationAutoScalingScalableTargetDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::ApplicationAutoScaling::ScalableTarget", "awscc_applicationautoscaling_scalable_target", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/applicationautoscaling/scaling_policy_resource_gen.go b/internal/aws/applicationautoscaling/scaling_policy_resource_gen.go index 0ac516610..8c83a6b6b 100644 --- a/internal/aws/applicationautoscaling/scaling_policy_resource_gen.go +++ b/internal/aws/applicationautoscaling/scaling_policy_resource_gen.go @@ -726,6 +726,7 @@ func scalingPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -744,7 +745,6 @@ func scalingPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApplicationAutoScaling::ScalingPolicy").WithTerraformTypeName("awscc_applicationautoscaling_scaling_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "adjustment_type": "AdjustmentType", "arn": "Arn", diff --git a/internal/aws/applicationinsights/application_resource_gen.go b/internal/aws/applicationinsights/application_resource_gen.go index 9eece1280..55e14dcde 100644 --- a/internal/aws/applicationinsights/application_resource_gen.go +++ b/internal/aws/applicationinsights/application_resource_gen.go @@ -2865,6 +2865,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -2883,7 +2884,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ApplicationInsights::Application").WithTerraformTypeName("awscc_applicationinsights_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agree_to_install_hanadb_client": "AgreeToInstallHANADBClient", "alarm_metric_name": "AlarmMetricName", diff --git a/internal/aws/apprunner/auto_scaling_configuration_resource_gen.go b/internal/aws/apprunner/auto_scaling_configuration_resource_gen.go index c14c9ea39..9d3069398 100644 --- a/internal/aws/apprunner/auto_scaling_configuration_resource_gen.go +++ b/internal/aws/apprunner/auto_scaling_configuration_resource_gen.go @@ -199,6 +199,7 @@ func autoScalingConfigurationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -217,7 +218,6 @@ func autoScalingConfigurationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::AppRunner::AutoScalingConfiguration").WithTerraformTypeName("awscc_apprunner_auto_scaling_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_configuration_arn": "AutoScalingConfigurationArn", "auto_scaling_configuration_name": "AutoScalingConfigurationName", diff --git a/internal/aws/apprunner/observability_configuration_resource_gen.go b/internal/aws/apprunner/observability_configuration_resource_gen.go index 4bac3411f..abe128d19 100644 --- a/internal/aws/apprunner/observability_configuration_resource_gen.go +++ b/internal/aws/apprunner/observability_configuration_resource_gen.go @@ -191,6 +191,7 @@ func observabilityConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -209,7 +210,6 @@ func observabilityConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::AppRunner::ObservabilityConfiguration").WithTerraformTypeName("awscc_apprunner_observability_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "latest": "Latest", diff --git a/internal/aws/apprunner/service_resource_gen.go b/internal/aws/apprunner/service_resource_gen.go index 5088c6d63..60fe45a82 100644 --- a/internal/aws/apprunner/service_resource_gen.go +++ b/internal/aws/apprunner/service_resource_gen.go @@ -1210,6 +1210,7 @@ func serviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1228,7 +1229,6 @@ func serviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppRunner::Service").WithTerraformTypeName("awscc_apprunner_service") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_role_arn": "AccessRoleArn", "authentication_configuration": "AuthenticationConfiguration", diff --git a/internal/aws/apprunner/vpc_connector_resource_gen.go b/internal/aws/apprunner/vpc_connector_resource_gen.go index 9f2f18479..d78cc486a 100644 --- a/internal/aws/apprunner/vpc_connector_resource_gen.go +++ b/internal/aws/apprunner/vpc_connector_resource_gen.go @@ -183,6 +183,7 @@ func vpcConnectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -201,7 +202,6 @@ func vpcConnectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppRunner::VpcConnector").WithTerraformTypeName("awscc_apprunner_vpc_connector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "security_groups": "SecurityGroups", diff --git a/internal/aws/apprunner/vpc_ingress_connection_resource_gen.go b/internal/aws/apprunner/vpc_ingress_connection_resource_gen.go index 8fe6da9bd..210ed8b26 100644 --- a/internal/aws/apprunner/vpc_ingress_connection_resource_gen.go +++ b/internal/aws/apprunner/vpc_ingress_connection_resource_gen.go @@ -216,6 +216,7 @@ func vpcIngressConnectionResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -234,7 +235,6 @@ func vpcIngressConnectionResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::AppRunner::VpcIngressConnection").WithTerraformTypeName("awscc_apprunner_vpc_ingress_connection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "domain_name": "DomainName", "ingress_vpc_configuration": "IngressVpcConfiguration", diff --git a/internal/aws/appstream/app_block_builder_resource_gen.go b/internal/aws/appstream/app_block_builder_resource_gen.go index 91b33d5a4..c209feb3d 100644 --- a/internal/aws/appstream/app_block_builder_resource_gen.go +++ b/internal/aws/appstream/app_block_builder_resource_gen.go @@ -293,6 +293,7 @@ func appBlockBuilderResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -311,7 +312,6 @@ func appBlockBuilderResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppStream::AppBlockBuilder").WithTerraformTypeName("awscc_appstream_app_block_builder") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_endpoints": "AccessEndpoints", "app_block_arns": "AppBlockArns", diff --git a/internal/aws/appstream/app_block_resource_gen.go b/internal/aws/appstream/app_block_resource_gen.go index d14bb6610..553e6f570 100644 --- a/internal/aws/appstream/app_block_resource_gen.go +++ b/internal/aws/appstream/app_block_resource_gen.go @@ -377,6 +377,7 @@ func appBlockResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -395,7 +396,6 @@ func appBlockResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppStream::AppBlock").WithTerraformTypeName("awscc_appstream_app_block") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/appstream/application_entitlement_association_resource_gen.go b/internal/aws/appstream/application_entitlement_association_resource_gen.go index 248a6252c..2e8e12c2d 100644 --- a/internal/aws/appstream/application_entitlement_association_resource_gen.go +++ b/internal/aws/appstream/application_entitlement_association_resource_gen.go @@ -62,6 +62,7 @@ func applicationEntitlementAssociationResource(ctx context.Context) (resource.Re }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -80,7 +81,6 @@ func applicationEntitlementAssociationResource(ctx context.Context) (resource.Re opts = opts.WithCloudFormationTypeName("AWS::AppStream::ApplicationEntitlementAssociation").WithTerraformTypeName("awscc_appstream_application_entitlement_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_identifier": "ApplicationIdentifier", "entitlement_name": "EntitlementName", diff --git a/internal/aws/appstream/application_fleet_association_resource_gen.go b/internal/aws/appstream/application_fleet_association_resource_gen.go index 773a5fcc4..6a22ee0be 100644 --- a/internal/aws/appstream/application_fleet_association_resource_gen.go +++ b/internal/aws/appstream/application_fleet_association_resource_gen.go @@ -50,6 +50,7 @@ func applicationFleetAssociationResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -68,7 +69,6 @@ func applicationFleetAssociationResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::AppStream::ApplicationFleetAssociation").WithTerraformTypeName("awscc_appstream_application_fleet_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_arn": "ApplicationArn", "fleet_name": "FleetName", diff --git a/internal/aws/appstream/application_resource_gen.go b/internal/aws/appstream/application_resource_gen.go index 873b69318..c102d5794 100644 --- a/internal/aws/appstream/application_resource_gen.go +++ b/internal/aws/appstream/application_resource_gen.go @@ -291,6 +291,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -309,7 +310,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppStream::Application").WithTerraformTypeName("awscc_appstream_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_block_arn": "AppBlockArn", "arn": "Arn", diff --git a/internal/aws/appstream/directory_config_resource_gen.go b/internal/aws/appstream/directory_config_resource_gen.go index 1f080b5c0..50ac3f759 100644 --- a/internal/aws/appstream/directory_config_resource_gen.go +++ b/internal/aws/appstream/directory_config_resource_gen.go @@ -127,6 +127,7 @@ func directoryConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -145,7 +146,6 @@ func directoryConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppStream::DirectoryConfig").WithTerraformTypeName("awscc_appstream_directory_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_name": "AccountName", "account_password": "AccountPassword", diff --git a/internal/aws/appstream/entitlement_resource_gen.go b/internal/aws/appstream/entitlement_resource_gen.go index edd4f98f5..4bc65db3a 100644 --- a/internal/aws/appstream/entitlement_resource_gen.go +++ b/internal/aws/appstream/entitlement_resource_gen.go @@ -135,6 +135,7 @@ func entitlementResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -153,7 +154,6 @@ func entitlementResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppStream::Entitlement").WithTerraformTypeName("awscc_appstream_entitlement") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_visibility": "AppVisibility", "attributes": "Attributes", diff --git a/internal/aws/appstream/image_builder_resource_gen.go b/internal/aws/appstream/image_builder_resource_gen.go index 7f08b8e07..d9e95febb 100644 --- a/internal/aws/appstream/image_builder_resource_gen.go +++ b/internal/aws/appstream/image_builder_resource_gen.go @@ -325,6 +325,7 @@ func imageBuilderResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -343,7 +344,6 @@ func imageBuilderResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppStream::ImageBuilder").WithTerraformTypeName("awscc_appstream_image_builder") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_endpoints": "AccessEndpoints", "appstream_agent_version": "AppstreamAgentVersion", diff --git a/internal/aws/appsync/domain_name_api_association_resource_gen.go b/internal/aws/appsync/domain_name_api_association_resource_gen.go index 688e53980..41880d4c2 100644 --- a/internal/aws/appsync/domain_name_api_association_resource_gen.go +++ b/internal/aws/appsync/domain_name_api_association_resource_gen.go @@ -69,6 +69,7 @@ func domainNameApiAssociationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -87,7 +88,6 @@ func domainNameApiAssociationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::AppSync::DomainNameApiAssociation").WithTerraformTypeName("awscc_appsync_domain_name_api_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_association_identifier": "ApiAssociationIdentifier", "api_id": "ApiId", diff --git a/internal/aws/appsync/domain_name_resource_gen.go b/internal/aws/appsync/domain_name_resource_gen.go index 93b9a11e0..7a0d0cdc8 100644 --- a/internal/aws/appsync/domain_name_resource_gen.go +++ b/internal/aws/appsync/domain_name_resource_gen.go @@ -109,6 +109,7 @@ func domainNameResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -127,7 +128,6 @@ func domainNameResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppSync::DomainName").WithTerraformTypeName("awscc_appsync_domain_name") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_sync_domain_name": "AppSyncDomainName", "certificate_arn": "CertificateArn", diff --git a/internal/aws/appsync/function_configuration_resource_gen.go b/internal/aws/appsync/function_configuration_resource_gen.go index 1cd134081..93914cc0d 100644 --- a/internal/aws/appsync/function_configuration_resource_gen.go +++ b/internal/aws/appsync/function_configuration_resource_gen.go @@ -348,6 +348,7 @@ func functionConfigurationResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -366,7 +367,6 @@ func functionConfigurationResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::AppSync::FunctionConfiguration").WithTerraformTypeName("awscc_appsync_function_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "code": "Code", diff --git a/internal/aws/appsync/resolver_resource_gen.go b/internal/aws/appsync/resolver_resource_gen.go index 54c0465c0..479b83777 100644 --- a/internal/aws/appsync/resolver_resource_gen.go +++ b/internal/aws/appsync/resolver_resource_gen.go @@ -461,6 +461,7 @@ func resolverResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -479,7 +480,6 @@ func resolverResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AppSync::Resolver").WithTerraformTypeName("awscc_appsync_resolver") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_id": "ApiId", "caching_config": "CachingConfig", diff --git a/internal/aws/appsync/source_api_association_resource_gen.go b/internal/aws/appsync/source_api_association_resource_gen.go index 72c94709f..0126f5fee 100644 --- a/internal/aws/appsync/source_api_association_resource_gen.go +++ b/internal/aws/appsync/source_api_association_resource_gen.go @@ -261,6 +261,7 @@ func sourceApiAssociationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -279,7 +280,6 @@ func sourceApiAssociationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::AppSync::SourceApiAssociation").WithTerraformTypeName("awscc_appsync_source_api_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_arn": "AssociationArn", "association_id": "AssociationId", diff --git a/internal/aws/aps/rule_groups_namespace_resource_gen.go b/internal/aws/aps/rule_groups_namespace_resource_gen.go index 965137d73..7fa7aeb92 100644 --- a/internal/aws/aps/rule_groups_namespace_resource_gen.go +++ b/internal/aws/aps/rule_groups_namespace_resource_gen.go @@ -153,6 +153,7 @@ func ruleGroupsNamespaceResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -171,7 +172,6 @@ func ruleGroupsNamespaceResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::APS::RuleGroupsNamespace").WithTerraformTypeName("awscc_aps_rule_groups_namespace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "data": "Data", diff --git a/internal/aws/aps/workspace_resource_gen.go b/internal/aws/aps/workspace_resource_gen.go index 570860c92..1f8ed7b6e 100644 --- a/internal/aws/aps/workspace_resource_gen.go +++ b/internal/aws/aps/workspace_resource_gen.go @@ -235,6 +235,7 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -253,7 +254,6 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::APS::Workspace").WithTerraformTypeName("awscc_aps_workspace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alert_manager_definition": "AlertManagerDefinition", "alias": "Alias", diff --git a/internal/aws/arczonalshift/zonal_autoshift_configuration_resource_gen.go b/internal/aws/arczonalshift/zonal_autoshift_configuration_resource_gen.go index 004bf899b..23f073203 100644 --- a/internal/aws/arczonalshift/zonal_autoshift_configuration_resource_gen.go +++ b/internal/aws/arczonalshift/zonal_autoshift_configuration_resource_gen.go @@ -274,6 +274,7 @@ func zonalAutoshiftConfigurationResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -292,7 +293,6 @@ func zonalAutoshiftConfigurationResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::ARCZonalShift::ZonalAutoshiftConfiguration").WithTerraformTypeName("awscc_arczonalshift_zonal_autoshift_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarm_identifier": "AlarmIdentifier", "blocked_dates": "BlockedDates", diff --git a/internal/aws/athena/capacity_reservation_resource_gen.go b/internal/aws/athena/capacity_reservation_resource_gen.go index 422622b88..dac8c8f0b 100644 --- a/internal/aws/athena/capacity_reservation_resource_gen.go +++ b/internal/aws/athena/capacity_reservation_resource_gen.go @@ -274,6 +274,7 @@ func capacityReservationResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -292,7 +293,6 @@ func capacityReservationResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Athena::CapacityReservation").WithTerraformTypeName("awscc_athena_capacity_reservation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allocated_dpus": "AllocatedDpus", "arn": "Arn", diff --git a/internal/aws/athena/data_catalog_resource_gen.go b/internal/aws/athena/data_catalog_resource_gen.go index f3ee1be7d..5f1c5064f 100644 --- a/internal/aws/athena/data_catalog_resource_gen.go +++ b/internal/aws/athena/data_catalog_resource_gen.go @@ -172,6 +172,7 @@ func dataCatalogResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -190,7 +191,6 @@ func dataCatalogResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Athena::DataCatalog").WithTerraformTypeName("awscc_athena_data_catalog") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "key": "Key", diff --git a/internal/aws/athena/named_query_resource_gen.go b/internal/aws/athena/named_query_resource_gen.go index 9c5026b39..f79afa2cd 100644 --- a/internal/aws/athena/named_query_resource_gen.go +++ b/internal/aws/athena/named_query_resource_gen.go @@ -143,6 +143,7 @@ func namedQueryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -161,7 +162,6 @@ func namedQueryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Athena::NamedQuery").WithTerraformTypeName("awscc_athena_named_query") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "database": "Database", "description": "Description", diff --git a/internal/aws/athena/prepared_statement_resource_gen.go b/internal/aws/athena/prepared_statement_resource_gen.go index 8d7f89dd0..a7bb600a9 100644 --- a/internal/aws/athena/prepared_statement_resource_gen.go +++ b/internal/aws/athena/prepared_statement_resource_gen.go @@ -102,6 +102,7 @@ func preparedStatementResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -120,7 +121,6 @@ func preparedStatementResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Athena::PreparedStatement").WithTerraformTypeName("awscc_athena_prepared_statement") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "query_statement": "QueryStatement", diff --git a/internal/aws/athena/work_group_resource_gen.go b/internal/aws/athena/work_group_resource_gen.go index f0efce79e..3d90a220c 100644 --- a/internal/aws/athena/work_group_resource_gen.go +++ b/internal/aws/athena/work_group_resource_gen.go @@ -878,6 +878,7 @@ func workGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -896,7 +897,6 @@ func workGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Athena::WorkGroup").WithTerraformTypeName("awscc_athena_work_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acl_configuration": "AclConfiguration", "additional_configuration": "AdditionalConfiguration", diff --git a/internal/aws/auditmanager/assessment_resource_gen.go b/internal/aws/auditmanager/assessment_resource_gen.go index 9cf763447..122761003 100644 --- a/internal/aws/auditmanager/assessment_resource_gen.go +++ b/internal/aws/auditmanager/assessment_resource_gen.go @@ -801,6 +801,7 @@ func assessmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -819,7 +820,6 @@ func assessmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AuditManager::Assessment").WithTerraformTypeName("awscc_auditmanager_assessment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "assessment_id": "AssessmentId", diff --git a/internal/aws/autoscaling/auto_scaling_group_resource_gen.go b/internal/aws/autoscaling/auto_scaling_group_resource_gen.go index f95caaea1..6a10bdfd6 100644 --- a/internal/aws/autoscaling/auto_scaling_group_resource_gen.go +++ b/internal/aws/autoscaling/auto_scaling_group_resource_gen.go @@ -1819,6 +1819,7 @@ func autoScalingGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1837,7 +1838,6 @@ func autoScalingGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::AutoScalingGroup").WithTerraformTypeName("awscc_autoscaling_auto_scaling_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_count": "AcceleratorCount", "accelerator_manufacturers": "AcceleratorManufacturers", diff --git a/internal/aws/autoscaling/launch_configuration_resource_gen.go b/internal/aws/autoscaling/launch_configuration_resource_gen.go index ae16b41fe..951d2e78e 100644 --- a/internal/aws/autoscaling/launch_configuration_resource_gen.go +++ b/internal/aws/autoscaling/launch_configuration_resource_gen.go @@ -560,6 +560,7 @@ func launchConfigurationResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -578,7 +579,6 @@ func launchConfigurationResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::LaunchConfiguration").WithTerraformTypeName("awscc_autoscaling_launch_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "associate_public_ip_address": "AssociatePublicIpAddress", "block_device_mappings": "BlockDeviceMappings", diff --git a/internal/aws/autoscaling/lifecycle_hook_resource_gen.go b/internal/aws/autoscaling/lifecycle_hook_resource_gen.go index 087f728f9..85ec038c7 100644 --- a/internal/aws/autoscaling/lifecycle_hook_resource_gen.go +++ b/internal/aws/autoscaling/lifecycle_hook_resource_gen.go @@ -155,6 +155,7 @@ func lifecycleHookResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -173,7 +174,6 @@ func lifecycleHookResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::LifecycleHook").WithTerraformTypeName("awscc_autoscaling_lifecycle_hook") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_group_name": "AutoScalingGroupName", "default_result": "DefaultResult", diff --git a/internal/aws/autoscaling/scaling_policy_resource_gen.go b/internal/aws/autoscaling/scaling_policy_resource_gen.go index 5d671b5b2..9b08a9d8f 100644 --- a/internal/aws/autoscaling/scaling_policy_resource_gen.go +++ b/internal/aws/autoscaling/scaling_policy_resource_gen.go @@ -1185,6 +1185,7 @@ func scalingPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1203,7 +1204,6 @@ func scalingPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::ScalingPolicy").WithTerraformTypeName("awscc_autoscaling_scaling_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "adjustment_type": "AdjustmentType", "arn": "Arn", diff --git a/internal/aws/autoscaling/scheduled_action_resource_gen.go b/internal/aws/autoscaling/scheduled_action_resource_gen.go index 038a6d48f..95360d993 100644 --- a/internal/aws/autoscaling/scheduled_action_resource_gen.go +++ b/internal/aws/autoscaling/scheduled_action_resource_gen.go @@ -160,6 +160,7 @@ func scheduledActionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -178,7 +179,6 @@ func scheduledActionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::ScheduledAction").WithTerraformTypeName("awscc_autoscaling_scheduled_action") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_group_name": "AutoScalingGroupName", "desired_capacity": "DesiredCapacity", diff --git a/internal/aws/autoscaling/warm_pool_resource_gen.go b/internal/aws/autoscaling/warm_pool_resource_gen.go index ec83d8afd..de43dab65 100644 --- a/internal/aws/autoscaling/warm_pool_resource_gen.go +++ b/internal/aws/autoscaling/warm_pool_resource_gen.go @@ -109,6 +109,7 @@ func warmPoolResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -127,7 +128,6 @@ func warmPoolResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::AutoScaling::WarmPool").WithTerraformTypeName("awscc_autoscaling_warm_pool") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_group_name": "AutoScalingGroupName", "instance_reuse_policy": "InstanceReusePolicy", diff --git a/internal/aws/b2bi/capability_resource_gen.go b/internal/aws/b2bi/capability_resource_gen.go index 9b8d75183..422a36e59 100644 --- a/internal/aws/b2bi/capability_resource_gen.go +++ b/internal/aws/b2bi/capability_resource_gen.go @@ -494,6 +494,7 @@ func capabilityResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -512,7 +513,6 @@ func capabilityResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::B2BI::Capability").WithTerraformTypeName("awscc_b2bi_capability") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket_name": "BucketName", "capability_arn": "CapabilityArn", diff --git a/internal/aws/b2bi/partnership_resource_gen.go b/internal/aws/b2bi/partnership_resource_gen.go index 6db7b3987..a44a0d94a 100644 --- a/internal/aws/b2bi/partnership_resource_gen.go +++ b/internal/aws/b2bi/partnership_resource_gen.go @@ -260,6 +260,7 @@ func partnershipResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -278,7 +279,6 @@ func partnershipResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::B2BI::Partnership").WithTerraformTypeName("awscc_b2bi_partnership") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "capabilities": "Capabilities", "created_at": "CreatedAt", diff --git a/internal/aws/b2bi/profile_resource_gen.go b/internal/aws/b2bi/profile_resource_gen.go index 1b9534ad0..2a7fd3445 100644 --- a/internal/aws/b2bi/profile_resource_gen.go +++ b/internal/aws/b2bi/profile_resource_gen.go @@ -245,6 +245,7 @@ func profileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -263,7 +264,6 @@ func profileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::B2BI::Profile").WithTerraformTypeName("awscc_b2bi_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "business_name": "BusinessName", "created_at": "CreatedAt", diff --git a/internal/aws/b2bi/transformer_resource_gen.go b/internal/aws/b2bi/transformer_resource_gen.go index e7b47fa94..cee09bcf6 100644 --- a/internal/aws/b2bi/transformer_resource_gen.go +++ b/internal/aws/b2bi/transformer_resource_gen.go @@ -348,6 +348,7 @@ func transformerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -366,7 +367,6 @@ func transformerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::B2BI::Transformer").WithTerraformTypeName("awscc_b2bi_transformer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "edi_type": "EdiType", diff --git a/internal/aws/backup/backup_plan_resource_gen.go b/internal/aws/backup/backup_plan_resource_gen.go index a0373dcee..deb2e2169 100644 --- a/internal/aws/backup/backup_plan_resource_gen.go +++ b/internal/aws/backup/backup_plan_resource_gen.go @@ -399,6 +399,7 @@ func backupPlanResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -417,7 +418,6 @@ func backupPlanResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Backup::BackupPlan").WithTerraformTypeName("awscc_backup_backup_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "advanced_backup_settings": "AdvancedBackupSettings", "backup_options": "BackupOptions", diff --git a/internal/aws/backup/backup_selection_resource_gen.go b/internal/aws/backup/backup_selection_resource_gen.go index 2229fa89f..84da0746c 100644 --- a/internal/aws/backup/backup_selection_resource_gen.go +++ b/internal/aws/backup/backup_selection_resource_gen.go @@ -366,7 +366,7 @@ func backupSelectionResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "backup_selection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -386,6 +386,15 @@ func backupSelectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::Backup::BackupSelection", Version: 1, @@ -396,25 +405,24 @@ func backupSelectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Backup::BackupSelection").WithTerraformTypeName("awscc_backup_backup_selection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "backup_plan_id": "BackupPlanId", - "backup_selection": "BackupSelection", - "condition_key": "ConditionKey", - "condition_type": "ConditionType", - "condition_value": "ConditionValue", - "conditions": "Conditions", - "iam_role_arn": "IamRoleArn", - "id": "Id", - "list_of_tags": "ListOfTags", - "not_resources": "NotResources", - "resources": "Resources", - "selection_id": "SelectionId", - "selection_name": "SelectionName", - "string_equals": "StringEquals", - "string_like": "StringLike", - "string_not_equals": "StringNotEquals", - "string_not_like": "StringNotLike", + "backup_plan_id": "BackupPlanId", + "backup_selection": "BackupSelection", + "backup_selection_id": "Id", + "condition_key": "ConditionKey", + "condition_type": "ConditionType", + "condition_value": "ConditionValue", + "conditions": "Conditions", + "iam_role_arn": "IamRoleArn", + "list_of_tags": "ListOfTags", + "not_resources": "NotResources", + "resources": "Resources", + "selection_id": "SelectionId", + "selection_name": "SelectionName", + "string_equals": "StringEquals", + "string_like": "StringLike", + "string_not_equals": "StringNotEquals", + "string_not_like": "StringNotLike", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/backup/backup_selection_singular_data_source_gen.go b/internal/aws/backup/backup_selection_singular_data_source_gen.go index e79893909..6b13c8f5b 100644 --- a/internal/aws/backup/backup_selection_singular_data_source_gen.go +++ b/internal/aws/backup/backup_selection_singular_data_source_gen.go @@ -285,7 +285,7 @@ func backupSelectionDataSource(ctx context.Context) (datasource.DataSource, erro // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "backup_selection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: SelectionId @@ -314,23 +314,23 @@ func backupSelectionDataSource(ctx context.Context) (datasource.DataSource, erro opts = opts.WithCloudFormationTypeName("AWS::Backup::BackupSelection").WithTerraformTypeName("awscc_backup_backup_selection") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "backup_plan_id": "BackupPlanId", - "backup_selection": "BackupSelection", - "condition_key": "ConditionKey", - "condition_type": "ConditionType", - "condition_value": "ConditionValue", - "conditions": "Conditions", - "iam_role_arn": "IamRoleArn", - "id": "Id", - "list_of_tags": "ListOfTags", - "not_resources": "NotResources", - "resources": "Resources", - "selection_id": "SelectionId", - "selection_name": "SelectionName", - "string_equals": "StringEquals", - "string_like": "StringLike", - "string_not_equals": "StringNotEquals", - "string_not_like": "StringNotLike", + "backup_plan_id": "BackupPlanId", + "backup_selection": "BackupSelection", + "backup_selection_id": "Id", + "condition_key": "ConditionKey", + "condition_type": "ConditionType", + "condition_value": "ConditionValue", + "conditions": "Conditions", + "iam_role_arn": "IamRoleArn", + "list_of_tags": "ListOfTags", + "not_resources": "NotResources", + "resources": "Resources", + "selection_id": "SelectionId", + "selection_name": "SelectionName", + "string_equals": "StringEquals", + "string_like": "StringLike", + "string_not_equals": "StringNotEquals", + "string_not_like": "StringNotLike", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/backup/backup_vault_resource_gen.go b/internal/aws/backup/backup_vault_resource_gen.go index d556b8d6e..acb25a01b 100644 --- a/internal/aws/backup/backup_vault_resource_gen.go +++ b/internal/aws/backup/backup_vault_resource_gen.go @@ -205,6 +205,7 @@ func backupVaultResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -223,7 +224,6 @@ func backupVaultResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Backup::BackupVault").WithTerraformTypeName("awscc_backup_backup_vault") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_policy": "AccessPolicy", "backup_vault_arn": "BackupVaultArn", diff --git a/internal/aws/backup/framework_resource_gen.go b/internal/aws/backup/framework_resource_gen.go index 2c06e095d..10f175985 100644 --- a/internal/aws/backup/framework_resource_gen.go +++ b/internal/aws/backup/framework_resource_gen.go @@ -392,6 +392,7 @@ func frameworkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -410,7 +411,6 @@ func frameworkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Backup::Framework").WithTerraformTypeName("awscc_backup_framework") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "compliance_resource_ids": "ComplianceResourceIds", "compliance_resource_types": "ComplianceResourceTypes", diff --git a/internal/aws/backup/report_plan_resource_gen.go b/internal/aws/backup/report_plan_resource_gen.go index c48fb5dd8..19a28b73f 100644 --- a/internal/aws/backup/report_plan_resource_gen.go +++ b/internal/aws/backup/report_plan_resource_gen.go @@ -319,6 +319,7 @@ func reportPlanResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -337,7 +338,6 @@ func reportPlanResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Backup::ReportPlan").WithTerraformTypeName("awscc_backup_report_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accounts": "Accounts", "formats": "Formats", diff --git a/internal/aws/backup/restore_testing_plan_resource_gen.go b/internal/aws/backup/restore_testing_plan_resource_gen.go index fbf2b2389..7fb8070f1 100644 --- a/internal/aws/backup/restore_testing_plan_resource_gen.go +++ b/internal/aws/backup/restore_testing_plan_resource_gen.go @@ -255,6 +255,7 @@ func restoreTestingPlanResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -273,7 +274,6 @@ func restoreTestingPlanResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Backup::RestoreTestingPlan").WithTerraformTypeName("awscc_backup_restore_testing_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm": "Algorithm", "exclude_vaults": "ExcludeVaults", diff --git a/internal/aws/backup/restore_testing_selection_resource_gen.go b/internal/aws/backup/restore_testing_selection_resource_gen.go index 051315dc5..4ef2358da 100644 --- a/internal/aws/backup/restore_testing_selection_resource_gen.go +++ b/internal/aws/backup/restore_testing_selection_resource_gen.go @@ -229,6 +229,7 @@ func restoreTestingSelectionResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -247,7 +248,6 @@ func restoreTestingSelectionResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::Backup::RestoreTestingSelection").WithTerraformTypeName("awscc_backup_restore_testing_selection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "iam_role_arn": "IamRoleArn", "key": "Key", diff --git a/internal/aws/backupgateway/hypervisor_resource_gen.go b/internal/aws/backupgateway/hypervisor_resource_gen.go index 0f9c45bf2..d69f82681 100644 --- a/internal/aws/backupgateway/hypervisor_resource_gen.go +++ b/internal/aws/backupgateway/hypervisor_resource_gen.go @@ -228,6 +228,7 @@ func hypervisorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -246,7 +247,6 @@ func hypervisorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::BackupGateway::Hypervisor").WithTerraformTypeName("awscc_backupgateway_hypervisor") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "host": "Host", "hypervisor_arn": "HypervisorArn", diff --git a/internal/aws/batch/compute_environment_resource_gen.go b/internal/aws/batch/compute_environment_resource_gen.go index 9111cc087..882239d3f 100644 --- a/internal/aws/batch/compute_environment_resource_gen.go +++ b/internal/aws/batch/compute_environment_resource_gen.go @@ -572,6 +572,7 @@ func computeEnvironmentResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -590,7 +591,6 @@ func computeEnvironmentResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Batch::ComputeEnvironment").WithTerraformTypeName("awscc_batch_compute_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allocation_strategy": "AllocationStrategy", "bid_percentage": "BidPercentage", diff --git a/internal/aws/batch/job_definition_resource_gen.go b/internal/aws/batch/job_definition_resource_gen.go index f6961a7a1..8574a063c 100644 --- a/internal/aws/batch/job_definition_resource_gen.go +++ b/internal/aws/batch/job_definition_resource_gen.go @@ -2780,7 +2780,7 @@ func jobDefinitionResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "job_definition_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -4998,6 +4998,15 @@ func jobDefinitionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::Batch::JobDefinition", Version: 1, @@ -5008,7 +5017,6 @@ func jobDefinitionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Batch::JobDefinition").WithTerraformTypeName("awscc_batch_job_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "access_point_id": "AccessPointId", "action": "Action", @@ -5046,7 +5054,6 @@ func jobDefinitionResource(ctx context.Context) (resource.Resource, error) { "host_network": "HostNetwork", "host_path": "HostPath", "iam": "Iam", - "id": "Id", "image": "Image", "image_pull_policy": "ImagePullPolicy", "init_containers": "InitContainers", @@ -5054,6 +5061,7 @@ func jobDefinitionResource(ctx context.Context) (resource.Resource, error) { "instance_type": "InstanceType", "instance_types": "InstanceTypes", "ipc_mode": "IpcMode", + "job_definition_id": "Id", "job_definition_name": "JobDefinitionName", "job_role_arn": "JobRoleArn", "labels": "Labels", diff --git a/internal/aws/batch/job_definition_singular_data_source_gen.go b/internal/aws/batch/job_definition_singular_data_source_gen.go index a7bc7327d..7bcb45e69 100644 --- a/internal/aws/batch/job_definition_singular_data_source_gen.go +++ b/internal/aws/batch/job_definition_singular_data_source_gen.go @@ -2094,7 +2094,7 @@ func jobDefinitionDataSource(ctx context.Context) (datasource.DataSource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "job_definition_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: JobDefinitionName @@ -3838,7 +3838,6 @@ func jobDefinitionDataSource(ctx context.Context) (datasource.DataSource, error) "host_network": "HostNetwork", "host_path": "HostPath", "iam": "Iam", - "id": "Id", "image": "Image", "image_pull_policy": "ImagePullPolicy", "init_containers": "InitContainers", @@ -3846,6 +3845,7 @@ func jobDefinitionDataSource(ctx context.Context) (datasource.DataSource, error) "instance_type": "InstanceType", "instance_types": "InstanceTypes", "ipc_mode": "IpcMode", + "job_definition_id": "Id", "job_definition_name": "JobDefinitionName", "job_role_arn": "JobRoleArn", "labels": "Labels", diff --git a/internal/aws/batch/job_queue_resource_gen.go b/internal/aws/batch/job_queue_resource_gen.go index 61f0fa43b..24af055b6 100644 --- a/internal/aws/batch/job_queue_resource_gen.go +++ b/internal/aws/batch/job_queue_resource_gen.go @@ -258,6 +258,7 @@ func jobQueueResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -276,7 +277,6 @@ func jobQueueResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Batch::JobQueue").WithTerraformTypeName("awscc_batch_job_queue") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "compute_environment": "ComputeEnvironment", diff --git a/internal/aws/batch/scheduling_policy_resource_gen.go b/internal/aws/batch/scheduling_policy_resource_gen.go index c6ee07cd9..5518e9e5b 100644 --- a/internal/aws/batch/scheduling_policy_resource_gen.go +++ b/internal/aws/batch/scheduling_policy_resource_gen.go @@ -192,6 +192,7 @@ func schedulingPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -210,7 +211,6 @@ func schedulingPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Batch::SchedulingPolicy").WithTerraformTypeName("awscc_batch_scheduling_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "compute_reservation": "ComputeReservation", diff --git a/internal/aws/billingconductor/billing_group_resource_gen.go b/internal/aws/billingconductor/billing_group_resource_gen.go index 25d940498..461414f03 100644 --- a/internal/aws/billingconductor/billing_group_resource_gen.go +++ b/internal/aws/billingconductor/billing_group_resource_gen.go @@ -302,6 +302,7 @@ func billingGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -320,7 +321,6 @@ func billingGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::BillingConductor::BillingGroup").WithTerraformTypeName("awscc_billingconductor_billing_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_grouping": "AccountGrouping", "arn": "Arn", diff --git a/internal/aws/billingconductor/custom_line_item_resource_gen.go b/internal/aws/billingconductor/custom_line_item_resource_gen.go index 3a563a779..1632549ea 100644 --- a/internal/aws/billingconductor/custom_line_item_resource_gen.go +++ b/internal/aws/billingconductor/custom_line_item_resource_gen.go @@ -503,6 +503,7 @@ func customLineItemResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -521,7 +522,6 @@ func customLineItemResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::BillingConductor::CustomLineItem").WithTerraformTypeName("awscc_billingconductor_custom_line_item") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "arn": "Arn", diff --git a/internal/aws/billingconductor/pricing_plan_resource_gen.go b/internal/aws/billingconductor/pricing_plan_resource_gen.go index b22143e15..65365c5e7 100644 --- a/internal/aws/billingconductor/pricing_plan_resource_gen.go +++ b/internal/aws/billingconductor/pricing_plan_resource_gen.go @@ -203,6 +203,7 @@ func pricingPlanResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -221,7 +222,6 @@ func pricingPlanResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::BillingConductor::PricingPlan").WithTerraformTypeName("awscc_billingconductor_pricing_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", diff --git a/internal/aws/billingconductor/pricing_rule_resource_gen.go b/internal/aws/billingconductor/pricing_rule_resource_gen.go index 6aaac3c2b..b6816c002 100644 --- a/internal/aws/billingconductor/pricing_rule_resource_gen.go +++ b/internal/aws/billingconductor/pricing_rule_resource_gen.go @@ -397,6 +397,7 @@ func pricingRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -415,7 +416,6 @@ func pricingRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::BillingConductor::PricingRule").WithTerraformTypeName("awscc_billingconductor_pricing_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "activated": "Activated", "arn": "Arn", diff --git a/internal/aws/budgets/budgets_action_resource_gen.go b/internal/aws/budgets/budgets_action_resource_gen.go index d82249bec..379e1bacd 100644 --- a/internal/aws/budgets/budgets_action_resource_gen.go +++ b/internal/aws/budgets/budgets_action_resource_gen.go @@ -429,6 +429,7 @@ func budgetsActionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -447,7 +448,6 @@ func budgetsActionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Budgets::BudgetsAction").WithTerraformTypeName("awscc_budgets_budgets_action") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action_id": "ActionId", "action_threshold": "ActionThreshold", diff --git a/internal/aws/cassandra/keyspace_resource_gen.go b/internal/aws/cassandra/keyspace_resource_gen.go index 61a506d5c..f1aebcfbe 100644 --- a/internal/aws/cassandra/keyspace_resource_gen.go +++ b/internal/aws/cassandra/keyspace_resource_gen.go @@ -222,6 +222,7 @@ func keyspaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -240,7 +241,6 @@ func keyspaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Cassandra::Keyspace").WithTerraformTypeName("awscc_cassandra_keyspace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "keyspace_name": "KeyspaceName", diff --git a/internal/aws/cassandra/table_resource_gen.go b/internal/aws/cassandra/table_resource_gen.go index 30dca7dd7..7c2c90d46 100644 --- a/internal/aws/cassandra/table_resource_gen.go +++ b/internal/aws/cassandra/table_resource_gen.go @@ -1046,6 +1046,7 @@ func tableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1064,7 +1065,6 @@ func tableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Cassandra::Table").WithTerraformTypeName("awscc_cassandra_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_disabled": "AutoScalingDisabled", "auto_scaling_specifications": "AutoScalingSpecifications", diff --git a/internal/aws/ce/anomaly_monitor_resource_gen.go b/internal/aws/ce/anomaly_monitor_resource_gen.go index 15d8b22a5..cb169173f 100644 --- a/internal/aws/ce/anomaly_monitor_resource_gen.go +++ b/internal/aws/ce/anomaly_monitor_resource_gen.go @@ -259,6 +259,7 @@ func anomalyMonitorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -277,7 +278,6 @@ func anomalyMonitorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CE::AnomalyMonitor").WithTerraformTypeName("awscc_ce_anomaly_monitor") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "creation_date": "CreationDate", "dimensional_value_count": "DimensionalValueCount", diff --git a/internal/aws/ce/anomaly_subscription_resource_gen.go b/internal/aws/ce/anomaly_subscription_resource_gen.go index b4e233238..9e913ca59 100644 --- a/internal/aws/ce/anomaly_subscription_resource_gen.go +++ b/internal/aws/ce/anomaly_subscription_resource_gen.go @@ -312,6 +312,7 @@ func anomalySubscriptionResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -330,7 +331,6 @@ func anomalySubscriptionResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::CE::AnomalySubscription").WithTerraformTypeName("awscc_ce_anomaly_subscription") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "address": "Address", diff --git a/internal/aws/ce/cost_category_resource_gen.go b/internal/aws/ce/cost_category_resource_gen.go index e4e8470ac..07234f66f 100644 --- a/internal/aws/ce/cost_category_resource_gen.go +++ b/internal/aws/ce/cost_category_resource_gen.go @@ -140,6 +140,7 @@ func costCategoryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -158,7 +159,6 @@ func costCategoryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CE::CostCategory").WithTerraformTypeName("awscc_ce_cost_category") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "default_value": "DefaultValue", diff --git a/internal/aws/certificatemanager/account_resource_gen.go b/internal/aws/certificatemanager/account_resource_gen.go index cc9cc2d25..426689171 100644 --- a/internal/aws/certificatemanager/account_resource_gen.go +++ b/internal/aws/certificatemanager/account_resource_gen.go @@ -71,6 +71,7 @@ func accountResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -89,7 +90,6 @@ func accountResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CertificateManager::Account").WithTerraformTypeName("awscc_certificatemanager_account") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "days_before_expiry": "DaysBeforeExpiry", diff --git a/internal/aws/chatbot/microsoft_teams_channel_configuration_resource_gen.go b/internal/aws/chatbot/microsoft_teams_channel_configuration_resource_gen.go index f994094b2..275c6b28f 100644 --- a/internal/aws/chatbot/microsoft_teams_channel_configuration_resource_gen.go +++ b/internal/aws/chatbot/microsoft_teams_channel_configuration_resource_gen.go @@ -222,6 +222,7 @@ func microsoftTeamsChannelConfigurationResource(ctx context.Context) (resource.R }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -240,7 +241,6 @@ func microsoftTeamsChannelConfigurationResource(ctx context.Context) (resource.R opts = opts.WithCloudFormationTypeName("AWS::Chatbot::MicrosoftTeamsChannelConfiguration").WithTerraformTypeName("awscc_chatbot_microsoft_teams_channel_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "configuration_name": "ConfigurationName", diff --git a/internal/aws/chatbot/slack_channel_configuration_resource_gen.go b/internal/aws/chatbot/slack_channel_configuration_resource_gen.go index 4ac689db1..54a0ef578 100644 --- a/internal/aws/chatbot/slack_channel_configuration_resource_gen.go +++ b/internal/aws/chatbot/slack_channel_configuration_resource_gen.go @@ -201,6 +201,7 @@ func slackChannelConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -219,7 +220,6 @@ func slackChannelConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::Chatbot::SlackChannelConfiguration").WithTerraformTypeName("awscc_chatbot_slack_channel_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "configuration_name": "ConfigurationName", diff --git a/internal/aws/cleanrooms/analysis_template_resource_gen.go b/internal/aws/cleanrooms/analysis_template_resource_gen.go index 4d0113c13..2a8460297 100644 --- a/internal/aws/cleanrooms/analysis_template_resource_gen.go +++ b/internal/aws/cleanrooms/analysis_template_resource_gen.go @@ -422,6 +422,7 @@ func analysisTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -440,7 +441,6 @@ func analysisTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CleanRooms::AnalysisTemplate").WithTerraformTypeName("awscc_cleanrooms_analysis_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "analysis_parameters": "AnalysisParameters", "analysis_template_identifier": "AnalysisTemplateIdentifier", diff --git a/internal/aws/cleanrooms/collaboration_resource_gen.go b/internal/aws/cleanrooms/collaboration_resource_gen.go index 6bdddaa0b..9c5dd50e8 100644 --- a/internal/aws/cleanrooms/collaboration_resource_gen.go +++ b/internal/aws/cleanrooms/collaboration_resource_gen.go @@ -442,6 +442,7 @@ func collaborationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -460,7 +461,6 @@ func collaborationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CleanRooms::Collaboration").WithTerraformTypeName("awscc_cleanrooms_collaboration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "allow_cleartext": "AllowCleartext", diff --git a/internal/aws/cleanrooms/configured_table_association_resource_gen.go b/internal/aws/cleanrooms/configured_table_association_resource_gen.go index a46801139..4c16ff911 100644 --- a/internal/aws/cleanrooms/configured_table_association_resource_gen.go +++ b/internal/aws/cleanrooms/configured_table_association_resource_gen.go @@ -201,6 +201,7 @@ func configuredTableAssociationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -219,7 +220,6 @@ func configuredTableAssociationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::CleanRooms::ConfiguredTableAssociation").WithTerraformTypeName("awscc_cleanrooms_configured_table_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "configured_table_association_identifier": "ConfiguredTableAssociationIdentifier", diff --git a/internal/aws/cleanrooms/configured_table_resource_gen.go b/internal/aws/cleanrooms/configured_table_resource_gen.go index 6a4008c58..2a45cf802 100644 --- a/internal/aws/cleanrooms/configured_table_resource_gen.go +++ b/internal/aws/cleanrooms/configured_table_resource_gen.go @@ -834,6 +834,7 @@ func configuredTableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -852,7 +853,6 @@ func configuredTableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CleanRooms::ConfiguredTable").WithTerraformTypeName("awscc_cleanrooms_configured_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregate_columns": "AggregateColumns", "aggregation": "Aggregation", diff --git a/internal/aws/cleanrooms/membership_resource_gen.go b/internal/aws/cleanrooms/membership_resource_gen.go index 5dd65aa25..c33cb3d86 100644 --- a/internal/aws/cleanrooms/membership_resource_gen.go +++ b/internal/aws/cleanrooms/membership_resource_gen.go @@ -331,6 +331,7 @@ func membershipResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -349,7 +350,6 @@ func membershipResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CleanRooms::Membership").WithTerraformTypeName("awscc_cleanrooms_membership") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", diff --git a/internal/aws/cloudformation/hook_default_version_resource_gen.go b/internal/aws/cloudformation/hook_default_version_resource_gen.go index 5e991cb34..7c0856e03 100644 --- a/internal/aws/cloudformation/hook_default_version_resource_gen.go +++ b/internal/aws/cloudformation/hook_default_version_resource_gen.go @@ -101,6 +101,7 @@ func hookDefaultVersionResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func hookDefaultVersionResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::HookDefaultVersion").WithTerraformTypeName("awscc_cloudformation_hook_default_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "type_name": "TypeName", diff --git a/internal/aws/cloudformation/hook_type_config_resource_gen.go b/internal/aws/cloudformation/hook_type_config_resource_gen.go index 843008686..c81b69ec6 100644 --- a/internal/aws/cloudformation/hook_type_config_resource_gen.go +++ b/internal/aws/cloudformation/hook_type_config_resource_gen.go @@ -129,6 +129,7 @@ func hookTypeConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -147,7 +148,6 @@ func hookTypeConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::HookTypeConfig").WithTerraformTypeName("awscc_cloudformation_hook_type_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "configuration": "Configuration", "configuration_alias": "ConfigurationAlias", diff --git a/internal/aws/cloudformation/hook_version_resource_gen.go b/internal/aws/cloudformation/hook_version_resource_gen.go index 631333c8b..f06a60ebc 100644 --- a/internal/aws/cloudformation/hook_version_resource_gen.go +++ b/internal/aws/cloudformation/hook_version_resource_gen.go @@ -226,6 +226,7 @@ func hookVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -244,7 +245,6 @@ func hookVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::HookVersion").WithTerraformTypeName("awscc_cloudformation_hook_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "execution_role_arn": "ExecutionRoleArn", diff --git a/internal/aws/cloudformation/module_default_version_resource_gen.go b/internal/aws/cloudformation/module_default_version_resource_gen.go index 2b2c1d3f3..d31184d74 100644 --- a/internal/aws/cloudformation/module_default_version_resource_gen.go +++ b/internal/aws/cloudformation/module_default_version_resource_gen.go @@ -91,6 +91,7 @@ func moduleDefaultVersionResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -109,7 +110,6 @@ func moduleDefaultVersionResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::ModuleDefaultVersion").WithTerraformTypeName("awscc_cloudformation_module_default_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "module_name": "ModuleName", diff --git a/internal/aws/cloudformation/module_version_resource_gen.go b/internal/aws/cloudformation/module_version_resource_gen.go index 5bcac27ca..d62b95398 100644 --- a/internal/aws/cloudformation/module_version_resource_gen.go +++ b/internal/aws/cloudformation/module_version_resource_gen.go @@ -185,6 +185,7 @@ func moduleVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -203,7 +204,6 @@ func moduleVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::ModuleVersion").WithTerraformTypeName("awscc_cloudformation_module_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/cloudformation/public_type_version_resource_gen.go b/internal/aws/cloudformation/public_type_version_resource_gen.go index b9e2ad97f..46857421d 100644 --- a/internal/aws/cloudformation/public_type_version_resource_gen.go +++ b/internal/aws/cloudformation/public_type_version_resource_gen.go @@ -183,6 +183,7 @@ func publicTypeVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -201,7 +202,6 @@ func publicTypeVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::PublicTypeVersion").WithTerraformTypeName("awscc_cloudformation_public_type_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "log_delivery_bucket": "LogDeliveryBucket", diff --git a/internal/aws/cloudformation/publisher_resource_gen.go b/internal/aws/cloudformation/publisher_resource_gen.go index 79e525bef..fafab380d 100644 --- a/internal/aws/cloudformation/publisher_resource_gen.go +++ b/internal/aws/cloudformation/publisher_resource_gen.go @@ -135,6 +135,7 @@ func publisherResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -153,7 +154,6 @@ func publisherResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::Publisher").WithTerraformTypeName("awscc_cloudformation_publisher") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accept_terms_and_conditions": "AcceptTermsAndConditions", "connection_arn": "ConnectionArn", diff --git a/internal/aws/cloudformation/resource_default_version_resource_gen.go b/internal/aws/cloudformation/resource_default_version_resource_gen.go index 76821de19..b8b70fd57 100644 --- a/internal/aws/cloudformation/resource_default_version_resource_gen.go +++ b/internal/aws/cloudformation/resource_default_version_resource_gen.go @@ -101,6 +101,7 @@ func resourceDefaultVersionResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func resourceDefaultVersionResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::ResourceDefaultVersion").WithTerraformTypeName("awscc_cloudformation_resource_default_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "type_name": "TypeName", diff --git a/internal/aws/cloudformation/resource_version_resource_gen.go b/internal/aws/cloudformation/resource_version_resource_gen.go index e49ce170f..026f7dfef 100644 --- a/internal/aws/cloudformation/resource_version_resource_gen.go +++ b/internal/aws/cloudformation/resource_version_resource_gen.go @@ -235,6 +235,7 @@ func resourceVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -253,7 +254,6 @@ func resourceVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::ResourceVersion").WithTerraformTypeName("awscc_cloudformation_resource_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "execution_role_arn": "ExecutionRoleArn", diff --git a/internal/aws/cloudformation/stack_set_resource_gen.go b/internal/aws/cloudformation/stack_set_resource_gen.go index 00c70c44f..7501839f4 100644 --- a/internal/aws/cloudformation/stack_set_resource_gen.go +++ b/internal/aws/cloudformation/stack_set_resource_gen.go @@ -797,6 +797,7 @@ func stackSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -815,7 +816,6 @@ func stackSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::StackSet").WithTerraformTypeName("awscc_cloudformation_stack_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_filter_type": "AccountFilterType", "accounts": "Accounts", diff --git a/internal/aws/cloudformation/type_activation_resource_gen.go b/internal/aws/cloudformation/type_activation_resource_gen.go index 820b2c9ab..04e191f4d 100644 --- a/internal/aws/cloudformation/type_activation_resource_gen.go +++ b/internal/aws/cloudformation/type_activation_resource_gen.go @@ -297,6 +297,7 @@ func typeActivationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -315,7 +316,6 @@ func typeActivationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFormation::TypeActivation").WithTerraformTypeName("awscc_cloudformation_type_activation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "auto_update": "AutoUpdate", diff --git a/internal/aws/cloudfront/cache_policy_resource_gen.go b/internal/aws/cloudfront/cache_policy_resource_gen.go index a2a93e592..aed7a64bd 100644 --- a/internal/aws/cloudfront/cache_policy_resource_gen.go +++ b/internal/aws/cloudfront/cache_policy_resource_gen.go @@ -271,7 +271,7 @@ func cachePolicyResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "cache_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -291,6 +291,15 @@ func cachePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::CachePolicy", Version: 1, @@ -301,9 +310,9 @@ func cachePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFront::CachePolicy").WithTerraformTypeName("awscc_cloudfront_cache_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cache_policy_config": "CachePolicyConfig", + "cache_policy_id": "Id", "comment": "Comment", "cookie_behavior": "CookieBehavior", "cookies": "Cookies", @@ -314,7 +323,6 @@ func cachePolicyResource(ctx context.Context) (resource.Resource, error) { "header_behavior": "HeaderBehavior", "headers": "Headers", "headers_config": "HeadersConfig", - "id": "Id", "last_modified_time": "LastModifiedTime", "max_ttl": "MaxTTL", "min_ttl": "MinTTL", diff --git a/internal/aws/cloudfront/cache_policy_singular_data_source_gen.go b/internal/aws/cloudfront/cache_policy_singular_data_source_gen.go index ea932c6c2..9b43ecf9c 100644 --- a/internal/aws/cloudfront/cache_policy_singular_data_source_gen.go +++ b/internal/aws/cloudfront/cache_policy_singular_data_source_gen.go @@ -225,7 +225,7 @@ func cachePolicyDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "cache_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LastModifiedTime @@ -255,6 +255,7 @@ func cachePolicyDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "cache_policy_config": "CachePolicyConfig", + "cache_policy_id": "Id", "comment": "Comment", "cookie_behavior": "CookieBehavior", "cookies": "Cookies", @@ -265,7 +266,6 @@ func cachePolicyDataSource(ctx context.Context) (datasource.DataSource, error) { "header_behavior": "HeaderBehavior", "headers": "Headers", "headers_config": "HeadersConfig", - "id": "Id", "last_modified_time": "LastModifiedTime", "max_ttl": "MaxTTL", "min_ttl": "MinTTL", diff --git a/internal/aws/cloudfront/cloudfront_origin_access_identity_resource_gen.go b/internal/aws/cloudfront/cloudfront_origin_access_identity_resource_gen.go index 1e3511b77..2d77ec331 100644 --- a/internal/aws/cloudfront/cloudfront_origin_access_identity_resource_gen.go +++ b/internal/aws/cloudfront/cloudfront_origin_access_identity_resource_gen.go @@ -54,7 +54,7 @@ func cloudFrontOriginAccessIdentityResource(ctx context.Context) (resource.Resou // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "cloudfront_origin_access_identity_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -74,6 +74,15 @@ func cloudFrontOriginAccessIdentityResource(ctx context.Context) (resource.Resou }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::CloudFrontOriginAccessIdentity", Version: 1, @@ -84,12 +93,11 @@ func cloudFrontOriginAccessIdentityResource(ctx context.Context) (resource.Resou opts = opts.WithCloudFormationTypeName("AWS::CloudFront::CloudFrontOriginAccessIdentity").WithTerraformTypeName("awscc_cloudfront_cloudfront_origin_access_identity") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cloudfront_origin_access_identity_config": "CloudFrontOriginAccessIdentityConfig", - "comment": "Comment", - "id": "Id", - "s3_canonical_user_id": "S3CanonicalUserId", + "cloudfront_origin_access_identity_id": "Id", + "comment": "Comment", + "s3_canonical_user_id": "S3CanonicalUserId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/cloudfront/cloudfront_origin_access_identity_singular_data_source_gen.go b/internal/aws/cloudfront/cloudfront_origin_access_identity_singular_data_source_gen.go index ba7d2fbd6..2af88f544 100644 --- a/internal/aws/cloudfront/cloudfront_origin_access_identity_singular_data_source_gen.go +++ b/internal/aws/cloudfront/cloudfront_origin_access_identity_singular_data_source_gen.go @@ -52,7 +52,7 @@ func cloudFrontOriginAccessIdentityDataSource(ctx context.Context) (datasource.D // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "cloudfront_origin_access_identity_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: S3CanonicalUserId @@ -82,9 +82,9 @@ func cloudFrontOriginAccessIdentityDataSource(ctx context.Context) (datasource.D opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "cloudfront_origin_access_identity_config": "CloudFrontOriginAccessIdentityConfig", - "comment": "Comment", - "id": "Id", - "s3_canonical_user_id": "S3CanonicalUserId", + "cloudfront_origin_access_identity_id": "Id", + "comment": "Comment", + "s3_canonical_user_id": "S3CanonicalUserId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/cloudfront/continuous_deployment_policy_resource_gen.go b/internal/aws/cloudfront/continuous_deployment_policy_resource_gen.go index 90b09db97..4b5456aa8 100644 --- a/internal/aws/cloudfront/continuous_deployment_policy_resource_gen.go +++ b/internal/aws/cloudfront/continuous_deployment_policy_resource_gen.go @@ -375,7 +375,7 @@ func continuousDeploymentPolicyResource(ctx context.Context) (resource.Resource, // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "continuous_deployment_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -395,6 +395,15 @@ func continuousDeploymentPolicyResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::ContinuousDeploymentPolicy", Version: 1, @@ -405,12 +414,11 @@ func continuousDeploymentPolicyResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::CloudFront::ContinuousDeploymentPolicy").WithTerraformTypeName("awscc_cloudfront_continuous_deployment_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "continuous_deployment_policy_config": "ContinuousDeploymentPolicyConfig", + "continuous_deployment_policy_id": "Id", "enabled": "Enabled", "header": "Header", - "id": "Id", "idle_ttl": "IdleTTL", "last_modified_time": "LastModifiedTime", "maximum_ttl": "MaximumTTL", diff --git a/internal/aws/cloudfront/continuous_deployment_policy_singular_data_source_gen.go b/internal/aws/cloudfront/continuous_deployment_policy_singular_data_source_gen.go index 17fe159a0..5407d365e 100644 --- a/internal/aws/cloudfront/continuous_deployment_policy_singular_data_source_gen.go +++ b/internal/aws/cloudfront/continuous_deployment_policy_singular_data_source_gen.go @@ -289,7 +289,7 @@ func continuousDeploymentPolicyDataSource(ctx context.Context) (datasource.DataS // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "continuous_deployment_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LastModifiedTime @@ -319,9 +319,9 @@ func continuousDeploymentPolicyDataSource(ctx context.Context) (datasource.DataS opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "continuous_deployment_policy_config": "ContinuousDeploymentPolicyConfig", + "continuous_deployment_policy_id": "Id", "enabled": "Enabled", "header": "Header", - "id": "Id", "idle_ttl": "IdleTTL", "last_modified_time": "LastModifiedTime", "maximum_ttl": "MaximumTTL", diff --git a/internal/aws/cloudfront/distribution_resource_gen.go b/internal/aws/cloudfront/distribution_resource_gen.go index a9d2b9499..d4efa1ded 100644 --- a/internal/aws/cloudfront/distribution_resource_gen.go +++ b/internal/aws/cloudfront/distribution_resource_gen.go @@ -2213,7 +2213,7 @@ func distributionResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "distribution_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -2271,6 +2271,15 @@ func distributionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery.", Version: 1, @@ -2281,7 +2290,6 @@ func distributionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFront::Distribution").WithTerraformTypeName("awscc_cloudfront_distribution") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "acm_certificate_arn": "AcmCertificateArn", "aliases": "Aliases", @@ -2305,6 +2313,7 @@ func distributionResource(ctx context.Context) (resource.Resource, error) { "default_root_object": "DefaultRootObject", "default_ttl": "DefaultTTL", "distribution_config": "DistributionConfig", + "distribution_id": "Id", "dns_name": "DNSName", "domain_name": "DomainName", "enabled": "Enabled", diff --git a/internal/aws/cloudfront/distribution_singular_data_source_gen.go b/internal/aws/cloudfront/distribution_singular_data_source_gen.go index 4c6b859c4..e4802883a 100644 --- a/internal/aws/cloudfront/distribution_singular_data_source_gen.go +++ b/internal/aws/cloudfront/distribution_singular_data_source_gen.go @@ -1737,7 +1737,7 @@ func distributionDataSource(ctx context.Context) (datasource.DataSource, error) // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "distribution_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -1825,6 +1825,7 @@ func distributionDataSource(ctx context.Context) (datasource.DataSource, error) "default_root_object": "DefaultRootObject", "default_ttl": "DefaultTTL", "distribution_config": "DistributionConfig", + "distribution_id": "Id", "dns_name": "DNSName", "domain_name": "DomainName", "enabled": "Enabled", diff --git a/internal/aws/cloudfront/function_resource_gen.go b/internal/aws/cloudfront/function_resource_gen.go index 403e1262f..d6a9778cc 100644 --- a/internal/aws/cloudfront/function_resource_gen.go +++ b/internal/aws/cloudfront/function_resource_gen.go @@ -182,6 +182,7 @@ func functionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -200,7 +201,6 @@ func functionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFront::Function").WithTerraformTypeName("awscc_cloudfront_function") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_publish": "AutoPublish", "comment": "Comment", diff --git a/internal/aws/cloudfront/key_group_resource_gen.go b/internal/aws/cloudfront/key_group_resource_gen.go index 5f6b1972c..c238f66e8 100644 --- a/internal/aws/cloudfront/key_group_resource_gen.go +++ b/internal/aws/cloudfront/key_group_resource_gen.go @@ -31,7 +31,7 @@ func keyGroupResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "key_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -99,6 +99,15 @@ func keyGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::KeyGroup", Version: 1, @@ -109,12 +118,11 @@ func keyGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFront::KeyGroup").WithTerraformTypeName("awscc_cloudfront_key_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "comment": "Comment", - "id": "Id", "items": "Items", "key_group_config": "KeyGroupConfig", + "key_group_id": "Id", "last_modified_time": "LastModifiedTime", "name": "Name", }) diff --git a/internal/aws/cloudfront/key_group_singular_data_source_gen.go b/internal/aws/cloudfront/key_group_singular_data_source_gen.go index 40c1366f3..2e7d49e92 100644 --- a/internal/aws/cloudfront/key_group_singular_data_source_gen.go +++ b/internal/aws/cloudfront/key_group_singular_data_source_gen.go @@ -29,7 +29,7 @@ func keyGroupDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "key_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: KeyGroupConfig @@ -103,9 +103,9 @@ func keyGroupDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "comment": "Comment", - "id": "Id", "items": "Items", "key_group_config": "KeyGroupConfig", + "key_group_id": "Id", "last_modified_time": "LastModifiedTime", "name": "Name", }) diff --git a/internal/aws/cloudfront/key_value_store_plural_data_source_gen.go b/internal/aws/cloudfront/key_value_store_plural_data_source_gen.go new file mode 100644 index 000000000..7fab928a0 --- /dev/null +++ b/internal/aws/cloudfront/key_value_store_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package cloudfront + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_cloudfront_key_value_stores", keyValueStoresDataSource) +} + +// keyValueStoresDataSource returns the Terraform awscc_cloudfront_key_value_stores data source. +// This Terraform data source corresponds to the CloudFormation AWS::CloudFront::KeyValueStore resource. +func keyValueStoresDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::CloudFront::KeyValueStore", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::CloudFront::KeyValueStore").WithTerraformTypeName("awscc_cloudfront_key_value_stores") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/cloudfront/key_value_store_plural_data_source_gen_test.go b/internal/aws/cloudfront/key_value_store_plural_data_source_gen_test.go new file mode 100644 index 000000000..ec464e623 --- /dev/null +++ b/internal/aws/cloudfront/key_value_store_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package cloudfront_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSCloudFrontKeyValueStoresDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::CloudFront::KeyValueStore", "awscc_cloudfront_key_value_stores", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/cloudfront/key_value_store_resource_gen.go b/internal/aws/cloudfront/key_value_store_resource_gen.go new file mode 100644 index 000000000..4a3ad1810 --- /dev/null +++ b/internal/aws/cloudfront/key_value_store_resource_gen.go @@ -0,0 +1,172 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package cloudfront + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_cloudfront_key_value_store", keyValueStoreResource) +} + +// keyValueStoreResource returns the Terraform awscc_cloudfront_key_value_store resource. +// This Terraform resource corresponds to the CloudFormation AWS::CloudFront::KeyValueStore resource. +func keyValueStoreResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Comment + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "comment": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "key_value_store_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ImportSource + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "SourceArn": { + // "type": "string" + // }, + // "SourceType": { + // "type": "string" + // } + // }, + // "required": [ + // "SourceType", + // "SourceArn" + // ], + // "type": "object" + // } + "import_source": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SourceArn + "source_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: SourceType + "source_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // ImportSource is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::CloudFront::KeyValueStore", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::CloudFront::KeyValueStore").WithTerraformTypeName("awscc_cloudfront_key_value_store") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "comment": "Comment", + "import_source": "ImportSource", + "key_value_store_id": "Id", + "name": "Name", + "source_arn": "SourceArn", + "source_type": "SourceType", + "status": "Status", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/ImportSource", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/cloudfront/key_value_store_resource_gen_test.go b/internal/aws/cloudfront/key_value_store_resource_gen_test.go new file mode 100644 index 000000000..7812bf429 --- /dev/null +++ b/internal/aws/cloudfront/key_value_store_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package cloudfront_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSCloudFrontKeyValueStore_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::CloudFront::KeyValueStore", "awscc_cloudfront_key_value_store", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/cloudfront/key_value_store_singular_data_source_gen.go b/internal/aws/cloudfront/key_value_store_singular_data_source_gen.go new file mode 100644 index 000000000..ca3a59886 --- /dev/null +++ b/internal/aws/cloudfront/key_value_store_singular_data_source_gen.go @@ -0,0 +1,136 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package cloudfront + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_cloudfront_key_value_store", keyValueStoreDataSource) +} + +// keyValueStoreDataSource returns the Terraform awscc_cloudfront_key_value_store data source. +// This Terraform data source corresponds to the CloudFormation AWS::CloudFront::KeyValueStore resource. +func keyValueStoreDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Comment + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "comment": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "key_value_store_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ImportSource + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "SourceArn": { + // "type": "string" + // }, + // "SourceType": { + // "type": "string" + // } + // }, + // "required": [ + // "SourceType", + // "SourceArn" + // ], + // "type": "object" + // } + "import_source": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SourceArn + "source_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SourceType + "source_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::CloudFront::KeyValueStore", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::CloudFront::KeyValueStore").WithTerraformTypeName("awscc_cloudfront_key_value_store") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "comment": "Comment", + "import_source": "ImportSource", + "key_value_store_id": "Id", + "name": "Name", + "source_arn": "SourceArn", + "source_type": "SourceType", + "status": "Status", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/cloudfront/key_value_store_singular_data_source_gen_test.go b/internal/aws/cloudfront/key_value_store_singular_data_source_gen_test.go new file mode 100644 index 000000000..9fe1b2973 --- /dev/null +++ b/internal/aws/cloudfront/key_value_store_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package cloudfront_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSCloudFrontKeyValueStoreDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::CloudFront::KeyValueStore", "awscc_cloudfront_key_value_store", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSCloudFrontKeyValueStoreDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::CloudFront::KeyValueStore", "awscc_cloudfront_key_value_store", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/cloudfront/monitoring_subscription_resource_gen.go b/internal/aws/cloudfront/monitoring_subscription_resource_gen.go index d002ec8f0..2a07b5b88 100644 --- a/internal/aws/cloudfront/monitoring_subscription_resource_gen.go +++ b/internal/aws/cloudfront/monitoring_subscription_resource_gen.go @@ -91,6 +91,7 @@ func monitoringSubscriptionResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -109,7 +110,6 @@ func monitoringSubscriptionResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::CloudFront::MonitoringSubscription").WithTerraformTypeName("awscc_cloudfront_monitoring_subscription") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "distribution_id": "DistributionId", "monitoring_subscription": "MonitoringSubscription", diff --git a/internal/aws/cloudfront/origin_access_control_resource_gen.go b/internal/aws/cloudfront/origin_access_control_resource_gen.go index 6b282351e..84e451601 100644 --- a/internal/aws/cloudfront/origin_access_control_resource_gen.go +++ b/internal/aws/cloudfront/origin_access_control_resource_gen.go @@ -33,7 +33,7 @@ func originAccessControlResource(ctx context.Context) (resource.Resource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "origin_access_control_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -112,6 +112,15 @@ func originAccessControlResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::OriginAccessControl", Version: 1, @@ -122,12 +131,11 @@ func originAccessControlResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::CloudFront::OriginAccessControl").WithTerraformTypeName("awscc_cloudfront_origin_access_control") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", - "id": "Id", "name": "Name", "origin_access_control_config": "OriginAccessControlConfig", + "origin_access_control_id": "Id", "origin_access_control_origin_type": "OriginAccessControlOriginType", "signing_behavior": "SigningBehavior", "signing_protocol": "SigningProtocol", diff --git a/internal/aws/cloudfront/origin_access_control_singular_data_source_gen.go b/internal/aws/cloudfront/origin_access_control_singular_data_source_gen.go index c3c5de1ca..a9b8ec934 100644 --- a/internal/aws/cloudfront/origin_access_control_singular_data_source_gen.go +++ b/internal/aws/cloudfront/origin_access_control_singular_data_source_gen.go @@ -28,7 +28,7 @@ func originAccessControlDataSource(ctx context.Context) (datasource.DataSource, // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "origin_access_control_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: OriginAccessControlConfig @@ -107,9 +107,9 @@ func originAccessControlDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", - "id": "Id", "name": "Name", "origin_access_control_config": "OriginAccessControlConfig", + "origin_access_control_id": "Id", "origin_access_control_origin_type": "OriginAccessControlOriginType", "signing_behavior": "SigningBehavior", "signing_protocol": "SigningProtocol", diff --git a/internal/aws/cloudfront/origin_request_policy_resource_gen.go b/internal/aws/cloudfront/origin_request_policy_resource_gen.go index d1169aee6..04e616199 100644 --- a/internal/aws/cloudfront/origin_request_policy_resource_gen.go +++ b/internal/aws/cloudfront/origin_request_policy_resource_gen.go @@ -35,7 +35,7 @@ func originRequestPolicyResource(ctx context.Context) (resource.Resource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "origin_request_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -219,6 +219,15 @@ func originRequestPolicyResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::OriginRequestPolicy", Version: 1, @@ -229,7 +238,6 @@ func originRequestPolicyResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::CloudFront::OriginRequestPolicy").WithTerraformTypeName("awscc_cloudfront_origin_request_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "comment": "Comment", "cookie_behavior": "CookieBehavior", @@ -238,10 +246,10 @@ func originRequestPolicyResource(ctx context.Context) (resource.Resource, error) "header_behavior": "HeaderBehavior", "headers": "Headers", "headers_config": "HeadersConfig", - "id": "Id", "last_modified_time": "LastModifiedTime", "name": "Name", "origin_request_policy_config": "OriginRequestPolicyConfig", + "origin_request_policy_id": "Id", "query_string_behavior": "QueryStringBehavior", "query_strings": "QueryStrings", "query_strings_config": "QueryStringsConfig", diff --git a/internal/aws/cloudfront/origin_request_policy_singular_data_source_gen.go b/internal/aws/cloudfront/origin_request_policy_singular_data_source_gen.go index d5281baae..5f72c6b84 100644 --- a/internal/aws/cloudfront/origin_request_policy_singular_data_source_gen.go +++ b/internal/aws/cloudfront/origin_request_policy_singular_data_source_gen.go @@ -29,7 +29,7 @@ func originRequestPolicyDataSource(ctx context.Context) (datasource.DataSource, // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "origin_request_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LastModifiedTime @@ -204,10 +204,10 @@ func originRequestPolicyDataSource(ctx context.Context) (datasource.DataSource, "header_behavior": "HeaderBehavior", "headers": "Headers", "headers_config": "HeadersConfig", - "id": "Id", "last_modified_time": "LastModifiedTime", "name": "Name", "origin_request_policy_config": "OriginRequestPolicyConfig", + "origin_request_policy_id": "Id", "query_string_behavior": "QueryStringBehavior", "query_strings": "QueryStrings", "query_strings_config": "QueryStringsConfig", diff --git a/internal/aws/cloudfront/public_key_resource_gen.go b/internal/aws/cloudfront/public_key_resource_gen.go index d0f59c8a4..7ee8ab775 100644 --- a/internal/aws/cloudfront/public_key_resource_gen.go +++ b/internal/aws/cloudfront/public_key_resource_gen.go @@ -42,7 +42,7 @@ func publicKeyResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "public_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -101,6 +101,15 @@ func publicKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::PublicKey", Version: 1, @@ -111,15 +120,14 @@ func publicKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFront::PublicKey").WithTerraformTypeName("awscc_cloudfront_public_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "caller_reference": "CallerReference", "comment": "Comment", "created_time": "CreatedTime", "encoded_key": "EncodedKey", - "id": "Id", "name": "Name", "public_key_config": "PublicKeyConfig", + "public_key_id": "Id", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/cloudfront/public_key_singular_data_source_gen.go b/internal/aws/cloudfront/public_key_singular_data_source_gen.go index 6fed58c04..428c390e8 100644 --- a/internal/aws/cloudfront/public_key_singular_data_source_gen.go +++ b/internal/aws/cloudfront/public_key_singular_data_source_gen.go @@ -37,7 +37,7 @@ func publicKeyDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "public_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: PublicKeyConfig @@ -108,9 +108,9 @@ func publicKeyDataSource(ctx context.Context) (datasource.DataSource, error) { "comment": "Comment", "created_time": "CreatedTime", "encoded_key": "EncodedKey", - "id": "Id", "name": "Name", "public_key_config": "PublicKeyConfig", + "public_key_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/cloudfront/realtime_log_config_resource_gen.go b/internal/aws/cloudfront/realtime_log_config_resource_gen.go index 6b2385067..7e406dc12 100644 --- a/internal/aws/cloudfront/realtime_log_config_resource_gen.go +++ b/internal/aws/cloudfront/realtime_log_config_resource_gen.go @@ -151,6 +151,7 @@ func realtimeLogConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -169,7 +170,6 @@ func realtimeLogConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudFront::RealtimeLogConfig").WithTerraformTypeName("awscc_cloudfront_realtime_log_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "end_points": "EndPoints", diff --git a/internal/aws/cloudfront/response_headers_policy_resource_gen.go b/internal/aws/cloudfront/response_headers_policy_resource_gen.go index d5bebf781..2dc0721be 100644 --- a/internal/aws/cloudfront/response_headers_policy_resource_gen.go +++ b/internal/aws/cloudfront/response_headers_policy_resource_gen.go @@ -39,7 +39,7 @@ func responseHeadersPolicyResource(ctx context.Context) (resource.Resource, erro // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "response_headers_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -687,6 +687,15 @@ func responseHeadersPolicyResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::CloudFront::ResponseHeadersPolicy", Version: 1, @@ -697,7 +706,6 @@ func responseHeadersPolicyResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::CloudFront::ResponseHeadersPolicy").WithTerraformTypeName("awscc_cloudfront_response_headers_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "access_control_allow_credentials": "AccessControlAllowCredentials", "access_control_allow_headers": "AccessControlAllowHeaders", @@ -714,7 +722,6 @@ func responseHeadersPolicyResource(ctx context.Context) (resource.Resource, erro "frame_option": "FrameOption", "frame_options": "FrameOptions", "header": "Header", - "id": "Id", "include_subdomains": "IncludeSubdomains", "items": "Items", "last_modified_time": "LastModifiedTime", @@ -728,6 +735,7 @@ func responseHeadersPolicyResource(ctx context.Context) (resource.Resource, erro "remove_headers_config": "RemoveHeadersConfig", "report_uri": "ReportUri", "response_headers_policy_config": "ResponseHeadersPolicyConfig", + "response_headers_policy_id": "Id", "sampling_rate": "SamplingRate", "security_headers_config": "SecurityHeadersConfig", "server_timing_headers_config": "ServerTimingHeadersConfig", diff --git a/internal/aws/cloudfront/response_headers_policy_singular_data_source_gen.go b/internal/aws/cloudfront/response_headers_policy_singular_data_source_gen.go index 6ec2b5686..8fe4eeb08 100644 --- a/internal/aws/cloudfront/response_headers_policy_singular_data_source_gen.go +++ b/internal/aws/cloudfront/response_headers_policy_singular_data_source_gen.go @@ -29,7 +29,7 @@ func responseHeadersPolicyDataSource(ctx context.Context) (datasource.DataSource // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "response_headers_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LastModifiedTime @@ -601,7 +601,6 @@ func responseHeadersPolicyDataSource(ctx context.Context) (datasource.DataSource "frame_option": "FrameOption", "frame_options": "FrameOptions", "header": "Header", - "id": "Id", "include_subdomains": "IncludeSubdomains", "items": "Items", "last_modified_time": "LastModifiedTime", @@ -615,6 +614,7 @@ func responseHeadersPolicyDataSource(ctx context.Context) (datasource.DataSource "remove_headers_config": "RemoveHeadersConfig", "report_uri": "ReportUri", "response_headers_policy_config": "ResponseHeadersPolicyConfig", + "response_headers_policy_id": "Id", "sampling_rate": "SamplingRate", "security_headers_config": "SecurityHeadersConfig", "server_timing_headers_config": "ServerTimingHeadersConfig", diff --git a/internal/aws/cloudtrail/channel_resource_gen.go b/internal/aws/cloudtrail/channel_resource_gen.go index ef11aadce..0074a59d1 100644 --- a/internal/aws/cloudtrail/channel_resource_gen.go +++ b/internal/aws/cloudtrail/channel_resource_gen.go @@ -225,6 +225,7 @@ func channelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -243,7 +244,6 @@ func channelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudTrail::Channel").WithTerraformTypeName("awscc_cloudtrail_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "channel_arn": "ChannelArn", "destinations": "Destinations", diff --git a/internal/aws/cloudtrail/event_data_store_resource_gen.go b/internal/aws/cloudtrail/event_data_store_resource_gen.go index 9d40daaef..0ba6733a9 100644 --- a/internal/aws/cloudtrail/event_data_store_resource_gen.go +++ b/internal/aws/cloudtrail/event_data_store_resource_gen.go @@ -620,6 +620,7 @@ func eventDataStoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -638,7 +639,6 @@ func eventDataStoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudTrail::EventDataStore").WithTerraformTypeName("awscc_cloudtrail_event_data_store") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "advanced_event_selectors": "AdvancedEventSelectors", "billing_mode": "BillingMode", diff --git a/internal/aws/cloudtrail/resource_policy_resource_gen.go b/internal/aws/cloudtrail/resource_policy_resource_gen.go index 480236344..4c1cc2f85 100644 --- a/internal/aws/cloudtrail/resource_policy_resource_gen.go +++ b/internal/aws/cloudtrail/resource_policy_resource_gen.go @@ -51,6 +51,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -69,7 +70,6 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudTrail::ResourcePolicy").WithTerraformTypeName("awscc_cloudtrail_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "resource_arn": "ResourceArn", "resource_policy": "ResourcePolicy", diff --git a/internal/aws/cloudtrail/trail_resource_gen.go b/internal/aws/cloudtrail/trail_resource_gen.go index 897d584ab..b8ba783d5 100644 --- a/internal/aws/cloudtrail/trail_resource_gen.go +++ b/internal/aws/cloudtrail/trail_resource_gen.go @@ -752,6 +752,7 @@ func trailResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -770,7 +771,6 @@ func trailResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudTrail::Trail").WithTerraformTypeName("awscc_cloudtrail_trail") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "advanced_event_selectors": "AdvancedEventSelectors", "arn": "Arn", diff --git a/internal/aws/cloudwatch/alarm_resource_gen.go b/internal/aws/cloudwatch/alarm_resource_gen.go index fb16aa537..a733c212e 100644 --- a/internal/aws/cloudwatch/alarm_resource_gen.go +++ b/internal/aws/cloudwatch/alarm_resource_gen.go @@ -644,6 +644,7 @@ func alarmResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -662,7 +663,6 @@ func alarmResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudWatch::Alarm").WithTerraformTypeName("awscc_cloudwatch_alarm") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "actions_enabled": "ActionsEnabled", diff --git a/internal/aws/cloudwatch/composite_alarm_resource_gen.go b/internal/aws/cloudwatch/composite_alarm_resource_gen.go index a70f88c5a..aec51d408 100644 --- a/internal/aws/cloudwatch/composite_alarm_resource_gen.go +++ b/internal/aws/cloudwatch/composite_alarm_resource_gen.go @@ -267,6 +267,7 @@ func compositeAlarmResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -285,7 +286,6 @@ func compositeAlarmResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudWatch::CompositeAlarm").WithTerraformTypeName("awscc_cloudwatch_composite_alarm") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions_enabled": "ActionsEnabled", "actions_suppressor": "ActionsSuppressor", diff --git a/internal/aws/cloudwatch/metric_stream_resource_gen.go b/internal/aws/cloudwatch/metric_stream_resource_gen.go index 61e4df78d..557b4f951 100644 --- a/internal/aws/cloudwatch/metric_stream_resource_gen.go +++ b/internal/aws/cloudwatch/metric_stream_resource_gen.go @@ -512,6 +512,7 @@ func metricStreamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -530,7 +531,6 @@ func metricStreamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CloudWatch::MetricStream").WithTerraformTypeName("awscc_cloudwatch_metric_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "additional_statistics": "AdditionalStatistics", "arn": "Arn", diff --git a/internal/aws/codeartifact/domain_resource_gen.go b/internal/aws/codeartifact/domain_resource_gen.go index 442ff3e82..f3255ea35 100644 --- a/internal/aws/codeartifact/domain_resource_gen.go +++ b/internal/aws/codeartifact/domain_resource_gen.go @@ -191,6 +191,7 @@ func domainResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -209,7 +210,6 @@ func domainResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeArtifact::Domain").WithTerraformTypeName("awscc_codeartifact_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "domain_name": "DomainName", diff --git a/internal/aws/codeartifact/repository_resource_gen.go b/internal/aws/codeartifact/repository_resource_gen.go index 8ce781912..c17dfbcfc 100644 --- a/internal/aws/codeartifact/repository_resource_gen.go +++ b/internal/aws/codeartifact/repository_resource_gen.go @@ -256,6 +256,7 @@ func repositoryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -274,7 +275,6 @@ func repositoryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeArtifact::Repository").WithTerraformTypeName("awscc_codeartifact_repository") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/codebuild/fleet_resource_gen.go b/internal/aws/codebuild/fleet_resource_gen.go index 7a05e6e87..b3881a95f 100644 --- a/internal/aws/codebuild/fleet_resource_gen.go +++ b/internal/aws/codebuild/fleet_resource_gen.go @@ -196,6 +196,7 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -214,7 +215,6 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeBuild::Fleet").WithTerraformTypeName("awscc_codebuild_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "base_capacity": "BaseCapacity", diff --git a/internal/aws/codedeploy/deployment_config_resource_gen.go b/internal/aws/codedeploy/deployment_config_resource_gen.go index 19e424469..85de64477 100644 --- a/internal/aws/codedeploy/deployment_config_resource_gen.go +++ b/internal/aws/codedeploy/deployment_config_resource_gen.go @@ -277,6 +277,7 @@ func deploymentConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -295,7 +296,6 @@ func deploymentConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeDeploy::DeploymentConfig").WithTerraformTypeName("awscc_codedeploy_deployment_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "canary_interval": "CanaryInterval", "canary_percentage": "CanaryPercentage", diff --git a/internal/aws/codeguruprofiler/profiling_group_resource_gen.go b/internal/aws/codeguruprofiler/profiling_group_resource_gen.go index 7fe920caa..a0b0a1eed 100644 --- a/internal/aws/codeguruprofiler/profiling_group_resource_gen.go +++ b/internal/aws/codeguruprofiler/profiling_group_resource_gen.go @@ -259,6 +259,7 @@ func profilingGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -277,7 +278,6 @@ func profilingGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeGuruProfiler::ProfilingGroup").WithTerraformTypeName("awscc_codeguruprofiler_profiling_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_permissions": "AgentPermissions", "anomaly_detection_notification_configuration": "AnomalyDetectionNotificationConfiguration", diff --git a/internal/aws/codegurureviewer/repository_association_resource_gen.go b/internal/aws/codegurureviewer/repository_association_resource_gen.go index cac2d9017..ac403ddf2 100644 --- a/internal/aws/codegurureviewer/repository_association_resource_gen.go +++ b/internal/aws/codegurureviewer/repository_association_resource_gen.go @@ -230,6 +230,7 @@ func repositoryAssociationResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -248,7 +249,6 @@ func repositoryAssociationResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::CodeGuruReviewer::RepositoryAssociation").WithTerraformTypeName("awscc_codegurureviewer_repository_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_arn": "AssociationArn", "bucket_name": "BucketName", diff --git a/internal/aws/codestarconnections/connection_resource_gen.go b/internal/aws/codestarconnections/connection_resource_gen.go index 352be3349..d11aa00bf 100644 --- a/internal/aws/codestarconnections/connection_resource_gen.go +++ b/internal/aws/codestarconnections/connection_resource_gen.go @@ -196,6 +196,7 @@ func connectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -214,7 +215,6 @@ func connectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeStarConnections::Connection").WithTerraformTypeName("awscc_codestarconnections_connection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "connection_arn": "ConnectionArn", "connection_name": "ConnectionName", diff --git a/internal/aws/codestarconnections/repository_link_resource_gen.go b/internal/aws/codestarconnections/repository_link_resource_gen.go index b019283d9..75238f1cc 100644 --- a/internal/aws/codestarconnections/repository_link_resource_gen.go +++ b/internal/aws/codestarconnections/repository_link_resource_gen.go @@ -205,6 +205,7 @@ func repositoryLinkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -223,7 +224,6 @@ func repositoryLinkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeStarConnections::RepositoryLink").WithTerraformTypeName("awscc_codestarconnections_repository_link") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "connection_arn": "ConnectionArn", "encryption_key_arn": "EncryptionKeyArn", diff --git a/internal/aws/codestarconnections/sync_configuration_resource_gen.go b/internal/aws/codestarconnections/sync_configuration_resource_gen.go index 62df21aea..8df6a036a 100644 --- a/internal/aws/codestarconnections/sync_configuration_resource_gen.go +++ b/internal/aws/codestarconnections/sync_configuration_resource_gen.go @@ -154,6 +154,7 @@ func syncConfigurationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -172,7 +173,6 @@ func syncConfigurationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeStarConnections::SyncConfiguration").WithTerraformTypeName("awscc_codestarconnections_sync_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "branch": "Branch", "config_file": "ConfigFile", diff --git a/internal/aws/codestarnotifications/notification_rule_resource_gen.go b/internal/aws/codestarnotifications/notification_rule_resource_gen.go index 054f49a4c..c7c9a1441 100644 --- a/internal/aws/codestarnotifications/notification_rule_resource_gen.go +++ b/internal/aws/codestarnotifications/notification_rule_resource_gen.go @@ -259,6 +259,7 @@ func notificationRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -277,7 +278,6 @@ func notificationRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CodeStarNotifications::NotificationRule").WithTerraformTypeName("awscc_codestarnotifications_notification_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_by": "CreatedBy", diff --git a/internal/aws/cognito/identity_pool_principal_tag_resource_gen.go b/internal/aws/cognito/identity_pool_principal_tag_resource_gen.go index 4b534f09f..3b9bc6e4e 100644 --- a/internal/aws/cognito/identity_pool_principal_tag_resource_gen.go +++ b/internal/aws/cognito/identity_pool_principal_tag_resource_gen.go @@ -79,6 +79,7 @@ func identityPoolPrincipalTagResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -97,7 +98,6 @@ func identityPoolPrincipalTagResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::Cognito::IdentityPoolPrincipalTag").WithTerraformTypeName("awscc_cognito_identity_pool_principal_tag") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "identity_pool_id": "IdentityPoolId", "identity_provider_name": "IdentityProviderName", diff --git a/internal/aws/cognito/identity_pool_resource_gen.go b/internal/aws/cognito/identity_pool_resource_gen.go index 9a9908cb9..94aadb87a 100644 --- a/internal/aws/cognito/identity_pool_resource_gen.go +++ b/internal/aws/cognito/identity_pool_resource_gen.go @@ -192,7 +192,7 @@ func identityPoolResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "identity_pool_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -327,6 +327,15 @@ func identityPoolResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::Cognito::IdentityPool", Version: 1, @@ -337,7 +346,6 @@ func identityPoolResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Cognito::IdentityPool").WithTerraformTypeName("awscc_cognito_identity_pool") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "allow_classic_flow": "AllowClassicFlow", "allow_unauthenticated_identities": "AllowUnauthenticatedIdentities", @@ -347,7 +355,7 @@ func identityPoolResource(ctx context.Context) (resource.Resource, error) { "cognito_identity_providers": "CognitoIdentityProviders", "cognito_streams": "CognitoStreams", "developer_provider_name": "DeveloperProviderName", - "id": "Id", + "identity_pool_id": "Id", "identity_pool_name": "IdentityPoolName", "name": "Name", "open_id_connect_provider_ar_ns": "OpenIdConnectProviderARNs", diff --git a/internal/aws/cognito/identity_pool_singular_data_source_gen.go b/internal/aws/cognito/identity_pool_singular_data_source_gen.go index 93fc1506d..2700abe79 100644 --- a/internal/aws/cognito/identity_pool_singular_data_source_gen.go +++ b/internal/aws/cognito/identity_pool_singular_data_source_gen.go @@ -148,7 +148,7 @@ func identityPoolDataSource(ctx context.Context) (datasource.DataSource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "identity_pool_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: IdentityPoolName @@ -268,7 +268,7 @@ func identityPoolDataSource(ctx context.Context) (datasource.DataSource, error) "cognito_identity_providers": "CognitoIdentityProviders", "cognito_streams": "CognitoStreams", "developer_provider_name": "DeveloperProviderName", - "id": "Id", + "identity_pool_id": "Id", "identity_pool_name": "IdentityPoolName", "name": "Name", "open_id_connect_provider_ar_ns": "OpenIdConnectProviderARNs", diff --git a/internal/aws/cognito/log_delivery_configuration_resource_gen.go b/internal/aws/cognito/log_delivery_configuration_resource_gen.go index 1fdf63799..a5764e259 100644 --- a/internal/aws/cognito/log_delivery_configuration_resource_gen.go +++ b/internal/aws/cognito/log_delivery_configuration_resource_gen.go @@ -32,7 +32,7 @@ func logDeliveryConfigurationResource(ctx context.Context) (resource.Resource, e // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "log_delivery_configuration_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -124,6 +124,15 @@ func logDeliveryConfigurationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::Cognito::LogDeliveryConfiguration", Version: 1, @@ -134,12 +143,11 @@ func logDeliveryConfigurationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::Cognito::LogDeliveryConfiguration").WithTerraformTypeName("awscc_cognito_log_delivery_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cloudwatch_logs_configuration": "CloudWatchLogsConfiguration", "event_source": "EventSource", - "id": "Id", "log_configurations": "LogConfigurations", + "log_delivery_configuration_id": "Id", "log_group_arn": "LogGroupArn", "log_level": "LogLevel", "user_pool_id": "UserPoolId", diff --git a/internal/aws/cognito/log_delivery_configuration_singular_data_source_gen.go b/internal/aws/cognito/log_delivery_configuration_singular_data_source_gen.go index a1b969a4f..290cef77a 100644 --- a/internal/aws/cognito/log_delivery_configuration_singular_data_source_gen.go +++ b/internal/aws/cognito/log_delivery_configuration_singular_data_source_gen.go @@ -28,7 +28,7 @@ func logDeliveryConfigurationDataSource(ctx context.Context) (datasource.DataSou // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "log_delivery_configuration_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LogConfigurations @@ -111,8 +111,8 @@ func logDeliveryConfigurationDataSource(ctx context.Context) (datasource.DataSou opts = opts.WithAttributeNameMap(map[string]string{ "cloudwatch_logs_configuration": "CloudWatchLogsConfiguration", "event_source": "EventSource", - "id": "Id", "log_configurations": "LogConfigurations", + "log_delivery_configuration_id": "Id", "log_group_arn": "LogGroupArn", "log_level": "LogLevel", "user_pool_id": "UserPoolId", diff --git a/internal/aws/cognito/user_pool_client_resource_gen.go b/internal/aws/cognito/user_pool_client_resource_gen.go index e75701d54..dbdfe8189 100644 --- a/internal/aws/cognito/user_pool_client_resource_gen.go +++ b/internal/aws/cognito/user_pool_client_resource_gen.go @@ -511,6 +511,7 @@ func userPoolClientResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -529,7 +530,6 @@ func userPoolClientResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Cognito::UserPoolClient").WithTerraformTypeName("awscc_cognito_user_pool_client") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_token": "AccessToken", "access_token_validity": "AccessTokenValidity", diff --git a/internal/aws/cognito/user_pool_risk_configuration_attachment_resource_gen.go b/internal/aws/cognito/user_pool_risk_configuration_attachment_resource_gen.go index 6b20fb5ea..f2d909ab8 100644 --- a/internal/aws/cognito/user_pool_risk_configuration_attachment_resource_gen.go +++ b/internal/aws/cognito/user_pool_risk_configuration_attachment_resource_gen.go @@ -500,6 +500,7 @@ func userPoolRiskConfigurationAttachmentResource(ctx context.Context) (resource. }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -518,7 +519,6 @@ func userPoolRiskConfigurationAttachmentResource(ctx context.Context) (resource. opts = opts.WithCloudFormationTypeName("AWS::Cognito::UserPoolRiskConfigurationAttachment").WithTerraformTypeName("awscc_cognito_user_pool_risk_configuration_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_takeover_risk_configuration": "AccountTakeoverRiskConfiguration", "actions": "Actions", diff --git a/internal/aws/cognito/user_pool_user_resource_gen.go b/internal/aws/cognito/user_pool_user_resource_gen.go index 58d8144d8..463f9ba83 100644 --- a/internal/aws/cognito/user_pool_user_resource_gen.go +++ b/internal/aws/cognito/user_pool_user_resource_gen.go @@ -221,6 +221,7 @@ func userPoolUserResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -239,7 +240,6 @@ func userPoolUserResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Cognito::UserPoolUser").WithTerraformTypeName("awscc_cognito_user_pool_user") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "client_metadata": "ClientMetadata", "desired_delivery_mediums": "DesiredDeliveryMediums", diff --git a/internal/aws/cognito/user_pool_user_to_group_attachment_resource_gen.go b/internal/aws/cognito/user_pool_user_to_group_attachment_resource_gen.go index e172f0158..5965a25c9 100644 --- a/internal/aws/cognito/user_pool_user_to_group_attachment_resource_gen.go +++ b/internal/aws/cognito/user_pool_user_to_group_attachment_resource_gen.go @@ -62,6 +62,7 @@ func userPoolUserToGroupAttachmentResource(ctx context.Context) (resource.Resour }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -80,7 +81,6 @@ func userPoolUserToGroupAttachmentResource(ctx context.Context) (resource.Resour opts = opts.WithCloudFormationTypeName("AWS::Cognito::UserPoolUserToGroupAttachment").WithTerraformTypeName("awscc_cognito_user_pool_user_to_group_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "group_name": "GroupName", "user_pool_id": "UserPoolId", diff --git a/internal/aws/comprehend/document_classifier_resource_gen.go b/internal/aws/comprehend/document_classifier_resource_gen.go index 454f181ed..8ce17513c 100644 --- a/internal/aws/comprehend/document_classifier_resource_gen.go +++ b/internal/aws/comprehend/document_classifier_resource_gen.go @@ -728,6 +728,7 @@ func documentClassifierResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -746,7 +747,6 @@ func documentClassifierResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Comprehend::DocumentClassifier").WithTerraformTypeName("awscc_comprehend_document_classifier") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "attribute_names": "AttributeNames", diff --git a/internal/aws/comprehend/flywheel_resource_gen.go b/internal/aws/comprehend/flywheel_resource_gen.go index 10526e00a..6f2cc087b 100644 --- a/internal/aws/comprehend/flywheel_resource_gen.go +++ b/internal/aws/comprehend/flywheel_resource_gen.go @@ -501,6 +501,7 @@ func flywheelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -519,7 +520,6 @@ func flywheelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Comprehend::Flywheel").WithTerraformTypeName("awscc_comprehend_flywheel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "active_model_arn": "ActiveModelArn", "arn": "Arn", diff --git a/internal/aws/config/aggregation_authorization_resource_gen.go b/internal/aws/config/aggregation_authorization_resource_gen.go index e719d9199..1baea03b1 100644 --- a/internal/aws/config/aggregation_authorization_resource_gen.go +++ b/internal/aws/config/aggregation_authorization_resource_gen.go @@ -146,6 +146,7 @@ func aggregationAuthorizationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -164,7 +165,6 @@ func aggregationAuthorizationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::Config::AggregationAuthorization").WithTerraformTypeName("awscc_config_aggregation_authorization") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation_authorization_arn": "AggregationAuthorizationArn", "authorized_account_id": "AuthorizedAccountId", diff --git a/internal/aws/config/config_rule_resource_gen.go b/internal/aws/config/config_rule_resource_gen.go index d46d82d61..671285188 100644 --- a/internal/aws/config/config_rule_resource_gen.go +++ b/internal/aws/config/config_rule_resource_gen.go @@ -435,6 +435,7 @@ func configRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -453,7 +454,6 @@ func configRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Config::ConfigRule").WithTerraformTypeName("awscc_config_config_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "compliance": "Compliance", diff --git a/internal/aws/config/configuration_aggregator_resource_gen.go b/internal/aws/config/configuration_aggregator_resource_gen.go index 44711d187..be46a3c29 100644 --- a/internal/aws/config/configuration_aggregator_resource_gen.go +++ b/internal/aws/config/configuration_aggregator_resource_gen.go @@ -256,6 +256,7 @@ func configurationAggregatorResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -274,7 +275,6 @@ func configurationAggregatorResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::Config::ConfigurationAggregator").WithTerraformTypeName("awscc_config_configuration_aggregator") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_aggregation_sources": "AccountAggregationSources", "account_ids": "AccountIds", diff --git a/internal/aws/config/conformance_pack_resource_gen.go b/internal/aws/config/conformance_pack_resource_gen.go index 6df44c8e2..c2b7ecc9b 100644 --- a/internal/aws/config/conformance_pack_resource_gen.go +++ b/internal/aws/config/conformance_pack_resource_gen.go @@ -253,6 +253,7 @@ func conformancePackResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -271,7 +272,6 @@ func conformancePackResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Config::ConformancePack").WithTerraformTypeName("awscc_config_conformance_pack") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "conformance_pack_input_parameters": "ConformancePackInputParameters", "conformance_pack_name": "ConformancePackName", diff --git a/internal/aws/config/organization_conformance_pack_resource_gen.go b/internal/aws/config/organization_conformance_pack_resource_gen.go index c5b9a586a..0f3a9e5af 100644 --- a/internal/aws/config/organization_conformance_pack_resource_gen.go +++ b/internal/aws/config/organization_conformance_pack_resource_gen.go @@ -219,6 +219,7 @@ func organizationConformancePackResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -237,7 +238,6 @@ func organizationConformancePackResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::Config::OrganizationConformancePack").WithTerraformTypeName("awscc_config_organization_conformance_pack") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "conformance_pack_input_parameters": "ConformancePackInputParameters", "delivery_s3_bucket": "DeliveryS3Bucket", diff --git a/internal/aws/config/stored_query_resource_gen.go b/internal/aws/config/stored_query_resource_gen.go index 09dad8e9d..5fb884992 100644 --- a/internal/aws/config/stored_query_resource_gen.go +++ b/internal/aws/config/stored_query_resource_gen.go @@ -179,6 +179,7 @@ func storedQueryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -197,7 +198,6 @@ func storedQueryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Config::StoredQuery").WithTerraformTypeName("awscc_config_stored_query") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "query_arn": "QueryArn", diff --git a/internal/aws/connect/approved_origin_resource_gen.go b/internal/aws/connect/approved_origin_resource_gen.go index af23fdde8..a8f8b2045 100644 --- a/internal/aws/connect/approved_origin_resource_gen.go +++ b/internal/aws/connect/approved_origin_resource_gen.go @@ -68,6 +68,7 @@ func approvedOriginResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -86,7 +87,6 @@ func approvedOriginResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::ApprovedOrigin").WithTerraformTypeName("awscc_connect_approved_origin") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "instance_id": "InstanceId", "origin": "Origin", diff --git a/internal/aws/connect/contact_flow_module_resource_gen.go b/internal/aws/connect/contact_flow_module_resource_gen.go index 6b34cab31..095f0a926 100644 --- a/internal/aws/connect/contact_flow_module_resource_gen.go +++ b/internal/aws/connect/contact_flow_module_resource_gen.go @@ -219,6 +219,7 @@ func contactFlowModuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -237,7 +238,6 @@ func contactFlowModuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::ContactFlowModule").WithTerraformTypeName("awscc_connect_contact_flow_module") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "contact_flow_module_arn": "ContactFlowModuleArn", "content": "Content", diff --git a/internal/aws/connect/contact_flow_resource_gen.go b/internal/aws/connect/contact_flow_resource_gen.go index 7abaf9338..8b98c1f43 100644 --- a/internal/aws/connect/contact_flow_resource_gen.go +++ b/internal/aws/connect/contact_flow_resource_gen.go @@ -244,6 +244,7 @@ func contactFlowResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -262,7 +263,6 @@ func contactFlowResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::ContactFlow").WithTerraformTypeName("awscc_connect_contact_flow") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "contact_flow_arn": "ContactFlowArn", "content": "Content", diff --git a/internal/aws/connect/hours_of_operation_resource_gen.go b/internal/aws/connect/hours_of_operation_resource_gen.go index 18f42d733..d46751848 100644 --- a/internal/aws/connect/hours_of_operation_resource_gen.go +++ b/internal/aws/connect/hours_of_operation_resource_gen.go @@ -327,6 +327,7 @@ func hoursOfOperationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -345,7 +346,6 @@ func hoursOfOperationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::HoursOfOperation").WithTerraformTypeName("awscc_connect_hours_of_operation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "config": "Config", "day": "Day", diff --git a/internal/aws/connect/instance_plural_data_source_gen.go b/internal/aws/connect/instance_plural_data_source_gen.go new file mode 100644 index 000000000..fd0161e53 --- /dev/null +++ b/internal/aws/connect/instance_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package connect + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_connect_instances", instancesDataSource) +} + +// instancesDataSource returns the Terraform awscc_connect_instances data source. +// This Terraform data source corresponds to the CloudFormation AWS::Connect::Instance resource. +func instancesDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::Connect::Instance", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Connect::Instance").WithTerraformTypeName("awscc_connect_instances") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/connect/instance_plural_data_source_gen_test.go b/internal/aws/connect/instance_plural_data_source_gen_test.go new file mode 100644 index 000000000..583fa6b32 --- /dev/null +++ b/internal/aws/connect/instance_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package connect_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSConnectInstancesDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Connect::Instance", "awscc_connect_instances", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/connect/instance_resource_gen.go b/internal/aws/connect/instance_resource_gen.go new file mode 100644 index 000000000..700ddae86 --- /dev/null +++ b/internal/aws/connect/instance_resource_gen.go @@ -0,0 +1,403 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package connect + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_connect_instance", instanceResource) +} + +// instanceResource returns the Terraform awscc_connect_instance resource. +// This Terraform resource corresponds to the CloudFormation AWS::Connect::Instance resource. +func instanceResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "An instanceArn is automatically generated on creation based on instanceId.", + // "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "An instanceArn is automatically generated on creation based on instanceId.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Attributes + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "The attributes for the instance.", + // "properties": { + // "AutoResolveBestVoices": { + // "description": "Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance.", + // "type": "boolean" + // }, + // "ContactLens": { + // "description": "Boolean flag which enables CONTACT_LENS on an instance.", + // "type": "boolean" + // }, + // "ContactflowLogs": { + // "description": "Boolean flag which enables CONTACTFLOW_LOGS on an instance.", + // "type": "boolean" + // }, + // "EarlyMedia": { + // "description": "Boolean flag which enables EARLY_MEDIA on an instance.", + // "type": "boolean" + // }, + // "InboundCalls": { + // "description": "Mandatory element which enables inbound calls on new instance.", + // "type": "boolean" + // }, + // "OutboundCalls": { + // "description": "Mandatory element which enables outbound calls on new instance.", + // "type": "boolean" + // }, + // "UseCustomTTSVoices": { + // "description": "Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance.", + // "type": "boolean" + // } + // }, + // "required": [ + // "InboundCalls", + // "OutboundCalls" + // ], + // "type": "object" + // } + "attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutoResolveBestVoices + "auto_resolve_best_voices": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ContactLens + "contact_lens": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables CONTACT_LENS on an instance.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ContactflowLogs + "contactflow_logs": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables CONTACTFLOW_LOGS on an instance.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EarlyMedia + "early_media": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables EARLY_MEDIA on an instance.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InboundCalls + "inbound_calls": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Mandatory element which enables inbound calls on new instance.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: OutboundCalls + "outbound_calls": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Mandatory element which enables outbound calls on new instance.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: UseCustomTTSVoices + "use_custom_tts_voices": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "The attributes for the instance.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedTime + // CloudFormation resource type schema: + // + // { + // "description": "Timestamp of instance creation logged as part of instance creation.", + // "format": "date-time", + // "type": "string" + // } + "created_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: timetypes.RFC3339Type{}, + Description: "Timestamp of instance creation logged as part of instance creation.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DirectoryId + // CloudFormation resource type schema: + // + // { + // "description": "Existing directoryId user wants to map to the new Connect instance.", + // "maxLength": 12, + // "minLength": 12, + // "pattern": "^d-[0-9a-f]{10}$", + // "type": "string" + // } + "directory_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Existing directoryId user wants to map to the new Connect instance.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(12, 12), + stringvalidator.RegexMatches(regexp.MustCompile("^d-[0-9a-f]{10}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // DirectoryId is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "An instanceId is automatically generated on creation and assigned as the unique identifier.", + // "type": "string" + // } + "instance_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "An instanceId is automatically generated on creation and assigned as the unique identifier.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: IdentityManagementType + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the type of directory integration for new instance.", + // "enum": [ + // "SAML", + // "CONNECT_MANAGED", + // "EXISTING_DIRECTORY" + // ], + // "type": "string" + // } + "identity_management_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the type of directory integration for new instance.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "SAML", + "CONNECT_MANAGED", + "EXISTING_DIRECTORY", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InstanceAlias + // CloudFormation resource type schema: + // + // { + // "description": "Alias of the new directory created as part of new instance creation.", + // "maxLength": 62, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + "instance_alias": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Alias of the new directory created as part of new instance creation.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 62), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InstanceStatus + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the creation status of new instance.", + // "enum": [ + // "CREATION_IN_PROGRESS", + // "CREATION_FAILED", + // "ACTIVE" + // ], + // "type": "string" + // } + "instance_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the creation status of new instance.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceRole + // CloudFormation resource type schema: + // + // { + // "description": "Service linked role created as part of instance creation.", + // "type": "string" + // } + "service_role": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Service linked role created as part of instance creation.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::Connect::Instance", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Connect::Instance").WithTerraformTypeName("awscc_connect_instance") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "attributes": "Attributes", + "auto_resolve_best_voices": "AutoResolveBestVoices", + "contact_lens": "ContactLens", + "contactflow_logs": "ContactflowLogs", + "created_time": "CreatedTime", + "directory_id": "DirectoryId", + "early_media": "EarlyMedia", + "identity_management_type": "IdentityManagementType", + "inbound_calls": "InboundCalls", + "instance_alias": "InstanceAlias", + "instance_id": "Id", + "instance_status": "InstanceStatus", + "key": "Key", + "outbound_calls": "OutboundCalls", + "service_role": "ServiceRole", + "tags": "Tags", + "use_custom_tts_voices": "UseCustomTTSVoices", + "value": "Value", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/DirectoryId", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/connect/instance_resource_gen_test.go b/internal/aws/connect/instance_resource_gen_test.go new file mode 100644 index 000000000..8946a4d07 --- /dev/null +++ b/internal/aws/connect/instance_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package connect_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSConnectInstance_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Connect::Instance", "awscc_connect_instance", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/connect/instance_singular_data_source_gen.go b/internal/aws/connect/instance_singular_data_source_gen.go new file mode 100644 index 000000000..9af2c1e63 --- /dev/null +++ b/internal/aws/connect/instance_singular_data_source_gen.go @@ -0,0 +1,311 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package connect + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_connect_instance", instanceDataSource) +} + +// instanceDataSource returns the Terraform awscc_connect_instance data source. +// This Terraform data source corresponds to the CloudFormation AWS::Connect::Instance resource. +func instanceDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "An instanceArn is automatically generated on creation based on instanceId.", + // "pattern": "^arn:aws[-a-z0-9]*:connect:[-a-z0-9]*:[0-9]{12}:instance/[-a-zA-Z0-9]*$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "An instanceArn is automatically generated on creation based on instanceId.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Attributes + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "The attributes for the instance.", + // "properties": { + // "AutoResolveBestVoices": { + // "description": "Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance.", + // "type": "boolean" + // }, + // "ContactLens": { + // "description": "Boolean flag which enables CONTACT_LENS on an instance.", + // "type": "boolean" + // }, + // "ContactflowLogs": { + // "description": "Boolean flag which enables CONTACTFLOW_LOGS on an instance.", + // "type": "boolean" + // }, + // "EarlyMedia": { + // "description": "Boolean flag which enables EARLY_MEDIA on an instance.", + // "type": "boolean" + // }, + // "InboundCalls": { + // "description": "Mandatory element which enables inbound calls on new instance.", + // "type": "boolean" + // }, + // "OutboundCalls": { + // "description": "Mandatory element which enables outbound calls on new instance.", + // "type": "boolean" + // }, + // "UseCustomTTSVoices": { + // "description": "Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance.", + // "type": "boolean" + // } + // }, + // "required": [ + // "InboundCalls", + // "OutboundCalls" + // ], + // "type": "object" + // } + "attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutoResolveBestVoices + "auto_resolve_best_voices": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables AUTO_RESOLVE_BEST_VOICES on an instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ContactLens + "contact_lens": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables CONTACT_LENS on an instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ContactflowLogs + "contactflow_logs": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables CONTACTFLOW_LOGS on an instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EarlyMedia + "early_media": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables EARLY_MEDIA on an instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InboundCalls + "inbound_calls": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Mandatory element which enables inbound calls on new instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OutboundCalls + "outbound_calls": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Mandatory element which enables outbound calls on new instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UseCustomTTSVoices + "use_custom_tts_voices": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Boolean flag which enables USE_CUSTOM_TTS_VOICES on an instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "The attributes for the instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedTime + // CloudFormation resource type schema: + // + // { + // "description": "Timestamp of instance creation logged as part of instance creation.", + // "format": "date-time", + // "type": "string" + // } + "created_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: timetypes.RFC3339Type{}, + Description: "Timestamp of instance creation logged as part of instance creation.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DirectoryId + // CloudFormation resource type schema: + // + // { + // "description": "Existing directoryId user wants to map to the new Connect instance.", + // "maxLength": 12, + // "minLength": 12, + // "pattern": "^d-[0-9a-f]{10}$", + // "type": "string" + // } + "directory_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Existing directoryId user wants to map to the new Connect instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "An instanceId is automatically generated on creation and assigned as the unique identifier.", + // "type": "string" + // } + "instance_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "An instanceId is automatically generated on creation and assigned as the unique identifier.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: IdentityManagementType + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the type of directory integration for new instance.", + // "enum": [ + // "SAML", + // "CONNECT_MANAGED", + // "EXISTING_DIRECTORY" + // ], + // "type": "string" + // } + "identity_management_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the type of directory integration for new instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InstanceAlias + // CloudFormation resource type schema: + // + // { + // "description": "Alias of the new directory created as part of new instance creation.", + // "maxLength": 62, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + "instance_alias": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Alias of the new directory created as part of new instance creation.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InstanceStatus + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the creation status of new instance.", + // "enum": [ + // "CREATION_IN_PROGRESS", + // "CREATION_FAILED", + // "ACTIVE" + // ], + // "type": "string" + // } + "instance_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the creation status of new instance.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceRole + // CloudFormation resource type schema: + // + // { + // "description": "Service linked role created as part of instance creation.", + // "type": "string" + // } + "service_role": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Service linked role created as part of instance creation.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::Connect::Instance", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Connect::Instance").WithTerraformTypeName("awscc_connect_instance") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "attributes": "Attributes", + "auto_resolve_best_voices": "AutoResolveBestVoices", + "contact_lens": "ContactLens", + "contactflow_logs": "ContactflowLogs", + "created_time": "CreatedTime", + "directory_id": "DirectoryId", + "early_media": "EarlyMedia", + "identity_management_type": "IdentityManagementType", + "inbound_calls": "InboundCalls", + "instance_alias": "InstanceAlias", + "instance_id": "Id", + "instance_status": "InstanceStatus", + "key": "Key", + "outbound_calls": "OutboundCalls", + "service_role": "ServiceRole", + "tags": "Tags", + "use_custom_tts_voices": "UseCustomTTSVoices", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/connect/instance_singular_data_source_gen_test.go b/internal/aws/connect/instance_singular_data_source_gen_test.go new file mode 100644 index 000000000..fa4a68945 --- /dev/null +++ b/internal/aws/connect/instance_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package connect_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSConnectInstanceDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Connect::Instance", "awscc_connect_instance", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSConnectInstanceDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Connect::Instance", "awscc_connect_instance", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/connect/instance_storage_config_resource_gen.go b/internal/aws/connect/instance_storage_config_resource_gen.go index 4c3afad66..fd69758ec 100644 --- a/internal/aws/connect/instance_storage_config_resource_gen.go +++ b/internal/aws/connect/instance_storage_config_resource_gen.go @@ -384,6 +384,7 @@ func instanceStorageConfigResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -402,7 +403,6 @@ func instanceStorageConfigResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::Connect::InstanceStorageConfig").WithTerraformTypeName("awscc_connect_instance_storage_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_id": "AssociationId", "bucket_name": "BucketName", diff --git a/internal/aws/connect/integration_association_resource_gen.go b/internal/aws/connect/integration_association_resource_gen.go index e1331f2bb..88bdfe726 100644 --- a/internal/aws/connect/integration_association_resource_gen.go +++ b/internal/aws/connect/integration_association_resource_gen.go @@ -110,6 +110,7 @@ func integrationAssociationResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -128,7 +129,6 @@ func integrationAssociationResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::Connect::IntegrationAssociation").WithTerraformTypeName("awscc_connect_integration_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "instance_id": "InstanceId", "integration_arn": "IntegrationArn", diff --git a/internal/aws/connect/phone_number_resource_gen.go b/internal/aws/connect/phone_number_resource_gen.go index 4966767aa..088248102 100644 --- a/internal/aws/connect/phone_number_resource_gen.go +++ b/internal/aws/connect/phone_number_resource_gen.go @@ -237,6 +237,7 @@ func phoneNumberResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -255,7 +256,6 @@ func phoneNumberResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::PhoneNumber").WithTerraformTypeName("awscc_connect_phone_number") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "country_code": "CountryCode", diff --git a/internal/aws/connect/predefined_attribute_resource_gen.go b/internal/aws/connect/predefined_attribute_resource_gen.go index a0966dafa..105edbb5e 100644 --- a/internal/aws/connect/predefined_attribute_resource_gen.go +++ b/internal/aws/connect/predefined_attribute_resource_gen.go @@ -115,6 +115,7 @@ func predefinedAttributeResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -133,7 +134,6 @@ func predefinedAttributeResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Connect::PredefinedAttribute").WithTerraformTypeName("awscc_connect_predefined_attribute") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "instance_arn": "InstanceArn", "name": "Name", diff --git a/internal/aws/connect/prompt_resource_gen.go b/internal/aws/connect/prompt_resource_gen.go index 0921f8549..4f1917aa2 100644 --- a/internal/aws/connect/prompt_resource_gen.go +++ b/internal/aws/connect/prompt_resource_gen.go @@ -179,6 +179,7 @@ func promptResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -197,7 +198,6 @@ func promptResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::Prompt").WithTerraformTypeName("awscc_connect_prompt") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "instance_arn": "InstanceArn", diff --git a/internal/aws/connect/queue_resource_gen.go b/internal/aws/connect/queue_resource_gen.go index 55f92907f..35f05bdd4 100644 --- a/internal/aws/connect/queue_resource_gen.go +++ b/internal/aws/connect/queue_resource_gen.go @@ -351,6 +351,7 @@ func queueResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -369,7 +370,6 @@ func queueResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::Queue").WithTerraformTypeName("awscc_connect_queue") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "hours_of_operation_arn": "HoursOfOperationArn", diff --git a/internal/aws/connect/quick_connect_resource_gen.go b/internal/aws/connect/quick_connect_resource_gen.go index 06d98bd9a..486bbf659 100644 --- a/internal/aws/connect/quick_connect_resource_gen.go +++ b/internal/aws/connect/quick_connect_resource_gen.go @@ -351,6 +351,7 @@ func quickConnectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -369,7 +370,6 @@ func quickConnectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::QuickConnect").WithTerraformTypeName("awscc_connect_quick_connect") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "contact_flow_arn": "ContactFlowArn", "description": "Description", diff --git a/internal/aws/connect/routing_profile_resource_gen.go b/internal/aws/connect/routing_profile_resource_gen.go index ada819c8f..9178306eb 100644 --- a/internal/aws/connect/routing_profile_resource_gen.go +++ b/internal/aws/connect/routing_profile_resource_gen.go @@ -424,6 +424,7 @@ func routingProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -442,7 +443,6 @@ func routingProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::RoutingProfile").WithTerraformTypeName("awscc_connect_routing_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_availability_timer": "AgentAvailabilityTimer", "behavior_type": "BehaviorType", diff --git a/internal/aws/connect/security_key_resource_gen.go b/internal/aws/connect/security_key_resource_gen.go index 82f55a726..1253688ee 100644 --- a/internal/aws/connect/security_key_resource_gen.go +++ b/internal/aws/connect/security_key_resource_gen.go @@ -86,6 +86,7 @@ func securityKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -104,7 +105,6 @@ func securityKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::SecurityKey").WithTerraformTypeName("awscc_connect_security_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_id": "AssociationId", "instance_id": "InstanceId", diff --git a/internal/aws/connect/security_profile_resource_gen.go b/internal/aws/connect/security_profile_resource_gen.go index 43c90ce64..b358374ec 100644 --- a/internal/aws/connect/security_profile_resource_gen.go +++ b/internal/aws/connect/security_profile_resource_gen.go @@ -456,6 +456,7 @@ func securityProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -474,7 +475,6 @@ func securityProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::SecurityProfile").WithTerraformTypeName("awscc_connect_security_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_access_control_hierarchy_group_id": "AllowedAccessControlHierarchyGroupId", "allowed_access_control_tags": "AllowedAccessControlTags", diff --git a/internal/aws/connect/task_template_resource_gen.go b/internal/aws/connect/task_template_resource_gen.go index 9e8964ee3..1f50516ae 100644 --- a/internal/aws/connect/task_template_resource_gen.go +++ b/internal/aws/connect/task_template_resource_gen.go @@ -668,6 +668,7 @@ func taskTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -686,7 +687,6 @@ func taskTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::TaskTemplate").WithTerraformTypeName("awscc_connect_task_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "client_token": "ClientToken", diff --git a/internal/aws/connect/traffic_distribution_group_resource_gen.go b/internal/aws/connect/traffic_distribution_group_resource_gen.go index 3cf933c1e..3459482b4 100644 --- a/internal/aws/connect/traffic_distribution_group_resource_gen.go +++ b/internal/aws/connect/traffic_distribution_group_resource_gen.go @@ -209,6 +209,7 @@ func trafficDistributionGroupResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -227,7 +228,6 @@ func trafficDistributionGroupResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::Connect::TrafficDistributionGroup").WithTerraformTypeName("awscc_connect_traffic_distribution_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "instance_arn": "InstanceArn", diff --git a/internal/aws/connect/user_hierarchy_group_resource_gen.go b/internal/aws/connect/user_hierarchy_group_resource_gen.go index 3ed18421f..4da000109 100644 --- a/internal/aws/connect/user_hierarchy_group_resource_gen.go +++ b/internal/aws/connect/user_hierarchy_group_resource_gen.go @@ -161,6 +161,7 @@ func userHierarchyGroupResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -179,7 +180,6 @@ func userHierarchyGroupResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Connect::UserHierarchyGroup").WithTerraformTypeName("awscc_connect_user_hierarchy_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "instance_arn": "InstanceArn", "key": "Key", diff --git a/internal/aws/connect/user_resource_gen.go b/internal/aws/connect/user_resource_gen.go index 1b9e648d0..d506e1c2f 100644 --- a/internal/aws/connect/user_resource_gen.go +++ b/internal/aws/connect/user_resource_gen.go @@ -489,6 +489,7 @@ func userResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -507,7 +508,6 @@ func userResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::User").WithTerraformTypeName("awscc_connect_user") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "after_contact_work_time_limit": "AfterContactWorkTimeLimit", "attribute_name": "AttributeName", diff --git a/internal/aws/connect/view_resource_gen.go b/internal/aws/connect/view_resource_gen.go index 3b3af320d..28440a1b5 100644 --- a/internal/aws/connect/view_resource_gen.go +++ b/internal/aws/connect/view_resource_gen.go @@ -247,6 +247,7 @@ func viewResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -265,7 +266,6 @@ func viewResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::View").WithTerraformTypeName("awscc_connect_view") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "description": "Description", diff --git a/internal/aws/connect/view_version_resource_gen.go b/internal/aws/connect/view_version_resource_gen.go index a4c5d91b3..7a7dbbb87 100644 --- a/internal/aws/connect/view_version_resource_gen.go +++ b/internal/aws/connect/view_version_resource_gen.go @@ -128,6 +128,7 @@ func viewVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -146,7 +147,6 @@ func viewVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Connect::ViewVersion").WithTerraformTypeName("awscc_connect_view_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "version": "Version", "version_description": "VersionDescription", diff --git a/internal/aws/connectcampaigns/campaign_resource_gen.go b/internal/aws/connectcampaigns/campaign_resource_gen.go index 8524f0e64..b954a1903 100644 --- a/internal/aws/connectcampaigns/campaign_resource_gen.go +++ b/internal/aws/connectcampaigns/campaign_resource_gen.go @@ -428,6 +428,7 @@ func campaignResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -446,7 +447,6 @@ func campaignResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ConnectCampaigns::Campaign").WithTerraformTypeName("awscc_connectcampaigns_campaign") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agentless_dialer_config": "AgentlessDialerConfig", "answer_machine_detection_config": "AnswerMachineDetectionConfig", diff --git a/internal/aws/controltower/enabled_control_resource_gen.go b/internal/aws/controltower/enabled_control_resource_gen.go index 35795bd97..e002eff50 100644 --- a/internal/aws/controltower/enabled_control_resource_gen.go +++ b/internal/aws/controltower/enabled_control_resource_gen.go @@ -71,6 +71,7 @@ func enabledControlResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -89,7 +90,6 @@ func enabledControlResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ControlTower::EnabledControl").WithTerraformTypeName("awscc_controltower_enabled_control") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "control_identifier": "ControlIdentifier", "target_identifier": "TargetIdentifier", diff --git a/internal/aws/cur/report_definition_resource_gen.go b/internal/aws/cur/report_definition_resource_gen.go index fee0840c9..d1f69df66 100644 --- a/internal/aws/cur/report_definition_resource_gen.go +++ b/internal/aws/cur/report_definition_resource_gen.go @@ -297,6 +297,7 @@ func reportDefinitionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -315,7 +316,6 @@ func reportDefinitionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CUR::ReportDefinition").WithTerraformTypeName("awscc_cur_report_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "additional_artifacts": "AdditionalArtifacts", "additional_schema_elements": "AdditionalSchemaElements", diff --git a/internal/aws/customerprofiles/calculated_attribute_definition_resource_gen.go b/internal/aws/customerprofiles/calculated_attribute_definition_resource_gen.go index 483e849a4..1b94ce6e1 100644 --- a/internal/aws/customerprofiles/calculated_attribute_definition_resource_gen.go +++ b/internal/aws/customerprofiles/calculated_attribute_definition_resource_gen.go @@ -474,6 +474,7 @@ func calculatedAttributeDefinitionResource(ctx context.Context) (resource.Resour }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -492,7 +493,6 @@ func calculatedAttributeDefinitionResource(ctx context.Context) (resource.Resour opts = opts.WithCloudFormationTypeName("AWS::CustomerProfiles::CalculatedAttributeDefinition").WithTerraformTypeName("awscc_customerprofiles_calculated_attribute_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attribute_details": "AttributeDetails", "attributes": "Attributes", diff --git a/internal/aws/customerprofiles/domain_resource_gen.go b/internal/aws/customerprofiles/domain_resource_gen.go index 28355549a..7641f2361 100644 --- a/internal/aws/customerprofiles/domain_resource_gen.go +++ b/internal/aws/customerprofiles/domain_resource_gen.go @@ -201,6 +201,7 @@ func domainResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -219,7 +220,6 @@ func domainResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CustomerProfiles::Domain").WithTerraformTypeName("awscc_customerprofiles_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "dead_letter_queue_url": "DeadLetterQueueUrl", diff --git a/internal/aws/customerprofiles/event_stream_resource_gen.go b/internal/aws/customerprofiles/event_stream_resource_gen.go index 450085dc4..429d9f25f 100644 --- a/internal/aws/customerprofiles/event_stream_resource_gen.go +++ b/internal/aws/customerprofiles/event_stream_resource_gen.go @@ -254,6 +254,7 @@ func eventStreamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -272,7 +273,6 @@ func eventStreamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CustomerProfiles::EventStream").WithTerraformTypeName("awscc_customerprofiles_event_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "destination_details": "DestinationDetails", diff --git a/internal/aws/customerprofiles/integration_resource_gen.go b/internal/aws/customerprofiles/integration_resource_gen.go index 58469af7a..fad4be540 100644 --- a/internal/aws/customerprofiles/integration_resource_gen.go +++ b/internal/aws/customerprofiles/integration_resource_gen.go @@ -1233,6 +1233,7 @@ func integrationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1251,7 +1252,6 @@ func integrationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CustomerProfiles::Integration").WithTerraformTypeName("awscc_customerprofiles_integration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket_name": "BucketName", "bucket_prefix": "BucketPrefix", diff --git a/internal/aws/customerprofiles/object_type_resource_gen.go b/internal/aws/customerprofiles/object_type_resource_gen.go index 4144429f1..eb8258d90 100644 --- a/internal/aws/customerprofiles/object_type_resource_gen.go +++ b/internal/aws/customerprofiles/object_type_resource_gen.go @@ -542,6 +542,7 @@ func objectTypeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -560,7 +561,6 @@ func objectTypeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::CustomerProfiles::ObjectType").WithTerraformTypeName("awscc_customerprofiles_object_type") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_profile_creation": "AllowProfileCreation", "content_type": "ContentType", diff --git a/internal/aws/databrew/dataset_resource_gen.go b/internal/aws/databrew/dataset_resource_gen.go index 4e5dc8884..c241e6a28 100644 --- a/internal/aws/databrew/dataset_resource_gen.go +++ b/internal/aws/databrew/dataset_resource_gen.go @@ -1030,6 +1030,7 @@ func datasetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1048,7 +1049,6 @@ func datasetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataBrew::Dataset").WithTerraformTypeName("awscc_databrew_dataset") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "catalog_id": "CatalogId", diff --git a/internal/aws/databrew/job_resource_gen.go b/internal/aws/databrew/job_resource_gen.go index 860828105..5c7e76255 100644 --- a/internal/aws/databrew/job_resource_gen.go +++ b/internal/aws/databrew/job_resource_gen.go @@ -1590,6 +1590,7 @@ func jobResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1608,7 +1609,6 @@ func jobResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataBrew::Job").WithTerraformTypeName("awscc_databrew_job") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_statistics": "AllowedStatistics", "bucket": "Bucket", diff --git a/internal/aws/databrew/project_resource_gen.go b/internal/aws/databrew/project_resource_gen.go index 56b65445d..ed8cc9d4a 100644 --- a/internal/aws/databrew/project_resource_gen.go +++ b/internal/aws/databrew/project_resource_gen.go @@ -211,6 +211,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -229,7 +230,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataBrew::Project").WithTerraformTypeName("awscc_databrew_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dataset_name": "DatasetName", "key": "Key", diff --git a/internal/aws/databrew/ruleset_resource_gen.go b/internal/aws/databrew/ruleset_resource_gen.go index 8b95c83d6..ec1f4d266 100644 --- a/internal/aws/databrew/ruleset_resource_gen.go +++ b/internal/aws/databrew/ruleset_resource_gen.go @@ -417,6 +417,7 @@ func rulesetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -435,7 +436,6 @@ func rulesetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataBrew::Ruleset").WithTerraformTypeName("awscc_databrew_ruleset") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "check_expression": "CheckExpression", "column_selectors": "ColumnSelectors", diff --git a/internal/aws/databrew/schedule_resource_gen.go b/internal/aws/databrew/schedule_resource_gen.go index 216b5b3d8..ad8104814 100644 --- a/internal/aws/databrew/schedule_resource_gen.go +++ b/internal/aws/databrew/schedule_resource_gen.go @@ -150,6 +150,7 @@ func scheduleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -168,7 +169,6 @@ func scheduleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataBrew::Schedule").WithTerraformTypeName("awscc_databrew_schedule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cron_expression": "CronExpression", "job_names": "JobNames", diff --git a/internal/aws/datapipeline/pipeline_resource_gen.go b/internal/aws/datapipeline/pipeline_resource_gen.go index 8da6309e8..cdea19500 100644 --- a/internal/aws/datapipeline/pipeline_resource_gen.go +++ b/internal/aws/datapipeline/pipeline_resource_gen.go @@ -385,6 +385,7 @@ func pipelineResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -403,7 +404,6 @@ func pipelineResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataPipeline::Pipeline").WithTerraformTypeName("awscc_datapipeline_pipeline") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "activate": "Activate", "attributes": "Attributes", diff --git a/internal/aws/datasync/agent_resource_gen.go b/internal/aws/datasync/agent_resource_gen.go index fb3a57f1b..70bdd0458 100644 --- a/internal/aws/datasync/agent_resource_gen.go +++ b/internal/aws/datasync/agent_resource_gen.go @@ -262,6 +262,7 @@ func agentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -280,7 +281,6 @@ func agentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::Agent").WithTerraformTypeName("awscc_datasync_agent") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "activation_key": "ActivationKey", "agent_arn": "AgentArn", diff --git a/internal/aws/datasync/location_azure_blob_resource_gen.go b/internal/aws/datasync/location_azure_blob_resource_gen.go index f5c99eadf..fba57d2d4 100644 --- a/internal/aws/datasync/location_azure_blob_resource_gen.go +++ b/internal/aws/datasync/location_azure_blob_resource_gen.go @@ -328,6 +328,7 @@ func locationAzureBlobResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -346,7 +347,6 @@ func locationAzureBlobResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationAzureBlob").WithTerraformTypeName("awscc_datasync_location_azure_blob") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_arns": "AgentArns", "azure_access_tier": "AzureAccessTier", diff --git a/internal/aws/datasync/location_efs_resource_gen.go b/internal/aws/datasync/location_efs_resource_gen.go index 4274bc353..5de83476c 100644 --- a/internal/aws/datasync/location_efs_resource_gen.go +++ b/internal/aws/datasync/location_efs_resource_gen.go @@ -316,6 +316,7 @@ func locationEFSResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -334,7 +335,6 @@ func locationEFSResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationEFS").WithTerraformTypeName("awscc_datasync_location_efs") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_point_arn": "AccessPointArn", "ec_2_config": "Ec2Config", diff --git a/internal/aws/datasync/location_fsx_lustre_resource_gen.go b/internal/aws/datasync/location_fsx_lustre_resource_gen.go index e534c1642..f1cc12755 100644 --- a/internal/aws/datasync/location_fsx_lustre_resource_gen.go +++ b/internal/aws/datasync/location_fsx_lustre_resource_gen.go @@ -212,6 +212,7 @@ func locationFSxLustreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -230,7 +231,6 @@ func locationFSxLustreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationFSxLustre").WithTerraformTypeName("awscc_datasync_location_fsx_lustre") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "fsx_filesystem_arn": "FsxFilesystemArn", "key": "Key", diff --git a/internal/aws/datasync/location_fsx_ontap_resource_gen.go b/internal/aws/datasync/location_fsx_ontap_resource_gen.go index c0d89705d..787dd5395 100644 --- a/internal/aws/datasync/location_fsx_ontap_resource_gen.go +++ b/internal/aws/datasync/location_fsx_ontap_resource_gen.go @@ -421,6 +421,7 @@ func locationFSxONTAPResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -439,7 +440,6 @@ func locationFSxONTAPResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationFSxONTAP").WithTerraformTypeName("awscc_datasync_location_fsx_ontap") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "domain": "Domain", "fsx_filesystem_arn": "FsxFilesystemArn", diff --git a/internal/aws/datasync/location_fsx_open_zfs_resource_gen.go b/internal/aws/datasync/location_fsx_open_zfs_resource_gen.go index 5503413b1..ea8726d93 100644 --- a/internal/aws/datasync/location_fsx_open_zfs_resource_gen.go +++ b/internal/aws/datasync/location_fsx_open_zfs_resource_gen.go @@ -294,6 +294,7 @@ func locationFSxOpenZFSResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -312,7 +313,6 @@ func locationFSxOpenZFSResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationFSxOpenZFS").WithTerraformTypeName("awscc_datasync_location_fsx_open_zfs") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "fsx_filesystem_arn": "FsxFilesystemArn", "key": "Key", diff --git a/internal/aws/datasync/location_fsx_windows_resource_gen.go b/internal/aws/datasync/location_fsx_windows_resource_gen.go index fa3082207..645cbad3a 100644 --- a/internal/aws/datasync/location_fsx_windows_resource_gen.go +++ b/internal/aws/datasync/location_fsx_windows_resource_gen.go @@ -273,6 +273,7 @@ func locationFSxWindowsResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -291,7 +292,6 @@ func locationFSxWindowsResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationFSxWindows").WithTerraformTypeName("awscc_datasync_location_fsx_windows") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "domain": "Domain", "fsx_filesystem_arn": "FsxFilesystemArn", diff --git a/internal/aws/datasync/location_hdfs_resource_gen.go b/internal/aws/datasync/location_hdfs_resource_gen.go index 0ee7d47ff..68fb33ba4 100644 --- a/internal/aws/datasync/location_hdfs_resource_gen.go +++ b/internal/aws/datasync/location_hdfs_resource_gen.go @@ -496,6 +496,7 @@ func locationHDFSResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -514,7 +515,6 @@ func locationHDFSResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationHDFS").WithTerraformTypeName("awscc_datasync_location_hdfs") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_arns": "AgentArns", "authentication_type": "AuthenticationType", diff --git a/internal/aws/datasync/location_nfs_resource_gen.go b/internal/aws/datasync/location_nfs_resource_gen.go index 5c4d625c4..aa2bfe81a 100644 --- a/internal/aws/datasync/location_nfs_resource_gen.go +++ b/internal/aws/datasync/location_nfs_resource_gen.go @@ -277,6 +277,7 @@ func locationNFSResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -295,7 +296,6 @@ func locationNFSResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationNFS").WithTerraformTypeName("awscc_datasync_location_nfs") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_arns": "AgentArns", "key": "Key", diff --git a/internal/aws/datasync/location_object_storage_resource_gen.go b/internal/aws/datasync/location_object_storage_resource_gen.go index ddcf42ef9..1eab80563 100644 --- a/internal/aws/datasync/location_object_storage_resource_gen.go +++ b/internal/aws/datasync/location_object_storage_resource_gen.go @@ -343,6 +343,7 @@ func locationObjectStorageResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -361,7 +362,6 @@ func locationObjectStorageResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationObjectStorage").WithTerraformTypeName("awscc_datasync_location_object_storage") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_key": "AccessKey", "agent_arns": "AgentArns", diff --git a/internal/aws/datasync/location_s3_resource_gen.go b/internal/aws/datasync/location_s3_resource_gen.go index 0f7d43ba1..428e02765 100644 --- a/internal/aws/datasync/location_s3_resource_gen.go +++ b/internal/aws/datasync/location_s3_resource_gen.go @@ -253,6 +253,7 @@ func locationS3Resource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -271,7 +272,6 @@ func locationS3Resource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationS3").WithTerraformTypeName("awscc_datasync_location_s3") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket_access_role_arn": "BucketAccessRoleArn", "key": "Key", diff --git a/internal/aws/datasync/location_smb_resource_gen.go b/internal/aws/datasync/location_smb_resource_gen.go index 395096b6a..dbabd6800 100644 --- a/internal/aws/datasync/location_smb_resource_gen.go +++ b/internal/aws/datasync/location_smb_resource_gen.go @@ -322,6 +322,7 @@ func locationSMBResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -340,7 +341,6 @@ func locationSMBResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::LocationSMB").WithTerraformTypeName("awscc_datasync_location_smb") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_arns": "AgentArns", "domain": "Domain", diff --git a/internal/aws/datasync/storage_system_resource_gen.go b/internal/aws/datasync/storage_system_resource_gen.go index 3380b685f..4f1dd7d8c 100644 --- a/internal/aws/datasync/storage_system_resource_gen.go +++ b/internal/aws/datasync/storage_system_resource_gen.go @@ -350,6 +350,7 @@ func storageSystemResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -368,7 +369,6 @@ func storageSystemResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::StorageSystem").WithTerraformTypeName("awscc_datasync_storage_system") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "agent_arns": "AgentArns", "cloudwatch_log_group_arn": "CloudWatchLogGroupArn", diff --git a/internal/aws/datasync/task_resource_gen.go b/internal/aws/datasync/task_resource_gen.go index 308d05540..5ad1d1a0e 100644 --- a/internal/aws/datasync/task_resource_gen.go +++ b/internal/aws/datasync/task_resource_gen.go @@ -1364,6 +1364,7 @@ func taskResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1382,7 +1383,6 @@ func taskResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataSync::Task").WithTerraformTypeName("awscc_datasync_task") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "atime": "Atime", diff --git a/internal/aws/datazone/data_source_resource_gen.go b/internal/aws/datazone/data_source_resource_gen.go index 649b6e3a1..ec6d5a5b9 100644 --- a/internal/aws/datazone/data_source_resource_gen.go +++ b/internal/aws/datazone/data_source_resource_gen.go @@ -726,7 +726,7 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "data_source_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier of the data source.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -983,6 +983,15 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Definition of AWS::DataZone::DataSource Resource Type", Version: 1, @@ -993,7 +1002,6 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataZone::DataSource").WithTerraformTypeName("awscc_datazone_data_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "asset_forms_input": "AssetFormsInput", "cluster_name": "ClusterName", @@ -1001,6 +1009,7 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { "content": "Content", "created_at": "CreatedAt", "data_access_role": "DataAccessRole", + "data_source_id": "Id", "database_name": "DatabaseName", "description": "Description", "domain_id": "DomainId", @@ -1013,7 +1022,6 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { "filter_expressions": "FilterExpressions", "form_name": "FormName", "glue_run_configuration": "GlueRunConfiguration", - "id": "Id", "last_run_asset_count": "LastRunAssetCount", "last_run_at": "LastRunAt", "last_run_status": "LastRunStatus", diff --git a/internal/aws/datazone/data_source_singular_data_source_gen.go b/internal/aws/datazone/data_source_singular_data_source_gen.go index 804190d89..21714fe3e 100644 --- a/internal/aws/datazone/data_source_singular_data_source_gen.go +++ b/internal/aws/datazone/data_source_singular_data_source_gen.go @@ -545,7 +545,7 @@ func dataSourceDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "data_source_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier of the data source.", Computed: true, }, /*END ATTRIBUTE*/ @@ -761,6 +761,7 @@ func dataSourceDataSource(ctx context.Context) (datasource.DataSource, error) { "content": "Content", "created_at": "CreatedAt", "data_access_role": "DataAccessRole", + "data_source_id": "Id", "database_name": "DatabaseName", "description": "Description", "domain_id": "DomainId", @@ -773,7 +774,6 @@ func dataSourceDataSource(ctx context.Context) (datasource.DataSource, error) { "filter_expressions": "FilterExpressions", "form_name": "FormName", "glue_run_configuration": "GlueRunConfiguration", - "id": "Id", "last_run_asset_count": "LastRunAssetCount", "last_run_at": "LastRunAt", "last_run_status": "LastRunStatus", diff --git a/internal/aws/datazone/domain_resource_gen.go b/internal/aws/datazone/domain_resource_gen.go index 170d642ee..a32d288a0 100644 --- a/internal/aws/datazone/domain_resource_gen.go +++ b/internal/aws/datazone/domain_resource_gen.go @@ -99,7 +99,7 @@ func domainResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^dzd[-_][a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "domain_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The id of the Amazon DataZone domain.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -334,6 +334,15 @@ func domainResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "A domain is an organizing entity for connecting together assets, users, and their projects", Version: 1, @@ -344,13 +353,12 @@ func domainResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataZone::Domain").WithTerraformTypeName("awscc_datazone_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_at": "CreatedAt", "description": "Description", "domain_execution_role": "DomainExecutionRole", - "id": "Id", + "domain_id": "Id", "key": "Key", "kms_key_identifier": "KmsKeyIdentifier", "last_updated_at": "LastUpdatedAt", diff --git a/internal/aws/datazone/domain_singular_data_source_gen.go b/internal/aws/datazone/domain_singular_data_source_gen.go index 375c1c848..97c80a6bc 100644 --- a/internal/aws/datazone/domain_singular_data_source_gen.go +++ b/internal/aws/datazone/domain_singular_data_source_gen.go @@ -79,7 +79,7 @@ func domainDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^dzd[-_][a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "domain_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The id of the Amazon DataZone domain.", Computed: true, }, /*END ATTRIBUTE*/ @@ -275,7 +275,7 @@ func domainDataSource(ctx context.Context) (datasource.DataSource, error) { "created_at": "CreatedAt", "description": "Description", "domain_execution_role": "DomainExecutionRole", - "id": "Id", + "domain_id": "Id", "key": "Key", "kms_key_identifier": "KmsKeyIdentifier", "last_updated_at": "LastUpdatedAt", diff --git a/internal/aws/datazone/environment_blueprint_configuration_resource_gen.go b/internal/aws/datazone/environment_blueprint_configuration_resource_gen.go index fe0ed1fc1..ae1117b46 100644 --- a/internal/aws/datazone/environment_blueprint_configuration_resource_gen.go +++ b/internal/aws/datazone/environment_blueprint_configuration_resource_gen.go @@ -243,6 +243,7 @@ func environmentBlueprintConfigurationResource(ctx context.Context) (resource.Re }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -261,7 +262,6 @@ func environmentBlueprintConfigurationResource(ctx context.Context) (resource.Re opts = opts.WithCloudFormationTypeName("AWS::DataZone::EnvironmentBlueprintConfiguration").WithTerraformTypeName("awscc_datazone_environment_blueprint_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "domain_id": "DomainId", diff --git a/internal/aws/datazone/environment_profile_resource_gen.go b/internal/aws/datazone/environment_profile_resource_gen.go index 4abea5d0d..8d66f9532 100644 --- a/internal/aws/datazone/environment_profile_resource_gen.go +++ b/internal/aws/datazone/environment_profile_resource_gen.go @@ -184,7 +184,7 @@ func environmentProfileResource(ctx context.Context) (resource.Resource, error) // "pattern": "^[a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "environment_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of this Amazon DataZone environment profile.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -315,6 +315,15 @@ func environmentProfileResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "AWS Datazone Environment Profile is pre-configured set of resources and blueprints that provide reusable templates for creating environments.", Version: 1, @@ -325,7 +334,6 @@ func environmentProfileResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::DataZone::EnvironmentProfile").WithTerraformTypeName("awscc_datazone_environment_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "aws_account_id": "AwsAccountId", "aws_account_region": "AwsAccountRegion", @@ -336,7 +344,7 @@ func environmentProfileResource(ctx context.Context) (resource.Resource, error) "domain_identifier": "DomainIdentifier", "environment_blueprint_id": "EnvironmentBlueprintId", "environment_blueprint_identifier": "EnvironmentBlueprintIdentifier", - "id": "Id", + "environment_profile_id": "Id", "name": "Name", "project_id": "ProjectId", "project_identifier": "ProjectIdentifier", diff --git a/internal/aws/datazone/environment_profile_singular_data_source_gen.go b/internal/aws/datazone/environment_profile_singular_data_source_gen.go index 3012f8a69..13110ca49 100644 --- a/internal/aws/datazone/environment_profile_singular_data_source_gen.go +++ b/internal/aws/datazone/environment_profile_singular_data_source_gen.go @@ -139,7 +139,7 @@ func environmentProfileDataSource(ctx context.Context) (datasource.DataSource, e // "pattern": "^[a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "environment_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of this Amazon DataZone environment profile.", Computed: true, }, /*END ATTRIBUTE*/ @@ -261,7 +261,7 @@ func environmentProfileDataSource(ctx context.Context) (datasource.DataSource, e "domain_identifier": "DomainIdentifier", "environment_blueprint_id": "EnvironmentBlueprintId", "environment_blueprint_identifier": "EnvironmentBlueprintIdentifier", - "id": "Id", + "environment_profile_id": "Id", "name": "Name", "project_id": "ProjectId", "project_identifier": "ProjectIdentifier", diff --git a/internal/aws/datazone/project_resource_gen.go b/internal/aws/datazone/project_resource_gen.go index 1ee5de80b..6333986bf 100644 --- a/internal/aws/datazone/project_resource_gen.go +++ b/internal/aws/datazone/project_resource_gen.go @@ -152,7 +152,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "project_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the Amazon DataZone project.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -195,6 +195,15 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Amazon DataZone projects are business use case?based groupings of people, assets (data), and tools used to simplify access to the AWS analytics.", Version: 1, @@ -205,7 +214,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DataZone::Project").WithTerraformTypeName("awscc_datazone_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "created_by": "CreatedBy", @@ -213,9 +221,9 @@ func projectResource(ctx context.Context) (resource.Resource, error) { "domain_id": "DomainId", "domain_identifier": "DomainIdentifier", "glossary_terms": "GlossaryTerms", - "id": "Id", "last_updated_at": "LastUpdatedAt", "name": "Name", + "project_id": "Id", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/datazone/project_singular_data_source_gen.go b/internal/aws/datazone/project_singular_data_source_gen.go index 70858429a..90978581e 100644 --- a/internal/aws/datazone/project_singular_data_source_gen.go +++ b/internal/aws/datazone/project_singular_data_source_gen.go @@ -111,7 +111,7 @@ func projectDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[a-zA-Z0-9_-]{1,36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "project_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the Amazon DataZone project.", Computed: true, }, /*END ATTRIBUTE*/ @@ -165,9 +165,9 @@ func projectDataSource(ctx context.Context) (datasource.DataSource, error) { "domain_id": "DomainId", "domain_identifier": "DomainIdentifier", "glossary_terms": "GlossaryTerms", - "id": "Id", "last_updated_at": "LastUpdatedAt", "name": "Name", + "project_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/detective/graph_resource_gen.go b/internal/aws/detective/graph_resource_gen.go index b3042a7d7..79df73d1d 100644 --- a/internal/aws/detective/graph_resource_gen.go +++ b/internal/aws/detective/graph_resource_gen.go @@ -121,6 +121,7 @@ func graphResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -139,7 +140,6 @@ func graphResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Detective::Graph").WithTerraformTypeName("awscc_detective_graph") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "auto_enable_members": "AutoEnableMembers", diff --git a/internal/aws/detective/member_invitation_resource_gen.go b/internal/aws/detective/member_invitation_resource_gen.go index ae85d50d7..3dfca6335 100644 --- a/internal/aws/detective/member_invitation_resource_gen.go +++ b/internal/aws/detective/member_invitation_resource_gen.go @@ -120,6 +120,7 @@ func memberInvitationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -138,7 +139,6 @@ func memberInvitationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Detective::MemberInvitation").WithTerraformTypeName("awscc_detective_member_invitation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "disable_email_notification": "DisableEmailNotification", "graph_arn": "GraphArn", diff --git a/internal/aws/detective/organization_admin_resource_gen.go b/internal/aws/detective/organization_admin_resource_gen.go index ff0e74532..e9f32774a 100644 --- a/internal/aws/detective/organization_admin_resource_gen.go +++ b/internal/aws/detective/organization_admin_resource_gen.go @@ -61,6 +61,7 @@ func organizationAdminResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -79,7 +80,6 @@ func organizationAdminResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Detective::OrganizationAdmin").WithTerraformTypeName("awscc_detective_organization_admin") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "graph_arn": "GraphArn", diff --git a/internal/aws/devopsguru/log_anomaly_detection_integration_resource_gen.go b/internal/aws/devopsguru/log_anomaly_detection_integration_resource_gen.go index d40efbd23..99b8ebe3a 100644 --- a/internal/aws/devopsguru/log_anomaly_detection_integration_resource_gen.go +++ b/internal/aws/devopsguru/log_anomaly_detection_integration_resource_gen.go @@ -41,6 +41,7 @@ func logAnomalyDetectionIntegrationResource(ctx context.Context) (resource.Resou }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -59,7 +60,6 @@ func logAnomalyDetectionIntegrationResource(ctx context.Context) (resource.Resou opts = opts.WithCloudFormationTypeName("AWS::DevOpsGuru::LogAnomalyDetectionIntegration").WithTerraformTypeName("awscc_devopsguru_log_anomaly_detection_integration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", }) diff --git a/internal/aws/devopsguru/notification_channel_resource_gen.go b/internal/aws/devopsguru/notification_channel_resource_gen.go index 5009fe9b7..373488a25 100644 --- a/internal/aws/devopsguru/notification_channel_resource_gen.go +++ b/internal/aws/devopsguru/notification_channel_resource_gen.go @@ -192,7 +192,7 @@ func notificationChannelResource(ctx context.Context) (resource.Resource, error) // "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "notification_channel_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of a notification channel.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -201,6 +201,15 @@ func notificationChannelResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "This resource schema represents the NotificationChannel resource in the Amazon DevOps Guru.", Version: 1, @@ -211,15 +220,14 @@ func notificationChannelResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::DevOpsGuru::NotificationChannel").WithTerraformTypeName("awscc_devopsguru_notification_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "config": "Config", - "filters": "Filters", - "id": "Id", - "message_types": "MessageTypes", - "severities": "Severities", - "sns": "Sns", - "topic_arn": "TopicArn", + "config": "Config", + "filters": "Filters", + "message_types": "MessageTypes", + "notification_channel_id": "Id", + "severities": "Severities", + "sns": "Sns", + "topic_arn": "TopicArn", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/devopsguru/notification_channel_singular_data_source_gen.go b/internal/aws/devopsguru/notification_channel_singular_data_source_gen.go index 28fac919f..d80a87e51 100644 --- a/internal/aws/devopsguru/notification_channel_singular_data_source_gen.go +++ b/internal/aws/devopsguru/notification_channel_singular_data_source_gen.go @@ -133,7 +133,7 @@ func notificationChannelDataSource(ctx context.Context) (datasource.DataSource, // "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "notification_channel_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of a notification channel.", Computed: true, }, /*END ATTRIBUTE*/ @@ -154,13 +154,13 @@ func notificationChannelDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithCloudFormationTypeName("AWS::DevOpsGuru::NotificationChannel").WithTerraformTypeName("awscc_devopsguru_notification_channel") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "config": "Config", - "filters": "Filters", - "id": "Id", - "message_types": "MessageTypes", - "severities": "Severities", - "sns": "Sns", - "topic_arn": "TopicArn", + "config": "Config", + "filters": "Filters", + "message_types": "MessageTypes", + "notification_channel_id": "Id", + "severities": "Severities", + "sns": "Sns", + "topic_arn": "TopicArn", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/devopsguru/resource_collection_resource_gen.go b/internal/aws/devopsguru/resource_collection_resource_gen.go index 78da790ff..565e6d522 100644 --- a/internal/aws/devopsguru/resource_collection_resource_gen.go +++ b/internal/aws/devopsguru/resource_collection_resource_gen.go @@ -189,6 +189,7 @@ func resourceCollectionResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -207,7 +208,6 @@ func resourceCollectionResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::DevOpsGuru::ResourceCollection").WithTerraformTypeName("awscc_devopsguru_resource_collection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_boundary_key": "AppBoundaryKey", "cloudformation": "CloudFormation", diff --git a/internal/aws/directoryservice/simple_ad_resource_gen.go b/internal/aws/directoryservice/simple_ad_resource_gen.go index 94f6d328d..8b92354f3 100644 --- a/internal/aws/directoryservice/simple_ad_resource_gen.go +++ b/internal/aws/directoryservice/simple_ad_resource_gen.go @@ -235,6 +235,7 @@ func simpleADResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -253,7 +254,6 @@ func simpleADResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DirectoryService::SimpleAD").WithTerraformTypeName("awscc_directoryservice_simple_ad") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias": "Alias", "create_alias": "CreateAlias", diff --git a/internal/aws/dms/data_provider_resource_gen.go b/internal/aws/dms/data_provider_resource_gen.go index 41e065385..08ef71e48 100644 --- a/internal/aws/dms/data_provider_resource_gen.go +++ b/internal/aws/dms/data_provider_resource_gen.go @@ -365,6 +365,7 @@ func dataProviderResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -383,7 +384,6 @@ func dataProviderResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DMS::DataProvider").WithTerraformTypeName("awscc_dms_data_provider") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "data_provider_arn": "DataProviderArn", "data_provider_creation_time": "DataProviderCreationTime", diff --git a/internal/aws/dms/instance_profile_resource_gen.go b/internal/aws/dms/instance_profile_resource_gen.go index 4bda6627d..0507cca35 100644 --- a/internal/aws/dms/instance_profile_resource_gen.go +++ b/internal/aws/dms/instance_profile_resource_gen.go @@ -309,6 +309,7 @@ func instanceProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -327,7 +328,6 @@ func instanceProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DMS::InstanceProfile").WithTerraformTypeName("awscc_dms_instance_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "availability_zone": "AvailabilityZone", "description": "Description", diff --git a/internal/aws/dms/migration_project_resource_gen.go b/internal/aws/dms/migration_project_resource_gen.go index 76f08efb6..9ccd1da99 100644 --- a/internal/aws/dms/migration_project_resource_gen.go +++ b/internal/aws/dms/migration_project_resource_gen.go @@ -471,6 +471,7 @@ func migrationProjectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -489,7 +490,6 @@ func migrationProjectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DMS::MigrationProject").WithTerraformTypeName("awscc_dms_migration_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "data_provider_arn": "DataProviderArn", "data_provider_identifier": "DataProviderIdentifier", diff --git a/internal/aws/dms/replication_config_resource_gen.go b/internal/aws/dms/replication_config_resource_gen.go index f6064e886..49ec6655d 100644 --- a/internal/aws/dms/replication_config_resource_gen.go +++ b/internal/aws/dms/replication_config_resource_gen.go @@ -373,6 +373,7 @@ func replicationConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -391,7 +392,6 @@ func replicationConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DMS::ReplicationConfig").WithTerraformTypeName("awscc_dms_replication_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "availability_zone": "AvailabilityZone", "compute_config": "ComputeConfig", diff --git a/internal/aws/docdbelastic/cluster_resource_gen.go b/internal/aws/docdbelastic/cluster_resource_gen.go index 1a4c71306..6bbcc4ee9 100644 --- a/internal/aws/docdbelastic/cluster_resource_gen.go +++ b/internal/aws/docdbelastic/cluster_resource_gen.go @@ -258,6 +258,7 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -276,7 +277,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DocDBElastic::Cluster").WithTerraformTypeName("awscc_docdbelastic_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "admin_user_name": "AdminUserName", "admin_user_password": "AdminUserPassword", diff --git a/internal/aws/dynamodb/global_table_resource_gen.go b/internal/aws/dynamodb/global_table_resource_gen.go index f6af95ead..fef43573c 100644 --- a/internal/aws/dynamodb/global_table_resource_gen.go +++ b/internal/aws/dynamodb/global_table_resource_gen.go @@ -1515,6 +1515,7 @@ func globalTableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1533,7 +1534,6 @@ func globalTableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DynamoDB::GlobalTable").WithTerraformTypeName("awscc_dynamodb_global_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "approximate_creation_date_time_precision": "ApproximateCreationDateTimePrecision", "arn": "Arn", diff --git a/internal/aws/dynamodb/table_resource_gen.go b/internal/aws/dynamodb/table_resource_gen.go index 9f45954a4..39b4b4108 100644 --- a/internal/aws/dynamodb/table_resource_gen.go +++ b/internal/aws/dynamodb/table_resource_gen.go @@ -1097,6 +1097,7 @@ func tableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1115,7 +1116,6 @@ func tableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::DynamoDB::Table").WithTerraformTypeName("awscc_dynamodb_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "approximate_creation_date_time_precision": "ApproximateCreationDateTimePrecision", "arn": "Arn", diff --git a/internal/aws/ec2/capacity_reservation_fleet_resource_gen.go b/internal/aws/ec2/capacity_reservation_fleet_resource_gen.go index 89dea962b..03f70fc85 100644 --- a/internal/aws/ec2/capacity_reservation_fleet_resource_gen.go +++ b/internal/aws/ec2/capacity_reservation_fleet_resource_gen.go @@ -355,6 +355,7 @@ func capacityReservationFleetResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -373,7 +374,6 @@ func capacityReservationFleetResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::EC2::CapacityReservationFleet").WithTerraformTypeName("awscc_ec2_capacity_reservation_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allocation_strategy": "AllocationStrategy", "availability_zone": "AvailabilityZone", diff --git a/internal/aws/ec2/capacity_reservation_resource_gen.go b/internal/aws/ec2/capacity_reservation_resource_gen.go index 614a7a824..774814c78 100644 --- a/internal/aws/ec2/capacity_reservation_resource_gen.go +++ b/internal/aws/ec2/capacity_reservation_resource_gen.go @@ -111,7 +111,7 @@ func capacityReservationResource(ctx context.Context) (resource.Resource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "capacity_reservation_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -300,6 +300,15 @@ func capacityReservationResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::CapacityReservation", Version: 1, @@ -310,15 +319,14 @@ func capacityReservationResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::EC2::CapacityReservation").WithTerraformTypeName("awscc_ec2_capacity_reservation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "availability_zone": "AvailabilityZone", "available_instance_count": "AvailableInstanceCount", + "capacity_reservation_id": "Id", "ebs_optimized": "EbsOptimized", "end_date": "EndDate", "end_date_type": "EndDateType", "ephemeral_storage": "EphemeralStorage", - "id": "Id", "instance_count": "InstanceCount", "instance_match_criteria": "InstanceMatchCriteria", "instance_platform": "InstancePlatform", diff --git a/internal/aws/ec2/capacity_reservation_singular_data_source_gen.go b/internal/aws/ec2/capacity_reservation_singular_data_source_gen.go index 51182cfc9..238018c16 100644 --- a/internal/aws/ec2/capacity_reservation_singular_data_source_gen.go +++ b/internal/aws/ec2/capacity_reservation_singular_data_source_gen.go @@ -82,7 +82,7 @@ func capacityReservationDataSource(ctx context.Context) (datasource.DataSource, // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "capacity_reservation_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: InstanceCount @@ -241,11 +241,11 @@ func capacityReservationDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithAttributeNameMap(map[string]string{ "availability_zone": "AvailabilityZone", "available_instance_count": "AvailableInstanceCount", + "capacity_reservation_id": "Id", "ebs_optimized": "EbsOptimized", "end_date": "EndDate", "end_date_type": "EndDateType", "ephemeral_storage": "EphemeralStorage", - "id": "Id", "instance_count": "InstanceCount", "instance_match_criteria": "InstanceMatchCriteria", "instance_platform": "InstancePlatform", diff --git a/internal/aws/ec2/carrier_gateway_resource_gen.go b/internal/aws/ec2/carrier_gateway_resource_gen.go index 967c85cd8..7c85e8ff0 100644 --- a/internal/aws/ec2/carrier_gateway_resource_gen.go +++ b/internal/aws/ec2/carrier_gateway_resource_gen.go @@ -146,6 +146,7 @@ func carrierGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -164,7 +165,6 @@ func carrierGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::CarrierGateway").WithTerraformTypeName("awscc_ec2_carrier_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "carrier_gateway_id": "CarrierGatewayId", "key": "Key", diff --git a/internal/aws/ec2/customer_gateway_resource_gen.go b/internal/aws/ec2/customer_gateway_resource_gen.go index 74d5d7fea..8b061cbe2 100644 --- a/internal/aws/ec2/customer_gateway_resource_gen.go +++ b/internal/aws/ec2/customer_gateway_resource_gen.go @@ -150,6 +150,7 @@ func customerGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -168,7 +169,6 @@ func customerGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::CustomerGateway").WithTerraformTypeName("awscc_ec2_customer_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bgp_asn": "BgpAsn", "customer_gateway_id": "CustomerGatewayId", diff --git a/internal/aws/ec2/dhcp_options_resource_gen.go b/internal/aws/ec2/dhcp_options_resource_gen.go index 056a796d8..e9b6707d3 100644 --- a/internal/aws/ec2/dhcp_options_resource_gen.go +++ b/internal/aws/ec2/dhcp_options_resource_gen.go @@ -217,6 +217,7 @@ func dHCPOptionsResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -235,7 +236,6 @@ func dHCPOptionsResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::DHCPOptions").WithTerraformTypeName("awscc_ec2_dhcp_options") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dhcp_options_id": "DhcpOptionsId", "domain_name": "DomainName", diff --git a/internal/aws/ec2/ec2_fleet_resource_gen.go b/internal/aws/ec2/ec2_fleet_resource_gen.go index f47593904..ae4b24800 100644 --- a/internal/aws/ec2/ec2_fleet_resource_gen.go +++ b/internal/aws/ec2/ec2_fleet_resource_gen.go @@ -1730,6 +1730,7 @@ func eC2FleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1748,7 +1749,6 @@ func eC2FleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::EC2Fleet").WithTerraformTypeName("awscc_ec2_ec2_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_count": "AcceleratorCount", "accelerator_manufacturers": "AcceleratorManufacturers", diff --git a/internal/aws/ec2/egress_only_internet_gateway_resource_gen.go b/internal/aws/ec2/egress_only_internet_gateway_resource_gen.go index c27f64750..d951ce1f1 100644 --- a/internal/aws/ec2/egress_only_internet_gateway_resource_gen.go +++ b/internal/aws/ec2/egress_only_internet_gateway_resource_gen.go @@ -31,7 +31,7 @@ func egressOnlyInternetGatewayResource(ctx context.Context) (resource.Resource, // "description": "Service Generated ID of the EgressOnlyInternetGateway", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "egress_only_internet_gateway_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Service Generated ID of the EgressOnlyInternetGateway", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -54,6 +54,15 @@ func egressOnlyInternetGatewayResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::EgressOnlyInternetGateway", Version: 1, @@ -64,10 +73,9 @@ func egressOnlyInternetGatewayResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::EC2::EgressOnlyInternetGateway").WithTerraformTypeName("awscc_ec2_egress_only_internet_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "vpc_id": "VpcId", + "egress_only_internet_gateway_id": "Id", + "vpc_id": "VpcId", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/ec2/egress_only_internet_gateway_resource_test.go b/internal/aws/ec2/egress_only_internet_gateway_resource_test.go new file mode 100644 index 000000000..f19797672 --- /dev/null +++ b/internal/aws/ec2/egress_only_internet_gateway_resource_test.go @@ -0,0 +1,49 @@ +package ec2_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSEC2EgressOnlyInternetGateway_success(t *testing.T) { + td := acctest.NewTestData(t, "AWS::EC2::EgressOnlyInternetGateway", "awscc_ec2_egress_only_internet_gateway", "test") + resourceName := td.ResourceName + rName := td.RandomName() + + td.ResourceTest(t, []resource.TestStep{ + { + Config: testAccAWSEC2EgressOnlyInternetGatewayConfig(&td, rName), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + resource.TestCheckResourceAttrSet(resourceName, "egress_only_internet_gateway_id"), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func testAccAWSEC2EgressOnlyInternetGatewayConfig(td *acctest.TestData, rName string) string { + return fmt.Sprintf(` +resource "awscc_ec2_vpc" "test" { + cidr_block = "10.0.0.0/16" + + tags = [ + { + key = "Name" + value = %[3]q + } + ] +} + +resource %[1]q %[2]q { + vpc_id = awscc_ec2_vpc.test.id +} +`, td.TerraformResourceType, td.ResourceLabel, rName) +} diff --git a/internal/aws/ec2/egress_only_internet_gateway_singular_data_source_gen.go b/internal/aws/ec2/egress_only_internet_gateway_singular_data_source_gen.go index 2358aa09e..0be5de199 100644 --- a/internal/aws/ec2/egress_only_internet_gateway_singular_data_source_gen.go +++ b/internal/aws/ec2/egress_only_internet_gateway_singular_data_source_gen.go @@ -29,7 +29,7 @@ func egressOnlyInternetGatewayDataSource(ctx context.Context) (datasource.DataSo // "description": "Service Generated ID of the EgressOnlyInternetGateway", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "egress_only_internet_gateway_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Service Generated ID of the EgressOnlyInternetGateway", Computed: true, }, /*END ATTRIBUTE*/ @@ -61,8 +61,8 @@ func egressOnlyInternetGatewayDataSource(ctx context.Context) (datasource.DataSo opts = opts.WithCloudFormationTypeName("AWS::EC2::EgressOnlyInternetGateway").WithTerraformTypeName("awscc_ec2_egress_only_internet_gateway") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "vpc_id": "VpcId", + "egress_only_internet_gateway_id": "Id", + "vpc_id": "VpcId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ec2/eip_association_resource_gen.go b/internal/aws/ec2/eip_association_resource_gen.go index ae3736dd9..3d067ca3d 100644 --- a/internal/aws/ec2/eip_association_resource_gen.go +++ b/internal/aws/ec2/eip_association_resource_gen.go @@ -63,7 +63,7 @@ func eIPAssociationResource(ctx context.Context) (resource.Resource, error) { // "description": "Composite ID of non-empty properties, to determine the identification.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "eip_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Composite ID of non-empty properties, to determine the identification.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -120,6 +120,15 @@ func eIPAssociationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for EC2 EIP association.", Version: 1, @@ -130,11 +139,10 @@ func eIPAssociationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::EIPAssociation").WithTerraformTypeName("awscc_ec2_eip_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "allocation_id": "AllocationId", "eip": "EIP", - "id": "Id", + "eip_association_id": "Id", "instance_id": "InstanceId", "network_interface_id": "NetworkInterfaceId", "private_ip_address": "PrivateIpAddress", diff --git a/internal/aws/ec2/eip_association_singular_data_source_gen.go b/internal/aws/ec2/eip_association_singular_data_source_gen.go index 105ad39e5..c46e7156b 100644 --- a/internal/aws/ec2/eip_association_singular_data_source_gen.go +++ b/internal/aws/ec2/eip_association_singular_data_source_gen.go @@ -51,7 +51,7 @@ func eIPAssociationDataSource(ctx context.Context) (datasource.DataSource, error // "description": "Composite ID of non-empty properties, to determine the identification.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "eip_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Composite ID of non-empty properties, to determine the identification.", Computed: true, }, /*END ATTRIBUTE*/ @@ -107,7 +107,7 @@ func eIPAssociationDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithAttributeNameMap(map[string]string{ "allocation_id": "AllocationId", "eip": "EIP", - "id": "Id", + "eip_association_id": "Id", "instance_id": "InstanceId", "network_interface_id": "NetworkInterfaceId", "private_ip_address": "PrivateIpAddress", diff --git a/internal/aws/ec2/eip_resource_gen.go b/internal/aws/ec2/eip_resource_gen.go index 19e621af9..b24571b34 100644 --- a/internal/aws/ec2/eip_resource_gen.go +++ b/internal/aws/ec2/eip_resource_gen.go @@ -185,6 +185,7 @@ func eIPResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -203,7 +204,6 @@ func eIPResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::EIP").WithTerraformTypeName("awscc_ec2_eip") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allocation_id": "AllocationId", "domain": "Domain", diff --git a/internal/aws/ec2/enclave_certificate_iam_role_association_resource_gen.go b/internal/aws/ec2/enclave_certificate_iam_role_association_resource_gen.go index 79e81687b..2ca625b57 100644 --- a/internal/aws/ec2/enclave_certificate_iam_role_association_resource_gen.go +++ b/internal/aws/ec2/enclave_certificate_iam_role_association_resource_gen.go @@ -113,6 +113,7 @@ func enclaveCertificateIamRoleAssociationResource(ctx context.Context) (resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -131,7 +132,6 @@ func enclaveCertificateIamRoleAssociationResource(ctx context.Context) (resource opts = opts.WithCloudFormationTypeName("AWS::EC2::EnclaveCertificateIamRoleAssociation").WithTerraformTypeName("awscc_ec2_enclave_certificate_iam_role_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_arn": "CertificateArn", "certificate_s3_bucket_name": "CertificateS3BucketName", diff --git a/internal/aws/ec2/flow_log_resource_gen.go b/internal/aws/ec2/flow_log_resource_gen.go index 985453c57..91db54e0e 100644 --- a/internal/aws/ec2/flow_log_resource_gen.go +++ b/internal/aws/ec2/flow_log_resource_gen.go @@ -123,7 +123,7 @@ func flowLogResource(ctx context.Context) (resource.Resource, error) { // "description": "The Flow Log ID", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "flow_log_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Flow Log ID", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -340,6 +340,15 @@ func flowLogResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Specifies a VPC flow log, which enables you to capture IP traffic for a specific network interface, subnet, or VPC.", Version: 1, @@ -350,14 +359,13 @@ func flowLogResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::FlowLog").WithTerraformTypeName("awscc_ec2_flow_log") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "deliver_cross_account_role": "DeliverCrossAccountRole", "deliver_logs_permission_arn": "DeliverLogsPermissionArn", "destination_options": "DestinationOptions", "file_format": "FileFormat", + "flow_log_id": "Id", "hive_compatible_partitions": "HiveCompatiblePartitions", - "id": "Id", "key": "Key", "log_destination": "LogDestination", "log_destination_type": "LogDestinationType", diff --git a/internal/aws/ec2/flow_log_singular_data_source_gen.go b/internal/aws/ec2/flow_log_singular_data_source_gen.go index 467125def..168878f71 100644 --- a/internal/aws/ec2/flow_log_singular_data_source_gen.go +++ b/internal/aws/ec2/flow_log_singular_data_source_gen.go @@ -95,7 +95,7 @@ func flowLogDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "The Flow Log ID", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "flow_log_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Flow Log ID", Computed: true, }, /*END ATTRIBUTE*/ @@ -265,8 +265,8 @@ func flowLogDataSource(ctx context.Context) (datasource.DataSource, error) { "deliver_logs_permission_arn": "DeliverLogsPermissionArn", "destination_options": "DestinationOptions", "file_format": "FileFormat", + "flow_log_id": "Id", "hive_compatible_partitions": "HiveCompatiblePartitions", - "id": "Id", "key": "Key", "log_destination": "LogDestination", "log_destination_type": "LogDestinationType", diff --git a/internal/aws/ec2/gateway_route_table_association_resource_gen.go b/internal/aws/ec2/gateway_route_table_association_resource_gen.go index aca19bb8a..ae2f2aa85 100644 --- a/internal/aws/ec2/gateway_route_table_association_resource_gen.go +++ b/internal/aws/ec2/gateway_route_table_association_resource_gen.go @@ -65,6 +65,7 @@ func gatewayRouteTableAssociationResource(ctx context.Context) (resource.Resourc }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -83,7 +84,6 @@ func gatewayRouteTableAssociationResource(ctx context.Context) (resource.Resourc opts = opts.WithCloudFormationTypeName("AWS::EC2::GatewayRouteTableAssociation").WithTerraformTypeName("awscc_ec2_gateway_route_table_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_id": "AssociationId", "gateway_id": "GatewayId", diff --git a/internal/aws/ec2/host_resource_gen.go b/internal/aws/ec2/host_resource_gen.go index 7303aab0a..ea390ce4c 100644 --- a/internal/aws/ec2/host_resource_gen.go +++ b/internal/aws/ec2/host_resource_gen.go @@ -163,6 +163,7 @@ func hostResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -181,7 +182,6 @@ func hostResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::Host").WithTerraformTypeName("awscc_ec2_host") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "asset_id": "AssetId", "auto_placement": "AutoPlacement", diff --git a/internal/aws/ec2/instance_resource_gen.go b/internal/aws/ec2/instance_resource_gen.go index c38e64840..5da044c7b 100644 --- a/internal/aws/ec2/instance_resource_gen.go +++ b/internal/aws/ec2/instance_resource_gen.go @@ -1629,6 +1629,7 @@ func instanceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1647,7 +1648,6 @@ func instanceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::Instance").WithTerraformTypeName("awscc_ec2_instance") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "additional_info": "AdditionalInfo", "affinity": "Affinity", diff --git a/internal/aws/ec2/internet_gateway_resource_gen.go b/internal/aws/ec2/internet_gateway_resource_gen.go index bd750a836..2fe4b585c 100644 --- a/internal/aws/ec2/internet_gateway_resource_gen.go +++ b/internal/aws/ec2/internet_gateway_resource_gen.go @@ -103,6 +103,7 @@ func internetGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -121,7 +122,6 @@ func internetGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::InternetGateway").WithTerraformTypeName("awscc_ec2_internet_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "internet_gateway_id": "InternetGatewayId", "key": "Key", diff --git a/internal/aws/ec2/ipam_allocation_resource_gen.go b/internal/aws/ec2/ipam_allocation_resource_gen.go index 278a58a61..231d3f7e6 100644 --- a/internal/aws/ec2/ipam_allocation_resource_gen.go +++ b/internal/aws/ec2/ipam_allocation_resource_gen.go @@ -102,6 +102,7 @@ func iPAMAllocationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -120,7 +121,6 @@ func iPAMAllocationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAMAllocation").WithTerraformTypeName("awscc_ec2_ipam_allocation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cidr": "Cidr", "description": "Description", diff --git a/internal/aws/ec2/ipam_pool_cidr_resource_gen.go b/internal/aws/ec2/ipam_pool_cidr_resource_gen.go index 2933be6f3..28deebc7c 100644 --- a/internal/aws/ec2/ipam_pool_cidr_resource_gen.go +++ b/internal/aws/ec2/ipam_pool_cidr_resource_gen.go @@ -101,6 +101,7 @@ func iPAMPoolCidrResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func iPAMPoolCidrResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAMPoolCidr").WithTerraformTypeName("awscc_ec2_ipam_pool_cidr") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cidr": "Cidr", "ipam_pool_cidr_id": "IpamPoolCidrId", diff --git a/internal/aws/ec2/ipam_pool_resource_gen.go b/internal/aws/ec2/ipam_pool_resource_gen.go index c349809a1..81c4fbc1a 100644 --- a/internal/aws/ec2/ipam_pool_resource_gen.go +++ b/internal/aws/ec2/ipam_pool_resource_gen.go @@ -570,6 +570,7 @@ func iPAMPoolResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -588,7 +589,6 @@ func iPAMPoolResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAMPool").WithTerraformTypeName("awscc_ec2_ipam_pool") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address_family": "AddressFamily", "allocation_default_netmask_length": "AllocationDefaultNetmaskLength", diff --git a/internal/aws/ec2/ipam_resource_discovery_association_resource_gen.go b/internal/aws/ec2/ipam_resource_discovery_association_resource_gen.go index 95b9c44f2..08f09e777 100644 --- a/internal/aws/ec2/ipam_resource_discovery_association_resource_gen.go +++ b/internal/aws/ec2/ipam_resource_discovery_association_resource_gen.go @@ -230,6 +230,7 @@ func iPAMResourceDiscoveryAssociationResource(ctx context.Context) (resource.Res }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -248,7 +249,6 @@ func iPAMResourceDiscoveryAssociationResource(ctx context.Context) (resource.Res opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAMResourceDiscoveryAssociation").WithTerraformTypeName("awscc_ec2_ipam_resource_discovery_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "ipam_arn": "IpamArn", "ipam_id": "IpamId", diff --git a/internal/aws/ec2/ipam_resource_discovery_resource_gen.go b/internal/aws/ec2/ipam_resource_discovery_resource_gen.go index f5d13f639..5832d3e3b 100644 --- a/internal/aws/ec2/ipam_resource_discovery_resource_gen.go +++ b/internal/aws/ec2/ipam_resource_discovery_resource_gen.go @@ -227,6 +227,7 @@ func iPAMResourceDiscoveryResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -245,7 +246,6 @@ func iPAMResourceDiscoveryResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAMResourceDiscovery").WithTerraformTypeName("awscc_ec2_ipam_resource_discovery") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "ipam_resource_discovery_arn": "IpamResourceDiscoveryArn", diff --git a/internal/aws/ec2/ipam_resource_gen.go b/internal/aws/ec2/ipam_resource_gen.go index f33398f9a..d3be4851c 100644 --- a/internal/aws/ec2/ipam_resource_gen.go +++ b/internal/aws/ec2/ipam_resource_gen.go @@ -281,6 +281,7 @@ func iPAMResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -299,7 +300,6 @@ func iPAMResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAM").WithTerraformTypeName("awscc_ec2_ipam") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "default_resource_discovery_association_id": "DefaultResourceDiscoveryAssociationId", diff --git a/internal/aws/ec2/ipam_scope_resource_gen.go b/internal/aws/ec2/ipam_scope_resource_gen.go index 3f5e875ee..65ffaa690 100644 --- a/internal/aws/ec2/ipam_scope_resource_gen.go +++ b/internal/aws/ec2/ipam_scope_resource_gen.go @@ -206,6 +206,7 @@ func iPAMScopeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -224,7 +225,6 @@ func iPAMScopeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::IPAMScope").WithTerraformTypeName("awscc_ec2_ipam_scope") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/ec2/launch_template_resource_gen.go b/internal/aws/ec2/launch_template_resource_gen.go index 2dd6dcb4f..09442d9ba 100644 --- a/internal/aws/ec2/launch_template_resource_gen.go +++ b/internal/aws/ec2/launch_template_resource_gen.go @@ -2692,6 +2692,7 @@ func launchTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -2710,7 +2711,6 @@ func launchTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::LaunchTemplate").WithTerraformTypeName("awscc_ec2_launch_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_count": "AcceleratorCount", "accelerator_manufacturers": "AcceleratorManufacturers", diff --git a/internal/aws/ec2/local_gateway_route_resource_gen.go b/internal/aws/ec2/local_gateway_route_resource_gen.go index f3a7cf04a..c7dd9ed4f 100644 --- a/internal/aws/ec2/local_gateway_route_resource_gen.go +++ b/internal/aws/ec2/local_gateway_route_resource_gen.go @@ -116,6 +116,7 @@ func localGatewayRouteResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -134,7 +135,6 @@ func localGatewayRouteResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::LocalGatewayRoute").WithTerraformTypeName("awscc_ec2_local_gateway_route") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "destination_cidr_block": "DestinationCidrBlock", "local_gateway_route_table_id": "LocalGatewayRouteTableId", diff --git a/internal/aws/ec2/local_gateway_route_table_resource_gen.go b/internal/aws/ec2/local_gateway_route_table_resource_gen.go index b0e5d49a7..db69b95a6 100644 --- a/internal/aws/ec2/local_gateway_route_table_resource_gen.go +++ b/internal/aws/ec2/local_gateway_route_table_resource_gen.go @@ -190,6 +190,7 @@ func localGatewayRouteTableResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -208,7 +209,6 @@ func localGatewayRouteTableResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::EC2::LocalGatewayRouteTable").WithTerraformTypeName("awscc_ec2_local_gateway_route_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "local_gateway_id": "LocalGatewayId", diff --git a/internal/aws/ec2/local_gateway_route_table_virtual_interface_group_association_resource_gen.go b/internal/aws/ec2/local_gateway_route_table_virtual_interface_group_association_resource_gen.go index ce44030d7..3dee01ccb 100644 --- a/internal/aws/ec2/local_gateway_route_table_virtual_interface_group_association_resource_gen.go +++ b/internal/aws/ec2/local_gateway_route_table_virtual_interface_group_association_resource_gen.go @@ -188,6 +188,7 @@ func localGatewayRouteTableVirtualInterfaceGroupAssociationResource(ctx context. }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -206,7 +207,6 @@ func localGatewayRouteTableVirtualInterfaceGroupAssociationResource(ctx context. opts = opts.WithCloudFormationTypeName("AWS::EC2::LocalGatewayRouteTableVirtualInterfaceGroupAssociation").WithTerraformTypeName("awscc_ec2_local_gateway_route_table_virtual_interface_group_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "local_gateway_id": "LocalGatewayId", diff --git a/internal/aws/ec2/local_gateway_route_table_vpc_association_resource_gen.go b/internal/aws/ec2/local_gateway_route_table_vpc_association_resource_gen.go index 682af9a53..ee60ab587 100644 --- a/internal/aws/ec2/local_gateway_route_table_vpc_association_resource_gen.go +++ b/internal/aws/ec2/local_gateway_route_table_vpc_association_resource_gen.go @@ -160,6 +160,7 @@ func localGatewayRouteTableVPCAssociationResource(ctx context.Context) (resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -178,7 +179,6 @@ func localGatewayRouteTableVPCAssociationResource(ctx context.Context) (resource opts = opts.WithCloudFormationTypeName("AWS::EC2::LocalGatewayRouteTableVPCAssociation").WithTerraformTypeName("awscc_ec2_local_gateway_route_table_vpc_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "local_gateway_id": "LocalGatewayId", diff --git a/internal/aws/ec2/nat_gateway_resource_gen.go b/internal/aws/ec2/nat_gateway_resource_gen.go index 160a6cf6f..259c87b41 100644 --- a/internal/aws/ec2/nat_gateway_resource_gen.go +++ b/internal/aws/ec2/nat_gateway_resource_gen.go @@ -242,6 +242,7 @@ func natGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -260,7 +261,6 @@ func natGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::NatGateway").WithTerraformTypeName("awscc_ec2_nat_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allocation_id": "AllocationId", "connectivity_type": "ConnectivityType", diff --git a/internal/aws/ec2/network_acl_resource_gen.go b/internal/aws/ec2/network_acl_resource_gen.go index 50c6d311f..e68e5ec79 100644 --- a/internal/aws/ec2/network_acl_resource_gen.go +++ b/internal/aws/ec2/network_acl_resource_gen.go @@ -32,7 +32,7 @@ func networkAclResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "network_acl_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -106,6 +106,15 @@ func networkAclResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Specifies a network ACL for your VPC.", Version: 1, @@ -116,13 +125,12 @@ func networkAclResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkAcl").WithTerraformTypeName("awscc_ec2_network_acl") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "key": "Key", - "tags": "Tags", - "value": "Value", - "vpc_id": "VpcId", + "key": "Key", + "network_acl_id": "Id", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/ec2/network_acl_singular_data_source_gen.go b/internal/aws/ec2/network_acl_singular_data_source_gen.go index 90fae3404..aee8b8e76 100644 --- a/internal/aws/ec2/network_acl_singular_data_source_gen.go +++ b/internal/aws/ec2/network_acl_singular_data_source_gen.go @@ -29,7 +29,7 @@ func networkAclDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "network_acl_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -107,11 +107,11 @@ func networkAclDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkAcl").WithTerraformTypeName("awscc_ec2_network_acl") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "key": "Key", - "tags": "Tags", - "value": "Value", - "vpc_id": "VpcId", + "key": "Key", + "network_acl_id": "Id", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ec2/network_insights_access_scope_analysis_resource_gen.go b/internal/aws/ec2/network_insights_access_scope_analysis_resource_gen.go index 780819d17..8cf20ffb4 100644 --- a/internal/aws/ec2/network_insights_access_scope_analysis_resource_gen.go +++ b/internal/aws/ec2/network_insights_access_scope_analysis_resource_gen.go @@ -192,6 +192,7 @@ func networkInsightsAccessScopeAnalysisResource(ctx context.Context) (resource.R }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -210,7 +211,6 @@ func networkInsightsAccessScopeAnalysisResource(ctx context.Context) (resource.R opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkInsightsAccessScopeAnalysis").WithTerraformTypeName("awscc_ec2_network_insights_access_scope_analysis") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "analyzed_eni_count": "AnalyzedEniCount", "end_date": "EndDate", diff --git a/internal/aws/ec2/network_insights_access_scope_resource_gen.go b/internal/aws/ec2/network_insights_access_scope_resource_gen.go index eedcbcaa3..fa09e59d1 100644 --- a/internal/aws/ec2/network_insights_access_scope_resource_gen.go +++ b/internal/aws/ec2/network_insights_access_scope_resource_gen.go @@ -1134,6 +1134,7 @@ func networkInsightsAccessScopeResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1152,7 +1153,6 @@ func networkInsightsAccessScopeResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkInsightsAccessScope").WithTerraformTypeName("awscc_ec2_network_insights_access_scope") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_date": "CreatedDate", "destination": "Destination", diff --git a/internal/aws/ec2/network_insights_analysis_resource_gen.go b/internal/aws/ec2/network_insights_analysis_resource_gen.go index f198222ef..7c1b0a2d1 100644 --- a/internal/aws/ec2/network_insights_analysis_resource_gen.go +++ b/internal/aws/ec2/network_insights_analysis_resource_gen.go @@ -2542,6 +2542,7 @@ func networkInsightsAnalysisResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -2560,7 +2561,6 @@ func networkInsightsAnalysisResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkInsightsAnalysis").WithTerraformTypeName("awscc_ec2_network_insights_analysis") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acl": "Acl", "acl_rule": "AclRule", diff --git a/internal/aws/ec2/network_insights_path_resource_gen.go b/internal/aws/ec2/network_insights_path_resource_gen.go index 7b36069f8..66d491eae 100644 --- a/internal/aws/ec2/network_insights_path_resource_gen.go +++ b/internal/aws/ec2/network_insights_path_resource_gen.go @@ -461,6 +461,7 @@ func networkInsightsPathResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -479,7 +480,6 @@ func networkInsightsPathResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkInsightsPath").WithTerraformTypeName("awscc_ec2_network_insights_path") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_date": "CreatedDate", "destination": "Destination", diff --git a/internal/aws/ec2/network_interface_attachment_resource_gen.go b/internal/aws/ec2/network_interface_attachment_resource_gen.go index ceaf163eb..4b5816647 100644 --- a/internal/aws/ec2/network_interface_attachment_resource_gen.go +++ b/internal/aws/ec2/network_interface_attachment_resource_gen.go @@ -157,6 +157,7 @@ func networkInterfaceAttachmentResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -175,7 +176,6 @@ func networkInterfaceAttachmentResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkInterfaceAttachment").WithTerraformTypeName("awscc_ec2_network_interface_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_id": "AttachmentId", "delete_on_termination": "DeleteOnTermination", diff --git a/internal/aws/ec2/network_interface_resource_gen.go b/internal/aws/ec2/network_interface_resource_gen.go index 4da63ba80..2f883294a 100644 --- a/internal/aws/ec2/network_interface_resource_gen.go +++ b/internal/aws/ec2/network_interface_resource_gen.go @@ -140,7 +140,7 @@ func networkInterfaceResource(ctx context.Context) (resource.Resource, error) { // "description": "Network interface id.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "network_interface_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Network interface id.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -538,6 +538,15 @@ func networkInterfaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The AWS::EC2::NetworkInterface resource creates network interface", Version: 1, @@ -548,13 +557,11 @@ func networkInterfaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkInterface").WithTerraformTypeName("awscc_ec2_network_interface") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "connection_tracking_specification": "ConnectionTrackingSpecification", "description": "Description", "enable_primary_ipv_6": "EnablePrimaryIpv6", "group_set": "GroupSet", - "id": "Id", "interface_type": "InterfaceType", "ipv_4_prefix": "Ipv4Prefix", "ipv_4_prefix_count": "Ipv4PrefixCount", @@ -566,6 +573,7 @@ func networkInterfaceResource(ctx context.Context) (resource.Resource, error) { "ipv_6_prefix_count": "Ipv6PrefixCount", "ipv_6_prefixes": "Ipv6Prefixes", "key": "Key", + "network_interface_id": "Id", "primary": "Primary", "primary_ipv_6_address": "PrimaryIpv6Address", "primary_private_ip_address": "PrimaryPrivateIpAddress", diff --git a/internal/aws/ec2/network_interface_singular_data_source_gen.go b/internal/aws/ec2/network_interface_singular_data_source_gen.go index 4cdf2e16d..6936c9c9c 100644 --- a/internal/aws/ec2/network_interface_singular_data_source_gen.go +++ b/internal/aws/ec2/network_interface_singular_data_source_gen.go @@ -104,7 +104,7 @@ func networkInterfaceDataSource(ctx context.Context) (datasource.DataSource, err // "description": "Network interface id.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "network_interface_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Network interface id.", Computed: true, }, /*END ATTRIBUTE*/ @@ -448,7 +448,6 @@ func networkInterfaceDataSource(ctx context.Context) (datasource.DataSource, err "description": "Description", "enable_primary_ipv_6": "EnablePrimaryIpv6", "group_set": "GroupSet", - "id": "Id", "interface_type": "InterfaceType", "ipv_4_prefix": "Ipv4Prefix", "ipv_4_prefix_count": "Ipv4PrefixCount", @@ -460,6 +459,7 @@ func networkInterfaceDataSource(ctx context.Context) (datasource.DataSource, err "ipv_6_prefix_count": "Ipv6PrefixCount", "ipv_6_prefixes": "Ipv6Prefixes", "key": "Key", + "network_interface_id": "Id", "primary": "Primary", "primary_ipv_6_address": "PrimaryIpv6Address", "primary_private_ip_address": "PrimaryPrivateIpAddress", diff --git a/internal/aws/ec2/network_performance_metric_subscription_resource_gen.go b/internal/aws/ec2/network_performance_metric_subscription_resource_gen.go index 963b0a5be..c60a80502 100644 --- a/internal/aws/ec2/network_performance_metric_subscription_resource_gen.go +++ b/internal/aws/ec2/network_performance_metric_subscription_resource_gen.go @@ -82,6 +82,7 @@ func networkPerformanceMetricSubscriptionResource(ctx context.Context) (resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -100,7 +101,6 @@ func networkPerformanceMetricSubscriptionResource(ctx context.Context) (resource opts = opts.WithCloudFormationTypeName("AWS::EC2::NetworkPerformanceMetricSubscription").WithTerraformTypeName("awscc_ec2_network_performance_metric_subscription") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "destination": "Destination", "metric": "Metric", diff --git a/internal/aws/ec2/placement_group_resource_gen.go b/internal/aws/ec2/placement_group_resource_gen.go index 96ef1c18e..d858e4385 100644 --- a/internal/aws/ec2/placement_group_resource_gen.go +++ b/internal/aws/ec2/placement_group_resource_gen.go @@ -153,6 +153,7 @@ func placementGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -171,7 +172,6 @@ func placementGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::PlacementGroup").WithTerraformTypeName("awscc_ec2_placement_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "group_name": "GroupName", "key": "Key", diff --git a/internal/aws/ec2/prefix_list_resource_gen.go b/internal/aws/ec2/prefix_list_resource_gen.go index c7ec1aa9f..91890c302 100644 --- a/internal/aws/ec2/prefix_list_resource_gen.go +++ b/internal/aws/ec2/prefix_list_resource_gen.go @@ -254,6 +254,7 @@ func prefixListResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -272,7 +273,6 @@ func prefixListResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::PrefixList").WithTerraformTypeName("awscc_ec2_prefix_list") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address_family": "AddressFamily", "arn": "Arn", diff --git a/internal/aws/ec2/route_resource_gen.go b/internal/aws/ec2/route_resource_gen.go index eceb81a32..fb567df13 100644 --- a/internal/aws/ec2/route_resource_gen.go +++ b/internal/aws/ec2/route_resource_gen.go @@ -267,6 +267,7 @@ func routeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -285,7 +286,6 @@ func routeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::Route").WithTerraformTypeName("awscc_ec2_route") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "carrier_gateway_id": "CarrierGatewayId", "cidr_block": "CidrBlock", diff --git a/internal/aws/ec2/route_table_resource_gen.go b/internal/aws/ec2/route_table_resource_gen.go index b79601371..7ea20a2b9 100644 --- a/internal/aws/ec2/route_table_resource_gen.go +++ b/internal/aws/ec2/route_table_resource_gen.go @@ -106,6 +106,7 @@ func routeTableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -124,7 +125,6 @@ func routeTableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::RouteTable").WithTerraformTypeName("awscc_ec2_route_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "route_table_id": "RouteTableId", diff --git a/internal/aws/ec2/security_group_egress_resource_gen.go b/internal/aws/ec2/security_group_egress_resource_gen.go index 383834120..5c63ab101 100644 --- a/internal/aws/ec2/security_group_egress_resource_gen.go +++ b/internal/aws/ec2/security_group_egress_resource_gen.go @@ -141,7 +141,7 @@ func securityGroupEgressResource(ctx context.Context) (resource.Resource, error) // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_group_egress_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -180,6 +180,15 @@ func securityGroupEgressResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Adds the specified outbound (egress) rule to a security group.\n An outbound rule permits instances to send traffic to the specified IPv4 or IPv6 address range, the IP addresses that are specified by a prefix list, or the instances that are associated with a destination security group. For more information, see [Security group rules](https://docs.aws.amazon.com/vpc/latest/userguide/security-group-rules.html).\n You must specify exactly one of the following destinations: an IPv4 or IPv6 address range, a prefix list, or a security group. Otherwise, the stack launches successfully but the rule is not added to the security group.\n You must specify a protocol for each rule (for example, TCP). If the protocol is TCP or UDP, you must also specify a port or port range. If the protocol is ICMP or ICMPv6, you must also specify the ICMP/ICMPv6 type and code. To specify all types or all codes, use -1.\n Rule changes are propagated to instances associated with the security group as quickly as possible", Version: 1, @@ -190,7 +199,6 @@ func securityGroupEgressResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::EC2::SecurityGroupEgress").WithTerraformTypeName("awscc_ec2_security_group_egress") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cidr_ip": "CidrIp", "cidr_ipv_6": "CidrIpv6", @@ -199,8 +207,8 @@ func securityGroupEgressResource(ctx context.Context) (resource.Resource, error) "destination_security_group_id": "DestinationSecurityGroupId", "from_port": "FromPort", "group_id": "GroupId", - "id": "Id", "ip_protocol": "IpProtocol", + "security_group_egress_id": "Id", "to_port": "ToPort", }) diff --git a/internal/aws/ec2/security_group_egress_singular_data_source_gen.go b/internal/aws/ec2/security_group_egress_singular_data_source_gen.go index a7e1030b6..905480ea1 100644 --- a/internal/aws/ec2/security_group_egress_singular_data_source_gen.go +++ b/internal/aws/ec2/security_group_egress_singular_data_source_gen.go @@ -106,7 +106,7 @@ func securityGroupEgressDataSource(ctx context.Context) (datasource.DataSource, // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_group_egress_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -156,8 +156,8 @@ func securityGroupEgressDataSource(ctx context.Context) (datasource.DataSource, "destination_security_group_id": "DestinationSecurityGroupId", "from_port": "FromPort", "group_id": "GroupId", - "id": "Id", "ip_protocol": "IpProtocol", + "security_group_egress_id": "Id", "to_port": "ToPort", }) diff --git a/internal/aws/ec2/security_group_ingress_resource_gen.go b/internal/aws/ec2/security_group_ingress_resource_gen.go index d69c62078..af654ebf3 100644 --- a/internal/aws/ec2/security_group_ingress_resource_gen.go +++ b/internal/aws/ec2/security_group_ingress_resource_gen.go @@ -127,7 +127,7 @@ func securityGroupIngressResource(ctx context.Context) (resource.Resource, error // "description": "The Security Group Rule Id", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_group_ingress_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Security Group Rule Id", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -230,6 +230,15 @@ func securityGroupIngressResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::SecurityGroupIngress", Version: 1, @@ -240,7 +249,6 @@ func securityGroupIngressResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::EC2::SecurityGroupIngress").WithTerraformTypeName("awscc_ec2_security_group_ingress") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cidr_ip": "CidrIp", "cidr_ipv_6": "CidrIpv6", @@ -248,8 +256,8 @@ func securityGroupIngressResource(ctx context.Context) (resource.Resource, error "from_port": "FromPort", "group_id": "GroupId", "group_name": "GroupName", - "id": "Id", "ip_protocol": "IpProtocol", + "security_group_ingress_id": "Id", "source_prefix_list_id": "SourcePrefixListId", "source_security_group_id": "SourceSecurityGroupId", "source_security_group_name": "SourceSecurityGroupName", diff --git a/internal/aws/ec2/security_group_ingress_singular_data_source_gen.go b/internal/aws/ec2/security_group_ingress_singular_data_source_gen.go index ba258bc6a..179ae165c 100644 --- a/internal/aws/ec2/security_group_ingress_singular_data_source_gen.go +++ b/internal/aws/ec2/security_group_ingress_singular_data_source_gen.go @@ -95,7 +95,7 @@ func securityGroupIngressDataSource(ctx context.Context) (datasource.DataSource, // "description": "The Security Group Rule Id", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_group_ingress_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Security Group Rule Id", Computed: true, }, /*END ATTRIBUTE*/ @@ -188,8 +188,8 @@ func securityGroupIngressDataSource(ctx context.Context) (datasource.DataSource, "from_port": "FromPort", "group_id": "GroupId", "group_name": "GroupName", - "id": "Id", "ip_protocol": "IpProtocol", + "security_group_ingress_id": "Id", "source_prefix_list_id": "SourcePrefixListId", "source_security_group_id": "SourceSecurityGroupId", "source_security_group_name": "SourceSecurityGroupName", diff --git a/internal/aws/ec2/security_group_resource_gen.go b/internal/aws/ec2/security_group_resource_gen.go index 16288aafe..3365ca21a 100644 --- a/internal/aws/ec2/security_group_resource_gen.go +++ b/internal/aws/ec2/security_group_resource_gen.go @@ -77,7 +77,7 @@ func securityGroupResource(ctx context.Context) (resource.Resource, error) { // "description": "The group name or group ID depending on whether the SG is created in default or specific VPC", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The group name or group ID depending on whether the SG is created in default or specific VPC", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -411,6 +411,15 @@ func securityGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::SecurityGroup", Version: 1, @@ -421,7 +430,6 @@ func securityGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::SecurityGroup").WithTerraformTypeName("awscc_ec2_security_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cidr_ip": "CidrIp", "cidr_ipv_6": "CidrIpv6", @@ -432,10 +440,10 @@ func securityGroupResource(ctx context.Context) (resource.Resource, error) { "group_description": "GroupDescription", "group_id": "GroupId", "group_name": "GroupName", - "id": "Id", "ip_protocol": "IpProtocol", "key": "Key", "security_group_egress": "SecurityGroupEgress", + "security_group_id": "Id", "security_group_ingress": "SecurityGroupIngress", "source_prefix_list_id": "SourcePrefixListId", "source_security_group_id": "SourceSecurityGroupId", diff --git a/internal/aws/ec2/security_group_singular_data_source_gen.go b/internal/aws/ec2/security_group_singular_data_source_gen.go index aa4479c91..62342df82 100644 --- a/internal/aws/ec2/security_group_singular_data_source_gen.go +++ b/internal/aws/ec2/security_group_singular_data_source_gen.go @@ -62,7 +62,7 @@ func securityGroupDataSource(ctx context.Context) (datasource.DataSource, error) // "description": "The group name or group ID depending on whether the SG is created in default or specific VPC", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The group name or group ID depending on whether the SG is created in default or specific VPC", Computed: true, }, /*END ATTRIBUTE*/ @@ -329,10 +329,10 @@ func securityGroupDataSource(ctx context.Context) (datasource.DataSource, error) "group_description": "GroupDescription", "group_id": "GroupId", "group_name": "GroupName", - "id": "Id", "ip_protocol": "IpProtocol", "key": "Key", "security_group_egress": "SecurityGroupEgress", + "security_group_id": "Id", "security_group_ingress": "SecurityGroupIngress", "source_prefix_list_id": "SourcePrefixListId", "source_security_group_id": "SourceSecurityGroupId", diff --git a/internal/aws/ec2/snapshot_block_public_access_resource_gen.go b/internal/aws/ec2/snapshot_block_public_access_resource_gen.go index 30db1b506..5693eac3e 100644 --- a/internal/aws/ec2/snapshot_block_public_access_resource_gen.go +++ b/internal/aws/ec2/snapshot_block_public_access_resource_gen.go @@ -63,6 +63,7 @@ func snapshotBlockPublicAccessResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -81,7 +82,6 @@ func snapshotBlockPublicAccessResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::EC2::SnapshotBlockPublicAccess").WithTerraformTypeName("awscc_ec2_snapshot_block_public_access") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "state": "State", diff --git a/internal/aws/ec2/spot_fleet_resource_gen.go b/internal/aws/ec2/spot_fleet_resource_gen.go index e9fd62c41..a6a3bf74c 100644 --- a/internal/aws/ec2/spot_fleet_resource_gen.go +++ b/internal/aws/ec2/spot_fleet_resource_gen.go @@ -40,7 +40,7 @@ func spotFleetResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "spot_fleet_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -3143,6 +3143,15 @@ func spotFleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::SpotFleet", Version: 1, @@ -3153,7 +3162,6 @@ func spotFleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::SpotFleet").WithTerraformTypeName("awscc_ec2_spot_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_count": "AcceleratorCount", "accelerator_manufacturers": "AcceleratorManufacturers", @@ -3189,7 +3197,6 @@ func spotFleetResource(ctx context.Context) (resource.Resource, error) { "groups": "Groups", "iam_fleet_role": "IamFleetRole", "iam_instance_profile": "IamInstanceProfile", - "id": "Id", "image_id": "ImageId", "instance_generations": "InstanceGenerations", "instance_interruption_behavior": "InstanceInterruptionBehavior", @@ -3241,6 +3248,7 @@ func spotFleetResource(ctx context.Context) (resource.Resource, error) { "secondary_private_ip_address_count": "SecondaryPrivateIpAddressCount", "security_groups": "SecurityGroups", "snapshot_id": "SnapshotId", + "spot_fleet_id": "Id", "spot_fleet_request_config_data": "SpotFleetRequestConfigData", "spot_maintenance_strategies": "SpotMaintenanceStrategies", "spot_max_price_percentage_over_lowest_price": "SpotMaxPricePercentageOverLowestPrice", diff --git a/internal/aws/ec2/spot_fleet_singular_data_source_gen.go b/internal/aws/ec2/spot_fleet_singular_data_source_gen.go index c9f42c363..96638320b 100644 --- a/internal/aws/ec2/spot_fleet_singular_data_source_gen.go +++ b/internal/aws/ec2/spot_fleet_singular_data_source_gen.go @@ -29,7 +29,7 @@ func spotFleetDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "spot_fleet_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: SpotFleetRequestConfigData @@ -2084,7 +2084,6 @@ func spotFleetDataSource(ctx context.Context) (datasource.DataSource, error) { "groups": "Groups", "iam_fleet_role": "IamFleetRole", "iam_instance_profile": "IamInstanceProfile", - "id": "Id", "image_id": "ImageId", "instance_generations": "InstanceGenerations", "instance_interruption_behavior": "InstanceInterruptionBehavior", @@ -2136,6 +2135,7 @@ func spotFleetDataSource(ctx context.Context) (datasource.DataSource, error) { "secondary_private_ip_address_count": "SecondaryPrivateIpAddressCount", "security_groups": "SecurityGroups", "snapshot_id": "SnapshotId", + "spot_fleet_id": "Id", "spot_fleet_request_config_data": "SpotFleetRequestConfigData", "spot_maintenance_strategies": "SpotMaintenanceStrategies", "spot_max_price_percentage_over_lowest_price": "SpotMaxPricePercentageOverLowestPrice", diff --git a/internal/aws/ec2/subnet_cidr_block_resource_gen.go b/internal/aws/ec2/subnet_cidr_block_resource_gen.go index a63e18c7b..86501e409 100644 --- a/internal/aws/ec2/subnet_cidr_block_resource_gen.go +++ b/internal/aws/ec2/subnet_cidr_block_resource_gen.go @@ -35,7 +35,7 @@ func subnetCidrBlockResource(ctx context.Context) (resource.Resource, error) { // "description": "Information about the IPv6 association.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "subnet_cidr_block_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Information about the IPv6 association.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -117,6 +117,15 @@ func subnetCidrBlockResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The AWS::EC2::SubnetCidrBlock resource creates association between subnet and IPv6 CIDR", Version: 1, @@ -127,12 +136,11 @@ func subnetCidrBlockResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::SubnetCidrBlock").WithTerraformTypeName("awscc_ec2_subnet_cidr_block") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", "ipv_6_cidr_block": "Ipv6CidrBlock", "ipv_6_ipam_pool_id": "Ipv6IpamPoolId", "ipv_6_netmask_length": "Ipv6NetmaskLength", + "subnet_cidr_block_id": "Id", "subnet_id": "SubnetId", }) diff --git a/internal/aws/ec2/subnet_cidr_block_singular_data_source_gen.go b/internal/aws/ec2/subnet_cidr_block_singular_data_source_gen.go index b18b40a15..817dfbb3d 100644 --- a/internal/aws/ec2/subnet_cidr_block_singular_data_source_gen.go +++ b/internal/aws/ec2/subnet_cidr_block_singular_data_source_gen.go @@ -29,7 +29,7 @@ func subnetCidrBlockDataSource(ctx context.Context) (datasource.DataSource, erro // "description": "Information about the IPv6 association.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "subnet_cidr_block_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Information about the IPv6 association.", Computed: true, }, /*END ATTRIBUTE*/ @@ -97,10 +97,10 @@ func subnetCidrBlockDataSource(ctx context.Context) (datasource.DataSource, erro opts = opts.WithCloudFormationTypeName("AWS::EC2::SubnetCidrBlock").WithTerraformTypeName("awscc_ec2_subnet_cidr_block") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", "ipv_6_cidr_block": "Ipv6CidrBlock", "ipv_6_ipam_pool_id": "Ipv6IpamPoolId", "ipv_6_netmask_length": "Ipv6NetmaskLength", + "subnet_cidr_block_id": "Id", "subnet_id": "SubnetId", }) diff --git a/internal/aws/ec2/subnet_network_acl_association_resource_gen.go b/internal/aws/ec2/subnet_network_acl_association_resource_gen.go index b45211aab..8b6c030d5 100644 --- a/internal/aws/ec2/subnet_network_acl_association_resource_gen.go +++ b/internal/aws/ec2/subnet_network_acl_association_resource_gen.go @@ -66,6 +66,7 @@ func subnetNetworkAclAssociationResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -84,7 +85,6 @@ func subnetNetworkAclAssociationResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::EC2::SubnetNetworkAclAssociation").WithTerraformTypeName("awscc_ec2_subnet_network_acl_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_id": "AssociationId", "network_acl_id": "NetworkAclId", diff --git a/internal/aws/ec2/subnet_resource_gen.go b/internal/aws/ec2/subnet_resource_gen.go index cbf90a459..0056b01f3 100644 --- a/internal/aws/ec2/subnet_resource_gen.go +++ b/internal/aws/ec2/subnet_resource_gen.go @@ -403,6 +403,7 @@ func subnetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -421,7 +422,6 @@ func subnetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::Subnet").WithTerraformTypeName("awscc_ec2_subnet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "assign_ipv_6_address_on_creation": "AssignIpv6AddressOnCreation", "availability_zone": "AvailabilityZone", diff --git a/internal/aws/ec2/subnet_route_table_association_resource_gen.go b/internal/aws/ec2/subnet_route_table_association_resource_gen.go index ae3a3fc6e..28b91ec45 100644 --- a/internal/aws/ec2/subnet_route_table_association_resource_gen.go +++ b/internal/aws/ec2/subnet_route_table_association_resource_gen.go @@ -31,7 +31,7 @@ func subnetRouteTableAssociationResource(ctx context.Context) (resource.Resource // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "subnet_route_table_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -68,6 +68,15 @@ func subnetRouteTableAssociationResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Associates a subnet with a route table. The subnet and route table must be in the same VPC. This association causes traffic originating from the subnet to be routed according to the routes in the route table. A route table can be associated with multiple subnets. To create a route table, see [AWS::EC2::RouteTable](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-routetable.html).", Version: 1, @@ -78,11 +87,10 @@ func subnetRouteTableAssociationResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::EC2::SubnetRouteTableAssociation").WithTerraformTypeName("awscc_ec2_subnet_route_table_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "route_table_id": "RouteTableId", - "subnet_id": "SubnetId", + "route_table_id": "RouteTableId", + "subnet_id": "SubnetId", + "subnet_route_table_association_id": "Id", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/ec2/subnet_route_table_association_singular_data_source_gen.go b/internal/aws/ec2/subnet_route_table_association_singular_data_source_gen.go index 6e68917d3..9df36471f 100644 --- a/internal/aws/ec2/subnet_route_table_association_singular_data_source_gen.go +++ b/internal/aws/ec2/subnet_route_table_association_singular_data_source_gen.go @@ -29,7 +29,7 @@ func subnetRouteTableAssociationDataSource(ctx context.Context) (datasource.Data // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "subnet_route_table_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -72,9 +72,9 @@ func subnetRouteTableAssociationDataSource(ctx context.Context) (datasource.Data opts = opts.WithCloudFormationTypeName("AWS::EC2::SubnetRouteTableAssociation").WithTerraformTypeName("awscc_ec2_subnet_route_table_association") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "route_table_id": "RouteTableId", - "subnet_id": "SubnetId", + "route_table_id": "RouteTableId", + "subnet_id": "SubnetId", + "subnet_route_table_association_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ec2/transit_gateway_attachment_resource_gen.go b/internal/aws/ec2/transit_gateway_attachment_resource_gen.go index c7a11996c..d98ae94b0 100644 --- a/internal/aws/ec2/transit_gateway_attachment_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_attachment_resource_gen.go @@ -33,7 +33,7 @@ func transitGatewayAttachmentResource(ctx context.Context) (resource.Resource, e // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "transit_gateway_attachment_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -199,6 +199,15 @@ func transitGatewayAttachmentResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::TransitGatewayAttachment", Version: 1, @@ -209,17 +218,16 @@ func transitGatewayAttachmentResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayAttachment").WithTerraformTypeName("awscc_ec2_transit_gateway_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "appliance_mode_support": "ApplianceModeSupport", "dns_support": "DnsSupport", - "id": "Id", "ipv_6_support": "Ipv6Support", "key": "Key", "options": "Options", "security_group_referencing_support": "SecurityGroupReferencingSupport", "subnet_ids": "SubnetIds", "tags": "Tags", + "transit_gateway_attachment_id": "Id", "transit_gateway_id": "TransitGatewayId", "value": "Value", "vpc_id": "VpcId", diff --git a/internal/aws/ec2/transit_gateway_attachment_singular_data_source_gen.go b/internal/aws/ec2/transit_gateway_attachment_singular_data_source_gen.go index dfe0c15c2..fb70d33ca 100644 --- a/internal/aws/ec2/transit_gateway_attachment_singular_data_source_gen.go +++ b/internal/aws/ec2/transit_gateway_attachment_singular_data_source_gen.go @@ -29,7 +29,7 @@ func transitGatewayAttachmentDataSource(ctx context.Context) (datasource.DataSou // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "transit_gateway_attachment_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Options @@ -175,13 +175,13 @@ func transitGatewayAttachmentDataSource(ctx context.Context) (datasource.DataSou opts = opts.WithAttributeNameMap(map[string]string{ "appliance_mode_support": "ApplianceModeSupport", "dns_support": "DnsSupport", - "id": "Id", "ipv_6_support": "Ipv6Support", "key": "Key", "options": "Options", "security_group_referencing_support": "SecurityGroupReferencingSupport", "subnet_ids": "SubnetIds", "tags": "Tags", + "transit_gateway_attachment_id": "Id", "transit_gateway_id": "TransitGatewayId", "value": "Value", "vpc_id": "VpcId", diff --git a/internal/aws/ec2/transit_gateway_connect_resource_gen.go b/internal/aws/ec2/transit_gateway_connect_resource_gen.go index bae757680..3976552a7 100644 --- a/internal/aws/ec2/transit_gateway_connect_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_connect_resource_gen.go @@ -181,6 +181,7 @@ func transitGatewayConnectResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -199,7 +200,6 @@ func transitGatewayConnectResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayConnect").WithTerraformTypeName("awscc_ec2_transit_gateway_connect") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "key": "Key", diff --git a/internal/aws/ec2/transit_gateway_multicast_domain_association_resource_gen.go b/internal/aws/ec2/transit_gateway_multicast_domain_association_resource_gen.go index 64ed3eeaa..813b8d51f 100644 --- a/internal/aws/ec2/transit_gateway_multicast_domain_association_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_multicast_domain_association_resource_gen.go @@ -110,6 +110,7 @@ func transitGatewayMulticastDomainAssociationResource(ctx context.Context) (reso }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -128,7 +129,6 @@ func transitGatewayMulticastDomainAssociationResource(ctx context.Context) (reso opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayMulticastDomainAssociation").WithTerraformTypeName("awscc_ec2_transit_gateway_multicast_domain_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "resource_id": "ResourceId", "resource_type": "ResourceType", diff --git a/internal/aws/ec2/transit_gateway_multicast_domain_resource_gen.go b/internal/aws/ec2/transit_gateway_multicast_domain_resource_gen.go index abf170a63..e8121bf85 100644 --- a/internal/aws/ec2/transit_gateway_multicast_domain_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_multicast_domain_resource_gen.go @@ -211,6 +211,7 @@ func transitGatewayMulticastDomainResource(ctx context.Context) (resource.Resour }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -229,7 +230,6 @@ func transitGatewayMulticastDomainResource(ctx context.Context) (resource.Resour opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayMulticastDomain").WithTerraformTypeName("awscc_ec2_transit_gateway_multicast_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_accept_shared_associations": "AutoAcceptSharedAssociations", "creation_time": "CreationTime", diff --git a/internal/aws/ec2/transit_gateway_multicast_group_member_resource_gen.go b/internal/aws/ec2/transit_gateway_multicast_group_member_resource_gen.go index a3dd71e3a..b1fc0ba1c 100644 --- a/internal/aws/ec2/transit_gateway_multicast_group_member_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_multicast_group_member_resource_gen.go @@ -181,6 +181,7 @@ func transitGatewayMulticastGroupMemberResource(ctx context.Context) (resource.R }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -199,7 +200,6 @@ func transitGatewayMulticastGroupMemberResource(ctx context.Context) (resource.R opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayMulticastGroupMember").WithTerraformTypeName("awscc_ec2_transit_gateway_multicast_group_member") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "group_ip_address": "GroupIpAddress", "group_member": "GroupMember", diff --git a/internal/aws/ec2/transit_gateway_multicast_group_source_resource_gen.go b/internal/aws/ec2/transit_gateway_multicast_group_source_resource_gen.go index 42be3a5a5..d6ee6db05 100644 --- a/internal/aws/ec2/transit_gateway_multicast_group_source_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_multicast_group_source_resource_gen.go @@ -181,6 +181,7 @@ func transitGatewayMulticastGroupSourceResource(ctx context.Context) (resource.R }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -199,7 +200,6 @@ func transitGatewayMulticastGroupSourceResource(ctx context.Context) (resource.R opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayMulticastGroupSource").WithTerraformTypeName("awscc_ec2_transit_gateway_multicast_group_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "group_ip_address": "GroupIpAddress", "group_member": "GroupMember", diff --git a/internal/aws/ec2/transit_gateway_peering_attachment_resource_gen.go b/internal/aws/ec2/transit_gateway_peering_attachment_resource_gen.go index 86e0414fe..17cf92eea 100644 --- a/internal/aws/ec2/transit_gateway_peering_attachment_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_peering_attachment_resource_gen.go @@ -217,6 +217,7 @@ func transitGatewayPeeringAttachmentResource(ctx context.Context) (resource.Reso }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -235,7 +236,6 @@ func transitGatewayPeeringAttachmentResource(ctx context.Context) (resource.Reso opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayPeeringAttachment").WithTerraformTypeName("awscc_ec2_transit_gateway_peering_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "code": "Code", "creation_time": "CreationTime", diff --git a/internal/aws/ec2/transit_gateway_resource_gen.go b/internal/aws/ec2/transit_gateway_resource_gen.go index 82ceb6ac7..2b3e0e241 100644 --- a/internal/aws/ec2/transit_gateway_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_resource_gen.go @@ -126,7 +126,7 @@ func transitGatewayResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "transit_gateway_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -245,6 +245,15 @@ func transitGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::TransitGateway", Version: 1, @@ -255,7 +264,6 @@ func transitGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGateway").WithTerraformTypeName("awscc_ec2_transit_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "amazon_side_asn": "AmazonSideAsn", "association_default_route_table_id": "AssociationDefaultRouteTableId", @@ -264,13 +272,13 @@ func transitGatewayResource(ctx context.Context) (resource.Resource, error) { "default_route_table_propagation": "DefaultRouteTablePropagation", "description": "Description", "dns_support": "DnsSupport", - "id": "Id", "key": "Key", "multicast_support": "MulticastSupport", "propagation_default_route_table_id": "PropagationDefaultRouteTableId", "tags": "Tags", "transit_gateway_arn": "TransitGatewayArn", "transit_gateway_cidr_blocks": "TransitGatewayCidrBlocks", + "transit_gateway_id": "Id", "value": "Value", "vpn_ecmp_support": "VpnEcmpSupport", }) diff --git a/internal/aws/ec2/transit_gateway_route_table_resource_gen.go b/internal/aws/ec2/transit_gateway_route_table_resource_gen.go index 1c2a34caa..7e8145413 100644 --- a/internal/aws/ec2/transit_gateway_route_table_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_route_table_resource_gen.go @@ -106,6 +106,7 @@ func transitGatewayRouteTableResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -124,7 +125,6 @@ func transitGatewayRouteTableResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayRouteTable").WithTerraformTypeName("awscc_ec2_transit_gateway_route_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "tags": "Tags", diff --git a/internal/aws/ec2/transit_gateway_singular_data_source_gen.go b/internal/aws/ec2/transit_gateway_singular_data_source_gen.go index 1f08e9416..8eab6cc07 100644 --- a/internal/aws/ec2/transit_gateway_singular_data_source_gen.go +++ b/internal/aws/ec2/transit_gateway_singular_data_source_gen.go @@ -93,7 +93,7 @@ func transitGatewayDataSource(ctx context.Context) (datasource.DataSource, error // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "transit_gateway_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: MulticastSupport @@ -207,13 +207,13 @@ func transitGatewayDataSource(ctx context.Context) (datasource.DataSource, error "default_route_table_propagation": "DefaultRouteTablePropagation", "description": "Description", "dns_support": "DnsSupport", - "id": "Id", "key": "Key", "multicast_support": "MulticastSupport", "propagation_default_route_table_id": "PropagationDefaultRouteTableId", "tags": "Tags", "transit_gateway_arn": "TransitGatewayArn", "transit_gateway_cidr_blocks": "TransitGatewayCidrBlocks", + "transit_gateway_id": "Id", "value": "Value", "vpn_ecmp_support": "VpnEcmpSupport", }) diff --git a/internal/aws/ec2/transit_gateway_vpc_attachment_resource_gen.go b/internal/aws/ec2/transit_gateway_vpc_attachment_resource_gen.go index 0bb28828d..3d2040505 100644 --- a/internal/aws/ec2/transit_gateway_vpc_attachment_resource_gen.go +++ b/internal/aws/ec2/transit_gateway_vpc_attachment_resource_gen.go @@ -54,7 +54,7 @@ func transitGatewayVpcAttachmentResource(ctx context.Context) (resource.Resource // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "transit_gateway_vpc_attachment_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -229,6 +229,15 @@ func transitGatewayVpcAttachmentResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::TransitGatewayVpcAttachment", Version: 1, @@ -239,21 +248,20 @@ func transitGatewayVpcAttachmentResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayVpcAttachment").WithTerraformTypeName("awscc_ec2_transit_gateway_vpc_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "add_subnet_ids": "AddSubnetIds", - "appliance_mode_support": "ApplianceModeSupport", - "dns_support": "DnsSupport", - "id": "Id", - "ipv_6_support": "Ipv6Support", - "key": "Key", - "options": "Options", - "remove_subnet_ids": "RemoveSubnetIds", - "subnet_ids": "SubnetIds", - "tags": "Tags", - "transit_gateway_id": "TransitGatewayId", - "value": "Value", - "vpc_id": "VpcId", + "add_subnet_ids": "AddSubnetIds", + "appliance_mode_support": "ApplianceModeSupport", + "dns_support": "DnsSupport", + "ipv_6_support": "Ipv6Support", + "key": "Key", + "options": "Options", + "remove_subnet_ids": "RemoveSubnetIds", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "transit_gateway_id": "TransitGatewayId", + "transit_gateway_vpc_attachment_id": "Id", + "value": "Value", + "vpc_id": "VpcId", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/ec2/transit_gateway_vpc_attachment_singular_data_source_gen.go b/internal/aws/ec2/transit_gateway_vpc_attachment_singular_data_source_gen.go index 4bc6815a7..0ec788d68 100644 --- a/internal/aws/ec2/transit_gateway_vpc_attachment_singular_data_source_gen.go +++ b/internal/aws/ec2/transit_gateway_vpc_attachment_singular_data_source_gen.go @@ -44,7 +44,7 @@ func transitGatewayVpcAttachmentDataSource(ctx context.Context) (datasource.Data // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "transit_gateway_vpc_attachment_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Options @@ -194,19 +194,19 @@ func transitGatewayVpcAttachmentDataSource(ctx context.Context) (datasource.Data opts = opts.WithCloudFormationTypeName("AWS::EC2::TransitGatewayVpcAttachment").WithTerraformTypeName("awscc_ec2_transit_gateway_vpc_attachment") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "add_subnet_ids": "AddSubnetIds", - "appliance_mode_support": "ApplianceModeSupport", - "dns_support": "DnsSupport", - "id": "Id", - "ipv_6_support": "Ipv6Support", - "key": "Key", - "options": "Options", - "remove_subnet_ids": "RemoveSubnetIds", - "subnet_ids": "SubnetIds", - "tags": "Tags", - "transit_gateway_id": "TransitGatewayId", - "value": "Value", - "vpc_id": "VpcId", + "add_subnet_ids": "AddSubnetIds", + "appliance_mode_support": "ApplianceModeSupport", + "dns_support": "DnsSupport", + "ipv_6_support": "Ipv6Support", + "key": "Key", + "options": "Options", + "remove_subnet_ids": "RemoveSubnetIds", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "transit_gateway_id": "TransitGatewayId", + "transit_gateway_vpc_attachment_id": "Id", + "value": "Value", + "vpc_id": "VpcId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ec2/verified_access_endpoint_resource_gen.go b/internal/aws/ec2/verified_access_endpoint_resource_gen.go index f5a51abd2..8534d0086 100644 --- a/internal/aws/ec2/verified_access_endpoint_resource_gen.go +++ b/internal/aws/ec2/verified_access_endpoint_resource_gen.go @@ -537,6 +537,7 @@ func verifiedAccessEndpointResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -555,7 +556,6 @@ func verifiedAccessEndpointResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::EC2::VerifiedAccessEndpoint").WithTerraformTypeName("awscc_ec2_verified_access_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_domain": "ApplicationDomain", "attachment_type": "AttachmentType", diff --git a/internal/aws/ec2/verified_access_group_resource_gen.go b/internal/aws/ec2/verified_access_group_resource_gen.go index 37d8a11af..8907e95b0 100644 --- a/internal/aws/ec2/verified_access_group_resource_gen.go +++ b/internal/aws/ec2/verified_access_group_resource_gen.go @@ -263,6 +263,7 @@ func verifiedAccessGroupResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -281,7 +282,6 @@ func verifiedAccessGroupResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::EC2::VerifiedAccessGroup").WithTerraformTypeName("awscc_ec2_verified_access_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "customer_managed_key_enabled": "CustomerManagedKeyEnabled", diff --git a/internal/aws/ec2/verified_access_instance_resource_gen.go b/internal/aws/ec2/verified_access_instance_resource_gen.go index 408f59775..1d8236d5c 100644 --- a/internal/aws/ec2/verified_access_instance_resource_gen.go +++ b/internal/aws/ec2/verified_access_instance_resource_gen.go @@ -483,6 +483,7 @@ func verifiedAccessInstanceResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -501,7 +502,6 @@ func verifiedAccessInstanceResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::EC2::VerifiedAccessInstance").WithTerraformTypeName("awscc_ec2_verified_access_instance") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket_name": "BucketName", "bucket_owner": "BucketOwner", diff --git a/internal/aws/ec2/verified_access_trust_provider_resource_gen.go b/internal/aws/ec2/verified_access_trust_provider_resource_gen.go index 1a85e6407..732a59d29 100644 --- a/internal/aws/ec2/verified_access_trust_provider_resource_gen.go +++ b/internal/aws/ec2/verified_access_trust_provider_resource_gen.go @@ -412,6 +412,7 @@ func verifiedAccessTrustProviderResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -430,7 +431,6 @@ func verifiedAccessTrustProviderResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::EC2::VerifiedAccessTrustProvider").WithTerraformTypeName("awscc_ec2_verified_access_trust_provider") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "authorization_endpoint": "AuthorizationEndpoint", "client_id": "ClientId", diff --git a/internal/aws/ec2/volume_attachment_resource_gen.go b/internal/aws/ec2/volume_attachment_resource_gen.go index 2b34f1f4d..383062f92 100644 --- a/internal/aws/ec2/volume_attachment_resource_gen.go +++ b/internal/aws/ec2/volume_attachment_resource_gen.go @@ -70,6 +70,7 @@ func volumeAttachmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -88,7 +89,6 @@ func volumeAttachmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::VolumeAttachment").WithTerraformTypeName("awscc_ec2_volume_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "device": "Device", "instance_id": "InstanceId", diff --git a/internal/aws/ec2/volume_resource_gen.go b/internal/aws/ec2/volume_resource_gen.go index 04a0c9929..c10c9d1fa 100644 --- a/internal/aws/ec2/volume_resource_gen.go +++ b/internal/aws/ec2/volume_resource_gen.go @@ -255,6 +255,7 @@ func volumeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -273,7 +274,6 @@ func volumeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::Volume").WithTerraformTypeName("awscc_ec2_volume") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_enable_io": "AutoEnableIO", "availability_zone": "AvailabilityZone", diff --git a/internal/aws/ec2/vpc_cidr_block_resource_gen.go b/internal/aws/ec2/vpc_cidr_block_resource_gen.go index 59bdf8fe9..ed0fe5faf 100644 --- a/internal/aws/ec2/vpc_cidr_block_resource_gen.go +++ b/internal/aws/ec2/vpc_cidr_block_resource_gen.go @@ -65,7 +65,7 @@ func vPCCidrBlockResource(ctx context.Context) (resource.Resource, error) { // "description": "The Id of the VPC associated CIDR Block.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_cidr_block_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Id of the VPC associated CIDR Block.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -188,6 +188,15 @@ func vPCCidrBlockResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::VPCCidrBlock", Version: 1, @@ -198,17 +207,16 @@ func vPCCidrBlockResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCCidrBlock").WithTerraformTypeName("awscc_ec2_vpc_cidr_block") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "amazon_provided_ipv_6_cidr_block": "AmazonProvidedIpv6CidrBlock", "cidr_block": "CidrBlock", - "id": "Id", "ipv_4_ipam_pool_id": "Ipv4IpamPoolId", "ipv_4_netmask_length": "Ipv4NetmaskLength", "ipv_6_cidr_block": "Ipv6CidrBlock", "ipv_6_ipam_pool_id": "Ipv6IpamPoolId", "ipv_6_netmask_length": "Ipv6NetmaskLength", "ipv_6_pool": "Ipv6Pool", + "vpc_cidr_block_id": "Id", "vpc_id": "VpcId", }) diff --git a/internal/aws/ec2/vpc_cidr_block_singular_data_source_gen.go b/internal/aws/ec2/vpc_cidr_block_singular_data_source_gen.go index 3acb45fbe..0db624e71 100644 --- a/internal/aws/ec2/vpc_cidr_block_singular_data_source_gen.go +++ b/internal/aws/ec2/vpc_cidr_block_singular_data_source_gen.go @@ -51,7 +51,7 @@ func vPCCidrBlockDataSource(ctx context.Context) (datasource.DataSource, error) // "description": "The Id of the VPC associated CIDR Block.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_cidr_block_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Id of the VPC associated CIDR Block.", Computed: true, }, /*END ATTRIBUTE*/ @@ -151,13 +151,13 @@ func vPCCidrBlockDataSource(ctx context.Context) (datasource.DataSource, error) opts = opts.WithAttributeNameMap(map[string]string{ "amazon_provided_ipv_6_cidr_block": "AmazonProvidedIpv6CidrBlock", "cidr_block": "CidrBlock", - "id": "Id", "ipv_4_ipam_pool_id": "Ipv4IpamPoolId", "ipv_4_netmask_length": "Ipv4NetmaskLength", "ipv_6_cidr_block": "Ipv6CidrBlock", "ipv_6_ipam_pool_id": "Ipv6IpamPoolId", "ipv_6_netmask_length": "Ipv6NetmaskLength", "ipv_6_pool": "Ipv6Pool", + "vpc_cidr_block_id": "Id", "vpc_id": "VpcId", }) diff --git a/internal/aws/ec2/vpc_endpoint_connection_notification_resource_gen.go b/internal/aws/ec2/vpc_endpoint_connection_notification_resource_gen.go index 7e5e6834f..9c7696f4f 100644 --- a/internal/aws/ec2/vpc_endpoint_connection_notification_resource_gen.go +++ b/internal/aws/ec2/vpc_endpoint_connection_notification_resource_gen.go @@ -104,6 +104,7 @@ func vPCEndpointConnectionNotificationResource(ctx context.Context) (resource.Re }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -122,7 +123,6 @@ func vPCEndpointConnectionNotificationResource(ctx context.Context) (resource.Re opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCEndpointConnectionNotification").WithTerraformTypeName("awscc_ec2_vpc_endpoint_connection_notification") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "connection_events": "ConnectionEvents", "connection_notification_arn": "ConnectionNotificationArn", diff --git a/internal/aws/ec2/vpc_endpoint_resource_gen.go b/internal/aws/ec2/vpc_endpoint_resource_gen.go index a3cbe0b38..60e91116f 100644 --- a/internal/aws/ec2/vpc_endpoint_resource_gen.go +++ b/internal/aws/ec2/vpc_endpoint_resource_gen.go @@ -72,7 +72,7 @@ func vPCEndpointResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -251,6 +251,15 @@ func vPCEndpointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Specifies a VPC endpoint. A VPC endpoint provides a private connection between your VPC and an endpoint service. You can use an endpoint service provided by AWS, an MKT Partner, or another AWS accounts in your organization. For more information, see the [User Guide](https://docs.aws.amazon.com/vpc/latest/privatelink/).\n An endpoint of type ``Interface`` establishes connections between the subnets in your VPC and an AWS-service, your own service, or a service hosted by another AWS-account. With an interface VPC endpoint, you specify the subnets in which to create the endpoint and the security groups to associate with the endpoint network interfaces.\n An endpoint of type ``gateway`` serves as a target for a route in your route table for traffic destined for S3 or DDB. You can specify an endpoint policy for the endpoint, which controls access to the service from your VPC. You can also specify the VPC route tables that use the endpoint. For more information about connectivity to S3, see [W", Version: 1, @@ -261,11 +270,9 @@ func vPCEndpointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCEndpoint").WithTerraformTypeName("awscc_ec2_vpc_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "creation_timestamp": "CreationTimestamp", "dns_entries": "DnsEntries", - "id": "Id", "network_interface_ids": "NetworkInterfaceIds", "policy_document": "PolicyDocument", "private_dns_enabled": "PrivateDnsEnabled", @@ -273,6 +280,7 @@ func vPCEndpointResource(ctx context.Context) (resource.Resource, error) { "security_group_ids": "SecurityGroupIds", "service_name": "ServiceName", "subnet_ids": "SubnetIds", + "vpc_endpoint_id": "Id", "vpc_endpoint_type": "VpcEndpointType", "vpc_id": "VpcId", }) diff --git a/internal/aws/ec2/vpc_endpoint_service_permissions_resource_gen.go b/internal/aws/ec2/vpc_endpoint_service_permissions_resource_gen.go index 4130d06c4..746c8e5fc 100644 --- a/internal/aws/ec2/vpc_endpoint_service_permissions_resource_gen.go +++ b/internal/aws/ec2/vpc_endpoint_service_permissions_resource_gen.go @@ -58,6 +58,7 @@ func vPCEndpointServicePermissionsResource(ctx context.Context) (resource.Resour }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -76,7 +77,6 @@ func vPCEndpointServicePermissionsResource(ctx context.Context) (resource.Resour opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCEndpointServicePermissions").WithTerraformTypeName("awscc_ec2_vpc_endpoint_service_permissions") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_principals": "AllowedPrincipals", "service_id": "ServiceId", diff --git a/internal/aws/ec2/vpc_endpoint_service_resource_gen.go b/internal/aws/ec2/vpc_endpoint_service_resource_gen.go index 0030a898b..159c9f132 100644 --- a/internal/aws/ec2/vpc_endpoint_service_resource_gen.go +++ b/internal/aws/ec2/vpc_endpoint_service_resource_gen.go @@ -117,6 +117,7 @@ func vPCEndpointServiceResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -135,7 +136,6 @@ func vPCEndpointServiceResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCEndpointService").WithTerraformTypeName("awscc_ec2_vpc_endpoint_service") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acceptance_required": "AcceptanceRequired", "contributor_insights_enabled": "ContributorInsightsEnabled", diff --git a/internal/aws/ec2/vpc_endpoint_singular_data_source_gen.go b/internal/aws/ec2/vpc_endpoint_singular_data_source_gen.go index c006b5029..c6430af47 100644 --- a/internal/aws/ec2/vpc_endpoint_singular_data_source_gen.go +++ b/internal/aws/ec2/vpc_endpoint_singular_data_source_gen.go @@ -58,7 +58,7 @@ func vPCEndpointDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -209,7 +209,6 @@ func vPCEndpointDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithAttributeNameMap(map[string]string{ "creation_timestamp": "CreationTimestamp", "dns_entries": "DnsEntries", - "id": "Id", "network_interface_ids": "NetworkInterfaceIds", "policy_document": "PolicyDocument", "private_dns_enabled": "PrivateDnsEnabled", @@ -217,6 +216,7 @@ func vPCEndpointDataSource(ctx context.Context) (datasource.DataSource, error) { "security_group_ids": "SecurityGroupIds", "service_name": "ServiceName", "subnet_ids": "SubnetIds", + "vpc_endpoint_id": "Id", "vpc_endpoint_type": "VpcEndpointType", "vpc_id": "VpcId", }) diff --git a/internal/aws/ec2/vpc_gateway_attachment_resource_gen.go b/internal/aws/ec2/vpc_gateway_attachment_resource_gen.go index eb422b8fd..8efc8b5c5 100644 --- a/internal/aws/ec2/vpc_gateway_attachment_resource_gen.go +++ b/internal/aws/ec2/vpc_gateway_attachment_resource_gen.go @@ -84,6 +84,7 @@ func vPCGatewayAttachmentResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -102,7 +103,6 @@ func vPCGatewayAttachmentResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCGatewayAttachment").WithTerraformTypeName("awscc_ec2_vpc_gateway_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_type": "AttachmentType", "internet_gateway_id": "InternetGatewayId", diff --git a/internal/aws/ec2/vpc_peering_connection_resource_gen.go b/internal/aws/ec2/vpc_peering_connection_resource_gen.go index 88a7004da..c8aad32ac 100644 --- a/internal/aws/ec2/vpc_peering_connection_resource_gen.go +++ b/internal/aws/ec2/vpc_peering_connection_resource_gen.go @@ -31,7 +31,7 @@ func vPCPeeringConnectionResource(ctx context.Context) (resource.Resource, error // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_peering_connection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -165,6 +165,15 @@ func vPCPeeringConnectionResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EC2::VPCPeeringConnection", Version: 1, @@ -175,17 +184,16 @@ func vPCPeeringConnectionResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCPeeringConnection").WithTerraformTypeName("awscc_ec2_vpc_peering_connection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "key": "Key", - "peer_owner_id": "PeerOwnerId", - "peer_region": "PeerRegion", - "peer_role_arn": "PeerRoleArn", - "peer_vpc_id": "PeerVpcId", - "tags": "Tags", - "value": "Value", - "vpc_id": "VpcId", + "key": "Key", + "peer_owner_id": "PeerOwnerId", + "peer_region": "PeerRegion", + "peer_role_arn": "PeerRoleArn", + "peer_vpc_id": "PeerVpcId", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", + "vpc_peering_connection_id": "Id", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/ec2/vpc_peering_connection_singular_data_source_gen.go b/internal/aws/ec2/vpc_peering_connection_singular_data_source_gen.go index ae0d5b549..5e5f61bf8 100644 --- a/internal/aws/ec2/vpc_peering_connection_singular_data_source_gen.go +++ b/internal/aws/ec2/vpc_peering_connection_singular_data_source_gen.go @@ -28,7 +28,7 @@ func vPCPeeringConnectionDataSource(ctx context.Context) (datasource.DataSource, // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_peering_connection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: PeerOwnerId @@ -147,15 +147,15 @@ func vPCPeeringConnectionDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCPeeringConnection").WithTerraformTypeName("awscc_ec2_vpc_peering_connection") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "key": "Key", - "peer_owner_id": "PeerOwnerId", - "peer_region": "PeerRegion", - "peer_role_arn": "PeerRoleArn", - "peer_vpc_id": "PeerVpcId", - "tags": "Tags", - "value": "Value", - "vpc_id": "VpcId", + "key": "Key", + "peer_owner_id": "PeerOwnerId", + "peer_region": "PeerRegion", + "peer_role_arn": "PeerRoleArn", + "peer_vpc_id": "PeerVpcId", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", + "vpc_peering_connection_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ec2/vpc_resource_gen.go b/internal/aws/ec2/vpc_resource_gen.go index 93026d793..c5e53897d 100644 --- a/internal/aws/ec2/vpc_resource_gen.go +++ b/internal/aws/ec2/vpc_resource_gen.go @@ -262,6 +262,7 @@ func vPCResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -280,7 +281,6 @@ func vPCResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::VPC").WithTerraformTypeName("awscc_ec2_vpc") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cidr_block": "CidrBlock", "cidr_block_associations": "CidrBlockAssociations", diff --git a/internal/aws/ec2/vpcdhcp_options_association_plural_data_source_gen.go b/internal/aws/ec2/vpcdhcp_options_association_plural_data_source_gen.go new file mode 100644 index 000000000..5c1bd1405 --- /dev/null +++ b/internal/aws/ec2/vpcdhcp_options_association_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package ec2 + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_ec2_vpcdhcp_options_associations", vPCDHCPOptionsAssociationsDataSource) +} + +// vPCDHCPOptionsAssociationsDataSource returns the Terraform awscc_ec2_vpcdhcp_options_associations data source. +// This Terraform data source corresponds to the CloudFormation AWS::EC2::VPCDHCPOptionsAssociation resource. +func vPCDHCPOptionsAssociationsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::EC2::VPCDHCPOptionsAssociation", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCDHCPOptionsAssociation").WithTerraformTypeName("awscc_ec2_vpcdhcp_options_associations") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ec2/vpcdhcp_options_association_plural_data_source_gen_test.go b/internal/aws/ec2/vpcdhcp_options_association_plural_data_source_gen_test.go new file mode 100644 index 000000000..55d9f5314 --- /dev/null +++ b/internal/aws/ec2/vpcdhcp_options_association_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package ec2_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSEC2VPCDHCPOptionsAssociationsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::EC2::VPCDHCPOptionsAssociation", "awscc_ec2_vpcdhcp_options_associations", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/ec2/vpcdhcp_options_association_resource_gen.go b/internal/aws/ec2/vpcdhcp_options_association_resource_gen.go new file mode 100644 index 000000000..736fbfe57 --- /dev/null +++ b/internal/aws/ec2/vpcdhcp_options_association_resource_gen.go @@ -0,0 +1,92 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package ec2 + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_ec2_vpcdhcp_options_association", vPCDHCPOptionsAssociationResource) +} + +// vPCDHCPOptionsAssociationResource returns the Terraform awscc_ec2_vpcdhcp_options_association resource. +// This Terraform resource corresponds to the CloudFormation AWS::EC2::VPCDHCPOptionsAssociation resource. +func vPCDHCPOptionsAssociationResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DhcpOptionsId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the DHCP options set, or default to associate no DHCP options with the VPC.", + // "type": "string" + // } + "dhcp_options_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the DHCP options set, or default to associate no DHCP options with the VPC.", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VpcId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the VPC.", + // "type": "string" + // } + "vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the VPC.", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Associates a set of DHCP options with a VPC, or associates no DHCP options with the VPC.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCDHCPOptionsAssociation").WithTerraformTypeName("awscc_ec2_vpcdhcp_options_association") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "dhcp_options_id": "DhcpOptionsId", + "vpc_id": "VpcId", + }) + + opts = opts.IsImmutableType(true) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ec2/vpcdhcp_options_association_resource_gen_test.go b/internal/aws/ec2/vpcdhcp_options_association_resource_gen_test.go new file mode 100644 index 000000000..eb216d8b8 --- /dev/null +++ b/internal/aws/ec2/vpcdhcp_options_association_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package ec2_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSEC2VPCDHCPOptionsAssociation_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::EC2::VPCDHCPOptionsAssociation", "awscc_ec2_vpcdhcp_options_association", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/ec2/vpcdhcp_options_association_singular_data_source_gen.go b/internal/aws/ec2/vpcdhcp_options_association_singular_data_source_gen.go new file mode 100644 index 000000000..7c63b8d03 --- /dev/null +++ b/internal/aws/ec2/vpcdhcp_options_association_singular_data_source_gen.go @@ -0,0 +1,75 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package ec2 + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_ec2_vpcdhcp_options_association", vPCDHCPOptionsAssociationDataSource) +} + +// vPCDHCPOptionsAssociationDataSource returns the Terraform awscc_ec2_vpcdhcp_options_association data source. +// This Terraform data source corresponds to the CloudFormation AWS::EC2::VPCDHCPOptionsAssociation resource. +func vPCDHCPOptionsAssociationDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DhcpOptionsId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the DHCP options set, or default to associate no DHCP options with the VPC.", + // "type": "string" + // } + "dhcp_options_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the DHCP options set, or default to associate no DHCP options with the VPC.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VpcId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the VPC.", + // "type": "string" + // } + "vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the VPC.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::EC2::VPCDHCPOptionsAssociation", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::EC2::VPCDHCPOptionsAssociation").WithTerraformTypeName("awscc_ec2_vpcdhcp_options_association") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "dhcp_options_id": "DhcpOptionsId", + "vpc_id": "VpcId", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ec2/vpcdhcp_options_association_singular_data_source_gen_test.go b/internal/aws/ec2/vpcdhcp_options_association_singular_data_source_gen_test.go new file mode 100644 index 000000000..9e2ce8542 --- /dev/null +++ b/internal/aws/ec2/vpcdhcp_options_association_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package ec2_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSEC2VPCDHCPOptionsAssociationDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::EC2::VPCDHCPOptionsAssociation", "awscc_ec2_vpcdhcp_options_association", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSEC2VPCDHCPOptionsAssociationDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::EC2::VPCDHCPOptionsAssociation", "awscc_ec2_vpcdhcp_options_association", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/ec2/vpn_connection_resource_gen.go b/internal/aws/ec2/vpn_connection_resource_gen.go index 417e94f34..92c6183cd 100644 --- a/internal/aws/ec2/vpn_connection_resource_gen.go +++ b/internal/aws/ec2/vpn_connection_resource_gen.go @@ -215,6 +215,7 @@ func vPNConnectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -233,7 +234,6 @@ func vPNConnectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::VPNConnection").WithTerraformTypeName("awscc_ec2_vpn_connection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "customer_gateway_id": "CustomerGatewayId", "key": "Key", diff --git a/internal/aws/ec2/vpn_connection_route_resource_gen.go b/internal/aws/ec2/vpn_connection_route_resource_gen.go index 1fd30d7da..37cfd5576 100644 --- a/internal/aws/ec2/vpn_connection_route_resource_gen.go +++ b/internal/aws/ec2/vpn_connection_route_resource_gen.go @@ -54,6 +54,7 @@ func vPNConnectionRouteResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -72,7 +73,6 @@ func vPNConnectionRouteResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::EC2::VPNConnectionRoute").WithTerraformTypeName("awscc_ec2_vpn_connection_route") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "destination_cidr_block": "DestinationCidrBlock", "vpn_connection_id": "VpnConnectionId", diff --git a/internal/aws/ec2/vpn_gateway_resource_gen.go b/internal/aws/ec2/vpn_gateway_resource_gen.go index 5663d5730..dd1b60ad9 100644 --- a/internal/aws/ec2/vpn_gateway_resource_gen.go +++ b/internal/aws/ec2/vpn_gateway_resource_gen.go @@ -119,6 +119,7 @@ func vPNGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -137,7 +138,6 @@ func vPNGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EC2::VPNGateway").WithTerraformTypeName("awscc_ec2_vpn_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "amazon_side_asn": "AmazonSideAsn", "key": "Key", diff --git a/internal/aws/ecr/public_repository_resource_gen.go b/internal/aws/ecr/public_repository_resource_gen.go index c036c42f1..0af8cc5d9 100644 --- a/internal/aws/ecr/public_repository_resource_gen.go +++ b/internal/aws/ecr/public_repository_resource_gen.go @@ -274,6 +274,7 @@ func publicRepositoryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -292,7 +293,6 @@ func publicRepositoryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECR::PublicRepository").WithTerraformTypeName("awscc_ecr_public_repository") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "about_text": "AboutText", "architectures": "Architectures", diff --git a/internal/aws/ecr/pull_through_cache_rule_resource_gen.go b/internal/aws/ecr/pull_through_cache_rule_resource_gen.go index 66839ceae..6cbe60495 100644 --- a/internal/aws/ecr/pull_through_cache_rule_resource_gen.go +++ b/internal/aws/ecr/pull_through_cache_rule_resource_gen.go @@ -109,6 +109,7 @@ func pullThroughCacheRuleResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -127,7 +128,6 @@ func pullThroughCacheRuleResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::ECR::PullThroughCacheRule").WithTerraformTypeName("awscc_ecr_pull_through_cache_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "credential_arn": "CredentialArn", "ecr_repository_prefix": "EcrRepositoryPrefix", diff --git a/internal/aws/ecr/registry_policy_resource_gen.go b/internal/aws/ecr/registry_policy_resource_gen.go index a9ffc2ca1..cc11997e6 100644 --- a/internal/aws/ecr/registry_policy_resource_gen.go +++ b/internal/aws/ecr/registry_policy_resource_gen.go @@ -56,6 +56,7 @@ func registryPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -74,7 +75,6 @@ func registryPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECR::RegistryPolicy").WithTerraformTypeName("awscc_ecr_registry_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy_text": "PolicyText", "registry_id": "RegistryId", diff --git a/internal/aws/ecr/replication_configuration_resource_gen.go b/internal/aws/ecr/replication_configuration_resource_gen.go index 03e2171e0..ff6b860ec 100644 --- a/internal/aws/ecr/replication_configuration_resource_gen.go +++ b/internal/aws/ecr/replication_configuration_resource_gen.go @@ -210,6 +210,7 @@ func replicationConfigurationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -228,7 +229,6 @@ func replicationConfigurationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::ECR::ReplicationConfiguration").WithTerraformTypeName("awscc_ecr_replication_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "destinations": "Destinations", "filter": "Filter", diff --git a/internal/aws/ecr/repository_resource_gen.go b/internal/aws/ecr/repository_resource_gen.go index 988059709..6ce68028d 100644 --- a/internal/aws/ecr/repository_resource_gen.go +++ b/internal/aws/ecr/repository_resource_gen.go @@ -359,6 +359,7 @@ func repositoryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -377,7 +378,6 @@ func repositoryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECR::Repository").WithTerraformTypeName("awscc_ecr_repository") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "empty_on_delete": "EmptyOnDelete", diff --git a/internal/aws/ecs/capacity_provider_resource_gen.go b/internal/aws/ecs/capacity_provider_resource_gen.go index 17470336c..ebbc4ceab 100644 --- a/internal/aws/ecs/capacity_provider_resource_gen.go +++ b/internal/aws/ecs/capacity_provider_resource_gen.go @@ -250,6 +250,7 @@ func capacityProviderResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -268,7 +269,6 @@ func capacityProviderResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECS::CapacityProvider").WithTerraformTypeName("awscc_ecs_capacity_provider") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_group_arn": "AutoScalingGroupArn", "auto_scaling_group_provider": "AutoScalingGroupProvider", diff --git a/internal/aws/ecs/cluster_capacity_provider_associations_resource_gen.go b/internal/aws/ecs/cluster_capacity_provider_associations_resource_gen.go index 625212e40..60d1c8660 100644 --- a/internal/aws/ecs/cluster_capacity_provider_associations_resource_gen.go +++ b/internal/aws/ecs/cluster_capacity_provider_associations_resource_gen.go @@ -144,6 +144,7 @@ func clusterCapacityProviderAssociationsResource(ctx context.Context) (resource. }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -162,7 +163,6 @@ func clusterCapacityProviderAssociationsResource(ctx context.Context) (resource. opts = opts.WithCloudFormationTypeName("AWS::ECS::ClusterCapacityProviderAssociations").WithTerraformTypeName("awscc_ecs_cluster_capacity_provider_associations") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "base": "Base", "capacity_provider": "CapacityProvider", diff --git a/internal/aws/ecs/cluster_resource_gen.go b/internal/aws/ecs/cluster_resource_gen.go index 07ffb5f1c..ce4c6d2f1 100644 --- a/internal/aws/ecs/cluster_resource_gen.go +++ b/internal/aws/ecs/cluster_resource_gen.go @@ -394,6 +394,7 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -412,7 +413,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECS::Cluster").WithTerraformTypeName("awscc_ecs_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "base": "Base", diff --git a/internal/aws/ecs/primary_task_set_resource_gen.go b/internal/aws/ecs/primary_task_set_resource_gen.go index 5daff0578..7f5523815 100644 --- a/internal/aws/ecs/primary_task_set_resource_gen.go +++ b/internal/aws/ecs/primary_task_set_resource_gen.go @@ -65,6 +65,7 @@ func primaryTaskSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -83,7 +84,6 @@ func primaryTaskSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECS::PrimaryTaskSet").WithTerraformTypeName("awscc_ecs_primary_task_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster": "Cluster", "service": "Service", diff --git a/internal/aws/ecs/service_resource_gen.go b/internal/aws/ecs/service_resource_gen.go index 47c294f49..77d3b4efb 100644 --- a/internal/aws/ecs/service_resource_gen.go +++ b/internal/aws/ecs/service_resource_gen.go @@ -1613,6 +1613,7 @@ func serviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1631,7 +1632,6 @@ func serviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECS::Service").WithTerraformTypeName("awscc_ecs_service") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarm_names": "AlarmNames", "alarms": "Alarms", diff --git a/internal/aws/ecs/task_definition_resource_gen.go b/internal/aws/ecs/task_definition_resource_gen.go index 670afa68b..7f5f7b0c9 100644 --- a/internal/aws/ecs/task_definition_resource_gen.go +++ b/internal/aws/ecs/task_definition_resource_gen.go @@ -2431,6 +2431,7 @@ func taskDefinitionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -2449,7 +2450,6 @@ func taskDefinitionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECS::TaskDefinition").WithTerraformTypeName("awscc_ecs_task_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_point_id": "AccessPointId", "add": "Add", diff --git a/internal/aws/ecs/task_set_resource_gen.go b/internal/aws/ecs/task_set_resource_gen.go index bcc1623ac..9bf602617 100644 --- a/internal/aws/ecs/task_set_resource_gen.go +++ b/internal/aws/ecs/task_set_resource_gen.go @@ -70,7 +70,7 @@ func taskSetResource(ctx context.Context) (resource.Resource, error) { // "description": "The ID of the task set.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "task_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the task set.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -498,6 +498,15 @@ func taskSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Create a task set in the specified cluster and service. This is used when a service uses the EXTERNAL deployment controller type. For more information, see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.htmlin the Amazon Elastic Container Service Developer Guide.", Version: 1, @@ -508,7 +517,6 @@ func taskSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ECS::TaskSet").WithTerraformTypeName("awscc_ecs_task_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "assign_public_ip": "AssignPublicIp", "aws_vpc_configuration": "AwsVpcConfiguration", @@ -516,7 +524,6 @@ func taskSetResource(ctx context.Context) (resource.Resource, error) { "container_name": "ContainerName", "container_port": "ContainerPort", "external_id": "ExternalId", - "id": "Id", "key": "Key", "launch_type": "LaunchType", "load_balancers": "LoadBalancers", @@ -532,6 +539,7 @@ func taskSetResource(ctx context.Context) (resource.Resource, error) { "tags": "Tags", "target_group_arn": "TargetGroupArn", "task_definition": "TaskDefinition", + "task_set_id": "Id", "unit": "Unit", "value": "Value", }) diff --git a/internal/aws/ecs/task_set_singular_data_source_gen.go b/internal/aws/ecs/task_set_singular_data_source_gen.go index 8004ae27c..3b42968d7 100644 --- a/internal/aws/ecs/task_set_singular_data_source_gen.go +++ b/internal/aws/ecs/task_set_singular_data_source_gen.go @@ -52,7 +52,7 @@ func taskSetDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "The ID of the task set.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "task_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the task set.", Computed: true, }, /*END ATTRIBUTE*/ @@ -377,7 +377,6 @@ func taskSetDataSource(ctx context.Context) (datasource.DataSource, error) { "container_name": "ContainerName", "container_port": "ContainerPort", "external_id": "ExternalId", - "id": "Id", "key": "Key", "launch_type": "LaunchType", "load_balancers": "LoadBalancers", @@ -393,6 +392,7 @@ func taskSetDataSource(ctx context.Context) (datasource.DataSource, error) { "tags": "Tags", "target_group_arn": "TargetGroupArn", "task_definition": "TaskDefinition", + "task_set_id": "Id", "unit": "Unit", "value": "Value", }) diff --git a/internal/aws/efs/access_point_resource_gen.go b/internal/aws/efs/access_point_resource_gen.go index 933e56d21..618ac8388 100644 --- a/internal/aws/efs/access_point_resource_gen.go +++ b/internal/aws/efs/access_point_resource_gen.go @@ -317,6 +317,7 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -335,7 +336,6 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EFS::AccessPoint").WithTerraformTypeName("awscc_efs_access_point") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_point_id": "AccessPointId", "access_point_tags": "AccessPointTags", diff --git a/internal/aws/efs/file_system_resource_gen.go b/internal/aws/efs/file_system_resource_gen.go index 92b023c5c..8f0f86a62 100644 --- a/internal/aws/efs/file_system_resource_gen.go +++ b/internal/aws/efs/file_system_resource_gen.go @@ -495,6 +495,7 @@ func fileSystemResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -513,7 +514,6 @@ func fileSystemResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EFS::FileSystem").WithTerraformTypeName("awscc_efs_file_system") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "availability_zone_name": "AvailabilityZoneName", diff --git a/internal/aws/efs/mount_target_resource_gen.go b/internal/aws/efs/mount_target_resource_gen.go index 06e8b03d4..fb5b119a1 100644 --- a/internal/aws/efs/mount_target_resource_gen.go +++ b/internal/aws/efs/mount_target_resource_gen.go @@ -46,7 +46,7 @@ func mountTargetResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "mount_target_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -102,6 +102,15 @@ func mountTargetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The ``AWS::EFS::MountTarget`` resource is an Amazon EFS resource that creates a mount target for an EFS file system. You can then mount the file system on Amazon EC2 instances or other resources by using the mount target.", Version: 1, @@ -112,11 +121,10 @@ func mountTargetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EFS::MountTarget").WithTerraformTypeName("awscc_efs_mount_target") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "file_system_id": "FileSystemId", - "id": "Id", "ip_address": "IpAddress", + "mount_target_id": "Id", "security_groups": "SecurityGroups", "subnet_id": "SubnetId", }) diff --git a/internal/aws/efs/mount_target_singular_data_source_gen.go b/internal/aws/efs/mount_target_singular_data_source_gen.go index ea9607819..b588d2ab8 100644 --- a/internal/aws/efs/mount_target_singular_data_source_gen.go +++ b/internal/aws/efs/mount_target_singular_data_source_gen.go @@ -41,7 +41,7 @@ func mountTargetDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "mount_target_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -102,8 +102,8 @@ func mountTargetDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "file_system_id": "FileSystemId", - "id": "Id", "ip_address": "IpAddress", + "mount_target_id": "Id", "security_groups": "SecurityGroups", "subnet_id": "SubnetId", }) diff --git a/internal/aws/eks/access_entry_resource_gen.go b/internal/aws/eks/access_entry_resource_gen.go index 5f772b6be..084191c5a 100644 --- a/internal/aws/eks/access_entry_resource_gen.go +++ b/internal/aws/eks/access_entry_resource_gen.go @@ -293,6 +293,7 @@ func accessEntryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -311,7 +312,6 @@ func accessEntryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EKS::AccessEntry").WithTerraformTypeName("awscc_eks_access_entry") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_entry_arn": "AccessEntryArn", "access_policies": "AccessPolicies", diff --git a/internal/aws/eks/addon_resource_gen.go b/internal/aws/eks/addon_resource_gen.go index 7b3097473..5c15aa2fa 100644 --- a/internal/aws/eks/addon_resource_gen.go +++ b/internal/aws/eks/addon_resource_gen.go @@ -243,6 +243,7 @@ func addonResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -261,7 +262,6 @@ func addonResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EKS::Addon").WithTerraformTypeName("awscc_eks_addon") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "addon_name": "AddonName", "addon_version": "AddonVersion", diff --git a/internal/aws/eks/cluster_resource_gen.go b/internal/aws/eks/cluster_resource_gen.go index e8b4fc40f..612d5e3b4 100644 --- a/internal/aws/eks/cluster_resource_gen.go +++ b/internal/aws/eks/cluster_resource_gen.go @@ -7,8 +7,6 @@ package eks import ( "context" - "regexp" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" @@ -22,6 +20,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" + "regexp" ) func init() { @@ -32,6 +31,66 @@ func init() { // This Terraform resource corresponds to the CloudFormation AWS::EKS::Cluster resource. func clusterResource(ctx context.Context) (resource.Resource, error) { attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "An object representing the Access Config to use for the cluster.", + // "properties": { + // "AuthenticationMode": { + // "description": "Specify the authentication mode that should be used to create your cluster.", + // "enum": [ + // "CONFIG_MAP", + // "API_AND_CONFIG_MAP", + // "API" + // ], + // "type": "string" + // }, + // "BootstrapClusterCreatorAdminPermissions": { + // "description": "Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster.", + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "access_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AuthenticationMode + "authentication_mode": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specify the authentication mode that should be used to create your cluster.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "CONFIG_MAP", + "API_AND_CONFIG_MAP", + "API", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: BootstrapClusterCreatorAdminPermissions + "bootstrap_cluster_creator_admin_permissions": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + boolplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // BootstrapClusterCreatorAdminPermissions is a write-only property. + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "An object representing the Access Config to use for the cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ // Property: Arn // CloudFormation resource type schema: // @@ -179,6 +238,20 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { stringplanmodifier.UseStateForUnknown(), }, /*END PLAN MODIFIERS*/ }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The unique ID given to your cluster.", + // "type": "string" + // } + "cluster_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The unique ID given to your cluster.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ // Property: KubernetesNetworkConfig // CloudFormation resource type schema: // @@ -378,6 +451,89 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { stringplanmodifier.UseStateForUnknown(), }, /*END PLAN MODIFIERS*/ }, /*END ATTRIBUTE*/ + // Property: OutpostConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "An object representing the Outpost configuration to use for AWS EKS outpost cluster.", + // "properties": { + // "ControlPlaneInstanceType": { + // "description": "Specify the Instance type of the machines that should be used to create your cluster.", + // "type": "string" + // }, + // "ControlPlanePlacement": { + // "additionalProperties": false, + // "description": "Specify the placement group of the control plane machines for your cluster.", + // "properties": { + // "GroupName": { + // "description": "Specify the placement group name of the control place machines for your cluster.", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "OutpostArns": { + // "description": "Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster.", + // "insertionOrder": false, + // "items": { + // "minItems": 1, + // "type": "string" + // }, + // "type": "array" + // } + // }, + // "required": [ + // "OutpostArns", + // "ControlPlaneInstanceType" + // ], + // "type": "object" + // } + "outpost_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ControlPlaneInstanceType + "control_plane_instance_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specify the Instance type of the machines that should be used to create your cluster.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: ControlPlanePlacement + "control_plane_placement": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: GroupName + "group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specify the placement group name of the control place machines for your cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Specify the placement group of the control plane machines for your cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: OutpostArns + "outpost_arns": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster.", + Required: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "An object representing the Outpost configuration to use for AWS EKS outpost cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + objectplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ // Property: ResourcesVpcConfig // CloudFormation resource type schema: // @@ -466,7 +622,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ generic.Multiset(), listplanmodifier.UseStateForUnknown(), - listplanmodifier.RequiresReplace(), }, /*END PLAN MODIFIERS*/ }, /*END ATTRIBUTE*/ // Property: SubnetIds @@ -476,7 +631,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { Required: true, PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ generic.Multiset(), - listplanmodifier.RequiresReplace(), }, /*END PLAN MODIFIERS*/ }, /*END ATTRIBUTE*/ }, /*END SCHEMA*/ @@ -578,6 +732,7 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -596,43 +751,54 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EKS::Cluster").WithTerraformTypeName("awscc_eks_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "certificate_authority_data": "CertificateAuthorityData", - "cluster_logging": "ClusterLogging", - "cluster_security_group_id": "ClusterSecurityGroupId", - "enabled_types": "EnabledTypes", - "encryption_config": "EncryptionConfig", - "encryption_config_key_arn": "EncryptionConfigKeyArn", - "endpoint": "Endpoint", - "endpoint_private_access": "EndpointPrivateAccess", - "endpoint_public_access": "EndpointPublicAccess", - "ip_family": "IpFamily", - "key": "Key", - "key_arn": "KeyArn", - "kubernetes_network_config": "KubernetesNetworkConfig", - "logging": "Logging", - "name": "Name", - "open_id_connect_issuer_url": "OpenIdConnectIssuerUrl", - "provider": "Provider", - "public_access_cidrs": "PublicAccessCidrs", - "resources": "Resources", - "resources_vpc_config": "ResourcesVpcConfig", - "role_arn": "RoleArn", - "security_group_ids": "SecurityGroupIds", - "service_ipv_4_cidr": "ServiceIpv4Cidr", - "service_ipv_6_cidr": "ServiceIpv6Cidr", - "subnet_ids": "SubnetIds", - "tags": "Tags", - "type": "Type", - "value": "Value", - "version": "Version", + "access_config": "AccessConfig", + "arn": "Arn", + "authentication_mode": "AuthenticationMode", + "bootstrap_cluster_creator_admin_permissions": "BootstrapClusterCreatorAdminPermissions", + "certificate_authority_data": "CertificateAuthorityData", + "cluster_id": "Id", + "cluster_logging": "ClusterLogging", + "cluster_security_group_id": "ClusterSecurityGroupId", + "control_plane_instance_type": "ControlPlaneInstanceType", + "control_plane_placement": "ControlPlanePlacement", + "enabled_types": "EnabledTypes", + "encryption_config": "EncryptionConfig", + "encryption_config_key_arn": "EncryptionConfigKeyArn", + "endpoint": "Endpoint", + "endpoint_private_access": "EndpointPrivateAccess", + "endpoint_public_access": "EndpointPublicAccess", + "group_name": "GroupName", + "ip_family": "IpFamily", + "key": "Key", + "key_arn": "KeyArn", + "kubernetes_network_config": "KubernetesNetworkConfig", + "logging": "Logging", + "name": "Name", + "open_id_connect_issuer_url": "OpenIdConnectIssuerUrl", + "outpost_arns": "OutpostArns", + "outpost_config": "OutpostConfig", + "provider": "Provider", + "public_access_cidrs": "PublicAccessCidrs", + "resources": "Resources", + "resources_vpc_config": "ResourcesVpcConfig", + "role_arn": "RoleArn", + "security_group_ids": "SecurityGroupIds", + "service_ipv_4_cidr": "ServiceIpv4Cidr", + "service_ipv_6_cidr": "ServiceIpv6Cidr", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "type": "Type", + "value": "Value", + "version": "Version", }) + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/AccessConfig/BootstrapClusterCreatorAdminPermissions", + }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) - opts = opts.WithUpdateTimeoutInMinutes(150) + opts = opts.WithUpdateTimeoutInMinutes(180) v, err := generic.NewResource(ctx, opts...) diff --git a/internal/aws/eks/cluster_singular_data_source_gen.go b/internal/aws/eks/cluster_singular_data_source_gen.go index c20ec2bad..08577e43e 100644 --- a/internal/aws/eks/cluster_singular_data_source_gen.go +++ b/internal/aws/eks/cluster_singular_data_source_gen.go @@ -23,6 +23,45 @@ func init() { // This Terraform data source corresponds to the CloudFormation AWS::EKS::Cluster resource. func clusterDataSource(ctx context.Context) (datasource.DataSource, error) { attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "An object representing the Access Config to use for the cluster.", + // "properties": { + // "AuthenticationMode": { + // "description": "Specify the authentication mode that should be used to create your cluster.", + // "enum": [ + // "CONFIG_MAP", + // "API_AND_CONFIG_MAP", + // "API" + // ], + // "type": "string" + // }, + // "BootstrapClusterCreatorAdminPermissions": { + // "description": "Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster.", + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "access_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AuthenticationMode + "authentication_mode": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specify the authentication mode that should be used to create your cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: BootstrapClusterCreatorAdminPermissions + "bootstrap_cluster_creator_admin_permissions": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "An object representing the Access Config to use for the cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ // Property: Arn // CloudFormation resource type schema: // @@ -136,6 +175,17 @@ func clusterDataSource(ctx context.Context) (datasource.DataSource, error) { Description: "The endpoint for your Kubernetes API server, such as https://5E1D0CEXAMPLEA591B746AFC5AB30262.yl4.us-west-2.eks.amazonaws.com.", Computed: true, }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The unique ID given to your cluster.", + // "type": "string" + // } + "cluster_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The unique ID given to your cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ // Property: KubernetesNetworkConfig // CloudFormation resource type schema: // @@ -275,6 +325,73 @@ func clusterDataSource(ctx context.Context) (datasource.DataSource, error) { Description: "The issuer URL for the cluster's OIDC identity provider, such as https://oidc.eks.us-west-2.amazonaws.com/id/EXAMPLED539D4633E53DE1B716D3041E. If you need to remove https:// from this output value, you can include the following code in your template.", Computed: true, }, /*END ATTRIBUTE*/ + // Property: OutpostConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "An object representing the Outpost configuration to use for AWS EKS outpost cluster.", + // "properties": { + // "ControlPlaneInstanceType": { + // "description": "Specify the Instance type of the machines that should be used to create your cluster.", + // "type": "string" + // }, + // "ControlPlanePlacement": { + // "additionalProperties": false, + // "description": "Specify the placement group of the control plane machines for your cluster.", + // "properties": { + // "GroupName": { + // "description": "Specify the placement group name of the control place machines for your cluster.", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "OutpostArns": { + // "description": "Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster.", + // "insertionOrder": false, + // "items": { + // "minItems": 1, + // "type": "string" + // }, + // "type": "array" + // } + // }, + // "required": [ + // "OutpostArns", + // "ControlPlaneInstanceType" + // ], + // "type": "object" + // } + "outpost_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ControlPlaneInstanceType + "control_plane_instance_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specify the Instance type of the machines that should be used to create your cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ControlPlanePlacement + "control_plane_placement": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: GroupName + "group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specify the placement group name of the control place machines for your cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Specify the placement group of the control plane machines for your cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OutpostArns + "outpost_arns": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "An object representing the Outpost configuration to use for AWS EKS outpost cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ // Property: ResourcesVpcConfig // CloudFormation resource type schema: // @@ -447,36 +564,45 @@ func clusterDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::EKS::Cluster").WithTerraformTypeName("awscc_eks_cluster") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "certificate_authority_data": "CertificateAuthorityData", - "cluster_logging": "ClusterLogging", - "cluster_security_group_id": "ClusterSecurityGroupId", - "enabled_types": "EnabledTypes", - "encryption_config": "EncryptionConfig", - "encryption_config_key_arn": "EncryptionConfigKeyArn", - "endpoint": "Endpoint", - "endpoint_private_access": "EndpointPrivateAccess", - "endpoint_public_access": "EndpointPublicAccess", - "ip_family": "IpFamily", - "key": "Key", - "key_arn": "KeyArn", - "kubernetes_network_config": "KubernetesNetworkConfig", - "logging": "Logging", - "name": "Name", - "open_id_connect_issuer_url": "OpenIdConnectIssuerUrl", - "provider": "Provider", - "public_access_cidrs": "PublicAccessCidrs", - "resources": "Resources", - "resources_vpc_config": "ResourcesVpcConfig", - "role_arn": "RoleArn", - "security_group_ids": "SecurityGroupIds", - "service_ipv_4_cidr": "ServiceIpv4Cidr", - "service_ipv_6_cidr": "ServiceIpv6Cidr", - "subnet_ids": "SubnetIds", - "tags": "Tags", - "type": "Type", - "value": "Value", - "version": "Version", + "access_config": "AccessConfig", + "arn": "Arn", + "authentication_mode": "AuthenticationMode", + "bootstrap_cluster_creator_admin_permissions": "BootstrapClusterCreatorAdminPermissions", + "certificate_authority_data": "CertificateAuthorityData", + "cluster_id": "Id", + "cluster_logging": "ClusterLogging", + "cluster_security_group_id": "ClusterSecurityGroupId", + "control_plane_instance_type": "ControlPlaneInstanceType", + "control_plane_placement": "ControlPlanePlacement", + "enabled_types": "EnabledTypes", + "encryption_config": "EncryptionConfig", + "encryption_config_key_arn": "EncryptionConfigKeyArn", + "endpoint": "Endpoint", + "endpoint_private_access": "EndpointPrivateAccess", + "endpoint_public_access": "EndpointPublicAccess", + "group_name": "GroupName", + "ip_family": "IpFamily", + "key": "Key", + "key_arn": "KeyArn", + "kubernetes_network_config": "KubernetesNetworkConfig", + "logging": "Logging", + "name": "Name", + "open_id_connect_issuer_url": "OpenIdConnectIssuerUrl", + "outpost_arns": "OutpostArns", + "outpost_config": "OutpostConfig", + "provider": "Provider", + "public_access_cidrs": "PublicAccessCidrs", + "resources": "Resources", + "resources_vpc_config": "ResourcesVpcConfig", + "role_arn": "RoleArn", + "security_group_ids": "SecurityGroupIds", + "service_ipv_4_cidr": "ServiceIpv4Cidr", + "service_ipv_6_cidr": "ServiceIpv6Cidr", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "type": "Type", + "value": "Value", + "version": "Version", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/eks/fargate_profile_resource_gen.go b/internal/aws/eks/fargate_profile_resource_gen.go index b84350076..780f869b2 100644 --- a/internal/aws/eks/fargate_profile_resource_gen.go +++ b/internal/aws/eks/fargate_profile_resource_gen.go @@ -273,6 +273,7 @@ func fargateProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -291,7 +292,6 @@ func fargateProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EKS::FargateProfile").WithTerraformTypeName("awscc_eks_fargate_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "cluster_name": "ClusterName", diff --git a/internal/aws/eks/identity_provider_config_resource_gen.go b/internal/aws/eks/identity_provider_config_resource_gen.go index 2c0522193..b930e5cb3 100644 --- a/internal/aws/eks/identity_provider_config_resource_gen.go +++ b/internal/aws/eks/identity_provider_config_resource_gen.go @@ -307,6 +307,7 @@ func identityProviderConfigResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -325,7 +326,6 @@ func identityProviderConfigResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::EKS::IdentityProviderConfig").WithTerraformTypeName("awscc_eks_identity_provider_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "client_id": "ClientId", "cluster_name": "ClusterName", diff --git a/internal/aws/eks/nodegroup_resource_gen.go b/internal/aws/eks/nodegroup_resource_gen.go index 66d379dfa..efbbb12ba 100644 --- a/internal/aws/eks/nodegroup_resource_gen.go +++ b/internal/aws/eks/nodegroup_resource_gen.go @@ -137,7 +137,7 @@ func nodegroupResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "nodegroup_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -606,6 +606,15 @@ func nodegroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::EKS::Nodegroup", Version: 1, @@ -616,7 +625,6 @@ func nodegroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EKS::Nodegroup").WithTerraformTypeName("awscc_eks_nodegroup") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "ami_type": "AmiType", "arn": "Arn", @@ -638,6 +646,7 @@ func nodegroupResource(ctx context.Context) (resource.Resource, error) { "min_size": "MinSize", "name": "Name", "node_role": "NodeRole", + "nodegroup_id": "Id", "nodegroup_name": "NodegroupName", "release_version": "ReleaseVersion", "remote_access": "RemoteAccess", diff --git a/internal/aws/eks/nodegroup_singular_data_source_gen.go b/internal/aws/eks/nodegroup_singular_data_source_gen.go index 5fe104a1d..ebe8f58a6 100644 --- a/internal/aws/eks/nodegroup_singular_data_source_gen.go +++ b/internal/aws/eks/nodegroup_singular_data_source_gen.go @@ -95,7 +95,7 @@ func nodegroupDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "nodegroup_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: InstanceTypes @@ -455,6 +455,7 @@ func nodegroupDataSource(ctx context.Context) (datasource.DataSource, error) { "min_size": "MinSize", "name": "Name", "node_role": "NodeRole", + "nodegroup_id": "Id", "nodegroup_name": "NodegroupName", "release_version": "ReleaseVersion", "remote_access": "RemoteAccess", diff --git a/internal/aws/eks/pod_identity_association_resource_gen.go b/internal/aws/eks/pod_identity_association_resource_gen.go index 2af793b56..878332434 100644 --- a/internal/aws/eks/pod_identity_association_resource_gen.go +++ b/internal/aws/eks/pod_identity_association_resource_gen.go @@ -175,6 +175,7 @@ func podIdentityAssociationResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -193,7 +194,6 @@ func podIdentityAssociationResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::EKS::PodIdentityAssociation").WithTerraformTypeName("awscc_eks_pod_identity_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_arn": "AssociationArn", "association_id": "AssociationId", diff --git a/internal/aws/elasticache/global_replication_group_resource_gen.go b/internal/aws/elasticache/global_replication_group_resource_gen.go index 9b1d96a4a..2ff7bec47 100644 --- a/internal/aws/elasticache/global_replication_group_resource_gen.go +++ b/internal/aws/elasticache/global_replication_group_resource_gen.go @@ -362,6 +362,7 @@ func globalReplicationGroupResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -380,7 +381,6 @@ func globalReplicationGroupResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::GlobalReplicationGroup").WithTerraformTypeName("awscc_elasticache_global_replication_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "automatic_failover_enabled": "AutomaticFailoverEnabled", "cache_node_type": "CacheNodeType", diff --git a/internal/aws/elasticache/serverless_cache_resource_gen.go b/internal/aws/elasticache/serverless_cache_resource_gen.go index 26b919006..93e7b4eec 100644 --- a/internal/aws/elasticache/serverless_cache_resource_gen.go +++ b/internal/aws/elasticache/serverless_cache_resource_gen.go @@ -543,6 +543,7 @@ func serverlessCacheResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -561,7 +562,6 @@ func serverlessCacheResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::ServerlessCache").WithTerraformTypeName("awscc_elasticache_serverless_cache") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "arn": "ARN", diff --git a/internal/aws/elasticache/subnet_group_resource_gen.go b/internal/aws/elasticache/subnet_group_resource_gen.go index 1b4c2e237..56e5aed5b 100644 --- a/internal/aws/elasticache/subnet_group_resource_gen.go +++ b/internal/aws/elasticache/subnet_group_resource_gen.go @@ -120,6 +120,7 @@ func subnetGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -138,7 +139,6 @@ func subnetGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::SubnetGroup").WithTerraformTypeName("awscc_elasticache_subnet_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cache_subnet_group_name": "CacheSubnetGroupName", "description": "Description", diff --git a/internal/aws/elasticache/user_group_resource_gen.go b/internal/aws/elasticache/user_group_resource_gen.go index 3fe6fbb01..81b92ea8b 100644 --- a/internal/aws/elasticache/user_group_resource_gen.go +++ b/internal/aws/elasticache/user_group_resource_gen.go @@ -188,6 +188,7 @@ func userGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -206,7 +207,6 @@ func userGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::UserGroup").WithTerraformTypeName("awscc_elasticache_user_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "engine": "Engine", diff --git a/internal/aws/elasticache/user_resource_gen.go b/internal/aws/elasticache/user_resource_gen.go index e99765049..40311ec29 100644 --- a/internal/aws/elasticache/user_resource_gen.go +++ b/internal/aws/elasticache/user_resource_gen.go @@ -312,6 +312,7 @@ func userResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -330,7 +331,6 @@ func userResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElastiCache::User").WithTerraformTypeName("awscc_elasticache_user") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_string": "AccessString", "arn": "Arn", diff --git a/internal/aws/elasticbeanstalk/application_resource_gen.go b/internal/aws/elasticbeanstalk/application_resource_gen.go index 882810a4e..7ffe9fd71 100644 --- a/internal/aws/elasticbeanstalk/application_resource_gen.go +++ b/internal/aws/elasticbeanstalk/application_resource_gen.go @@ -225,6 +225,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -243,7 +244,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElasticBeanstalk::Application").WithTerraformTypeName("awscc_elasticbeanstalk_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_name": "ApplicationName", "delete_source_from_s3": "DeleteSourceFromS3", diff --git a/internal/aws/elasticbeanstalk/application_version_resource_gen.go b/internal/aws/elasticbeanstalk/application_version_resource_gen.go index 9e32dc5c5..a56c1bf40 100644 --- a/internal/aws/elasticbeanstalk/application_version_resource_gen.go +++ b/internal/aws/elasticbeanstalk/application_version_resource_gen.go @@ -60,7 +60,7 @@ func applicationVersionResource(ctx context.Context) (resource.Resource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "application_version_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -109,6 +109,15 @@ func applicationVersionResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::ElasticBeanstalk::ApplicationVersion", Version: 1, @@ -119,14 +128,13 @@ func applicationVersionResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::ElasticBeanstalk::ApplicationVersion").WithTerraformTypeName("awscc_elasticbeanstalk_application_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "application_name": "ApplicationName", - "description": "Description", - "id": "Id", - "s3_bucket": "S3Bucket", - "s3_key": "S3Key", - "source_bundle": "SourceBundle", + "application_name": "ApplicationName", + "application_version_id": "Id", + "description": "Description", + "s3_bucket": "S3Bucket", + "s3_key": "S3Key", + "source_bundle": "SourceBundle", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/elasticbeanstalk/application_version_singular_data_source_gen.go b/internal/aws/elasticbeanstalk/application_version_singular_data_source_gen.go index 540b634f6..4347a7669 100644 --- a/internal/aws/elasticbeanstalk/application_version_singular_data_source_gen.go +++ b/internal/aws/elasticbeanstalk/application_version_singular_data_source_gen.go @@ -50,7 +50,7 @@ func applicationVersionDataSource(ctx context.Context) (datasource.DataSource, e // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "application_version_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: SourceBundle @@ -108,12 +108,12 @@ func applicationVersionDataSource(ctx context.Context) (datasource.DataSource, e opts = opts.WithCloudFormationTypeName("AWS::ElasticBeanstalk::ApplicationVersion").WithTerraformTypeName("awscc_elasticbeanstalk_application_version") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "application_name": "ApplicationName", - "description": "Description", - "id": "Id", - "s3_bucket": "S3Bucket", - "s3_key": "S3Key", - "source_bundle": "SourceBundle", + "application_name": "ApplicationName", + "application_version_id": "Id", + "description": "Description", + "s3_bucket": "S3Bucket", + "s3_key": "S3Key", + "source_bundle": "SourceBundle", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/elasticbeanstalk/configuration_template_resource_gen.go b/internal/aws/elasticbeanstalk/configuration_template_resource_gen.go index f85e62aa8..906125586 100644 --- a/internal/aws/elasticbeanstalk/configuration_template_resource_gen.go +++ b/internal/aws/elasticbeanstalk/configuration_template_resource_gen.go @@ -242,6 +242,7 @@ func configurationTemplateResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -260,7 +261,6 @@ func configurationTemplateResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::ElasticBeanstalk::ConfigurationTemplate").WithTerraformTypeName("awscc_elasticbeanstalk_configuration_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_name": "ApplicationName", "description": "Description", diff --git a/internal/aws/elasticbeanstalk/environment_resource_gen.go b/internal/aws/elasticbeanstalk/environment_resource_gen.go index 28337deef..994e3a997 100644 --- a/internal/aws/elasticbeanstalk/environment_resource_gen.go +++ b/internal/aws/elasticbeanstalk/environment_resource_gen.go @@ -366,6 +366,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -384,7 +385,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElasticBeanstalk::Environment").WithTerraformTypeName("awscc_elasticbeanstalk_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_name": "ApplicationName", "cname_prefix": "CNAMEPrefix", diff --git a/internal/aws/elasticloadbalancingv2/load_balancer_resource_gen.go b/internal/aws/elasticloadbalancingv2/load_balancer_resource_gen.go index 3f215bb07..df5ff3249 100644 --- a/internal/aws/elasticloadbalancingv2/load_balancer_resource_gen.go +++ b/internal/aws/elasticloadbalancingv2/load_balancer_resource_gen.go @@ -407,6 +407,7 @@ func loadBalancerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -425,7 +426,6 @@ func loadBalancerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElasticLoadBalancingV2::LoadBalancer").WithTerraformTypeName("awscc_elasticloadbalancingv2_load_balancer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allocation_id": "AllocationId", "canonical_hosted_zone_id": "CanonicalHostedZoneID", diff --git a/internal/aws/elasticloadbalancingv2/target_group_resource_gen.go b/internal/aws/elasticloadbalancingv2/target_group_resource_gen.go index 5d7450425..186d392d0 100644 --- a/internal/aws/elasticloadbalancingv2/target_group_resource_gen.go +++ b/internal/aws/elasticloadbalancingv2/target_group_resource_gen.go @@ -542,6 +542,7 @@ func targetGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -560,7 +561,6 @@ func targetGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElasticLoadBalancingV2::TargetGroup").WithTerraformTypeName("awscc_elasticloadbalancingv2_target_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "availability_zone": "AvailabilityZone", "grpc_code": "GrpcCode", diff --git a/internal/aws/elasticloadbalancingv2/trust_store_resource_gen.go b/internal/aws/elasticloadbalancingv2/trust_store_resource_gen.go index f1a6c369c..2583c591d 100644 --- a/internal/aws/elasticloadbalancingv2/trust_store_resource_gen.go +++ b/internal/aws/elasticloadbalancingv2/trust_store_resource_gen.go @@ -180,6 +180,7 @@ func trustStoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -198,7 +199,6 @@ func trustStoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ElasticLoadBalancingV2::TrustStore").WithTerraformTypeName("awscc_elasticloadbalancingv2_trust_store") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "ca_certificates_bundle_s3_bucket": "CaCertificatesBundleS3Bucket", "ca_certificates_bundle_s3_key": "CaCertificatesBundleS3Key", diff --git a/internal/aws/elasticloadbalancingv2/trust_store_revocation_resource_gen.go b/internal/aws/elasticloadbalancingv2/trust_store_revocation_resource_gen.go index b70c2ca93..f1ae87504 100644 --- a/internal/aws/elasticloadbalancingv2/trust_store_revocation_resource_gen.go +++ b/internal/aws/elasticloadbalancingv2/trust_store_revocation_resource_gen.go @@ -187,6 +187,7 @@ func trustStoreRevocationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -205,7 +206,6 @@ func trustStoreRevocationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::ElasticLoadBalancingV2::TrustStoreRevocation").WithTerraformTypeName("awscc_elasticloadbalancingv2_trust_store_revocation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "number_of_revoked_entries": "NumberOfRevokedEntries", "revocation_contents": "RevocationContents", diff --git a/internal/aws/emr/security_configuration_resource_gen.go b/internal/aws/emr/security_configuration_resource_gen.go index f9c883fef..9dad2f1be 100644 --- a/internal/aws/emr/security_configuration_resource_gen.go +++ b/internal/aws/emr/security_configuration_resource_gen.go @@ -56,6 +56,7 @@ func securityConfigurationResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -74,7 +75,6 @@ func securityConfigurationResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::EMR::SecurityConfiguration").WithTerraformTypeName("awscc_emr_security_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "name": "Name", "security_configuration": "SecurityConfiguration", diff --git a/internal/aws/emr/studio_resource_gen.go b/internal/aws/emr/studio_resource_gen.go index 856ab80f6..766c3babd 100644 --- a/internal/aws/emr/studio_resource_gen.go +++ b/internal/aws/emr/studio_resource_gen.go @@ -464,6 +464,7 @@ func studioResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -482,7 +483,6 @@ func studioResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EMR::Studio").WithTerraformTypeName("awscc_emr_studio") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "auth_mode": "AuthMode", diff --git a/internal/aws/emr/studio_session_mapping_resource_gen.go b/internal/aws/emr/studio_session_mapping_resource_gen.go index 7acbfd1ba..1e909460a 100644 --- a/internal/aws/emr/studio_session_mapping_resource_gen.go +++ b/internal/aws/emr/studio_session_mapping_resource_gen.go @@ -103,6 +103,7 @@ func studioSessionMappingResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -121,7 +122,6 @@ func studioSessionMappingResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::EMR::StudioSessionMapping").WithTerraformTypeName("awscc_emr_studio_session_mapping") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "identity_name": "IdentityName", "identity_type": "IdentityType", diff --git a/internal/aws/emr/wal_workspace_resource_gen.go b/internal/aws/emr/wal_workspace_resource_gen.go index 128a9333a..2e77434c2 100644 --- a/internal/aws/emr/wal_workspace_resource_gen.go +++ b/internal/aws/emr/wal_workspace_resource_gen.go @@ -113,6 +113,7 @@ func wALWorkspaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -131,7 +132,6 @@ func wALWorkspaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EMR::WALWorkspace").WithTerraformTypeName("awscc_emr_wal_workspace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "tags": "Tags", diff --git a/internal/aws/emrcontainers/virtual_cluster_resource_gen.go b/internal/aws/emrcontainers/virtual_cluster_resource_gen.go index 055d783fa..f7ff8e582 100644 --- a/internal/aws/emrcontainers/virtual_cluster_resource_gen.go +++ b/internal/aws/emrcontainers/virtual_cluster_resource_gen.go @@ -143,7 +143,7 @@ func virtualClusterResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "virtual_cluster_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the virtual cluster.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -223,6 +223,15 @@ func virtualClusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Schema of AWS::EMRContainers::VirtualCluster Type", Version: 1, @@ -233,7 +242,6 @@ func virtualClusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EMRContainers::VirtualCluster").WithTerraformTypeName("awscc_emrcontainers_virtual_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "container_provider": "ContainerProvider", @@ -246,6 +254,7 @@ func virtualClusterResource(ctx context.Context) (resource.Resource, error) { "tags": "Tags", "type": "Type", "value": "Value", + "virtual_cluster_id": "Id", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/emrcontainers/virtual_cluster_singular_data_source_gen.go b/internal/aws/emrcontainers/virtual_cluster_singular_data_source_gen.go index a4828670e..0e9d90b41 100644 --- a/internal/aws/emrcontainers/virtual_cluster_singular_data_source_gen.go +++ b/internal/aws/emrcontainers/virtual_cluster_singular_data_source_gen.go @@ -122,7 +122,7 @@ func virtualClusterDataSource(ctx context.Context) (datasource.DataSource, error // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "virtual_cluster_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the virtual cluster.", Computed: true, }, /*END ATTRIBUTE*/ @@ -214,6 +214,7 @@ func virtualClusterDataSource(ctx context.Context) (datasource.DataSource, error "tags": "Tags", "type": "Type", "value": "Value", + "virtual_cluster_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/emrserverless/application_resource_gen.go b/internal/aws/emrserverless/application_resource_gen.go index 06dd3f3b8..7a5ba1dbf 100644 --- a/internal/aws/emrserverless/application_resource_gen.go +++ b/internal/aws/emrserverless/application_resource_gen.go @@ -708,6 +708,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -726,7 +727,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EMRServerless::Application").WithTerraformTypeName("awscc_emrserverless_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_id": "ApplicationId", "architecture": "Architecture", diff --git a/internal/aws/entityresolution/id_mapping_workflow_resource_gen.go b/internal/aws/entityresolution/id_mapping_workflow_resource_gen.go index 1490d3308..73df0142b 100644 --- a/internal/aws/entityresolution/id_mapping_workflow_resource_gen.go +++ b/internal/aws/entityresolution/id_mapping_workflow_resource_gen.go @@ -426,6 +426,7 @@ func idMappingWorkflowResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -444,7 +445,6 @@ func idMappingWorkflowResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EntityResolution::IdMappingWorkflow").WithTerraformTypeName("awscc_entityresolution_id_mapping_workflow") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "description": "Description", diff --git a/internal/aws/events/api_destination_resource_gen.go b/internal/aws/events/api_destination_resource_gen.go index 0b76b88bf..81b171bc4 100644 --- a/internal/aws/events/api_destination_resource_gen.go +++ b/internal/aws/events/api_destination_resource_gen.go @@ -150,6 +150,7 @@ func apiDestinationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -168,7 +169,6 @@ func apiDestinationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Events::ApiDestination").WithTerraformTypeName("awscc_events_api_destination") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "connection_arn": "ConnectionArn", diff --git a/internal/aws/events/archive_resource_gen.go b/internal/aws/events/archive_resource_gen.go index 1b8a8d3c8..61463e0a8 100644 --- a/internal/aws/events/archive_resource_gen.go +++ b/internal/aws/events/archive_resource_gen.go @@ -113,6 +113,7 @@ func archiveResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -131,7 +132,6 @@ func archiveResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Events::Archive").WithTerraformTypeName("awscc_events_archive") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "archive_name": "ArchiveName", "arn": "Arn", diff --git a/internal/aws/events/endpoint_resource_gen.go b/internal/aws/events/endpoint_resource_gen.go index 97623d0af..ff7d4883a 100644 --- a/internal/aws/events/endpoint_resource_gen.go +++ b/internal/aws/events/endpoint_resource_gen.go @@ -345,6 +345,7 @@ func endpointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -363,7 +364,6 @@ func endpointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Events::Endpoint").WithTerraformTypeName("awscc_events_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/events/event_bus_resource_gen.go b/internal/aws/events/event_bus_resource_gen.go index 6cfa44144..5d6029cdd 100644 --- a/internal/aws/events/event_bus_resource_gen.go +++ b/internal/aws/events/event_bus_resource_gen.go @@ -130,6 +130,7 @@ func eventBusResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -148,7 +149,6 @@ func eventBusResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Events::EventBus").WithTerraformTypeName("awscc_events_event_bus") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "event_source_name": "EventSourceName", diff --git a/internal/aws/events/rule_resource_gen.go b/internal/aws/events/rule_resource_gen.go index 13320e36c..b9d99bbad 100644 --- a/internal/aws/events/rule_resource_gen.go +++ b/internal/aws/events/rule_resource_gen.go @@ -1217,6 +1217,7 @@ func ruleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1235,7 +1236,6 @@ func ruleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Events::Rule").WithTerraformTypeName("awscc_events_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_sync_parameters": "AppSyncParameters", "arn": "Arn", diff --git a/internal/aws/eventschemas/discoverer_resource_gen.go b/internal/aws/eventschemas/discoverer_resource_gen.go index d4f30af71..a309b78ff 100644 --- a/internal/aws/eventschemas/discoverer_resource_gen.go +++ b/internal/aws/eventschemas/discoverer_resource_gen.go @@ -160,6 +160,7 @@ func discovererResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -178,7 +179,6 @@ func discovererResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EventSchemas::Discoverer").WithTerraformTypeName("awscc_eventschemas_discoverer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cross_account": "CrossAccount", "description": "Description", diff --git a/internal/aws/eventschemas/registry_policy_resource_gen.go b/internal/aws/eventschemas/registry_policy_resource_gen.go index 9e5537934..94e64c767 100644 --- a/internal/aws/eventschemas/registry_policy_resource_gen.go +++ b/internal/aws/eventschemas/registry_policy_resource_gen.go @@ -31,7 +31,7 @@ func registryPolicyResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "registry_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -71,6 +71,15 @@ func registryPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::EventSchemas::RegistryPolicy", Version: 1, @@ -81,12 +90,11 @@ func registryPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EventSchemas::RegistryPolicy").WithTerraformTypeName("awscc_eventschemas_registry_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "policy": "Policy", - "registry_name": "RegistryName", - "revision_id": "RevisionId", + "policy": "Policy", + "registry_name": "RegistryName", + "registry_policy_id": "Id", + "revision_id": "RevisionId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/eventschemas/registry_policy_singular_data_source_gen.go b/internal/aws/eventschemas/registry_policy_singular_data_source_gen.go index eedbdd25e..55b8afd9e 100644 --- a/internal/aws/eventschemas/registry_policy_singular_data_source_gen.go +++ b/internal/aws/eventschemas/registry_policy_singular_data_source_gen.go @@ -29,7 +29,7 @@ func registryPolicyDataSource(ctx context.Context) (datasource.DataSource, error // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "registry_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Policy @@ -77,10 +77,10 @@ func registryPolicyDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::EventSchemas::RegistryPolicy").WithTerraformTypeName("awscc_eventschemas_registry_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "policy": "Policy", - "registry_name": "RegistryName", - "revision_id": "RevisionId", + "policy": "Policy", + "registry_name": "RegistryName", + "registry_policy_id": "Id", + "revision_id": "RevisionId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/eventschemas/registry_resource_gen.go b/internal/aws/eventschemas/registry_resource_gen.go index 65105bdbe..b5f945f78 100644 --- a/internal/aws/eventschemas/registry_resource_gen.go +++ b/internal/aws/eventschemas/registry_resource_gen.go @@ -116,6 +116,7 @@ func registryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -134,7 +135,6 @@ func registryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EventSchemas::Registry").WithTerraformTypeName("awscc_eventschemas_registry") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "key": "Key", diff --git a/internal/aws/eventschemas/schema_resource_gen.go b/internal/aws/eventschemas/schema_resource_gen.go index c15de3a80..c04d0a08f 100644 --- a/internal/aws/eventschemas/schema_resource_gen.go +++ b/internal/aws/eventschemas/schema_resource_gen.go @@ -194,6 +194,7 @@ func schemaResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -212,7 +213,6 @@ func schemaResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::EventSchemas::Schema").WithTerraformTypeName("awscc_eventschemas_schema") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "content": "Content", "description": "Description", diff --git a/internal/aws/evidently/experiment_resource_gen.go b/internal/aws/evidently/experiment_resource_gen.go index 5b725d7f0..951b8c28f 100644 --- a/internal/aws/evidently/experiment_resource_gen.go +++ b/internal/aws/evidently/experiment_resource_gen.go @@ -607,6 +607,7 @@ func experimentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -625,7 +626,6 @@ func experimentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Evidently::Experiment").WithTerraformTypeName("awscc_evidently_experiment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "analysis_complete_time": "AnalysisCompleteTime", "arn": "Arn", diff --git a/internal/aws/evidently/feature_resource_gen.go b/internal/aws/evidently/feature_resource_gen.go index 5789790e6..04097722b 100644 --- a/internal/aws/evidently/feature_resource_gen.go +++ b/internal/aws/evidently/feature_resource_gen.go @@ -388,6 +388,7 @@ func featureResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -406,7 +407,6 @@ func featureResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Evidently::Feature").WithTerraformTypeName("awscc_evidently_feature") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "boolean_value": "BooleanValue", diff --git a/internal/aws/evidently/launch_resource_gen.go b/internal/aws/evidently/launch_resource_gen.go index 288d362d7..67c0714f5 100644 --- a/internal/aws/evidently/launch_resource_gen.go +++ b/internal/aws/evidently/launch_resource_gen.go @@ -591,6 +591,7 @@ func launchResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -609,7 +610,6 @@ func launchResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Evidently::Launch").WithTerraformTypeName("awscc_evidently_launch") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/evidently/project_resource_gen.go b/internal/aws/evidently/project_resource_gen.go index 87034b47d..554247b56 100644 --- a/internal/aws/evidently/project_resource_gen.go +++ b/internal/aws/evidently/project_resource_gen.go @@ -289,6 +289,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -307,7 +308,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Evidently::Project").WithTerraformTypeName("awscc_evidently_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_config_resource": "AppConfigResource", "application_id": "ApplicationId", diff --git a/internal/aws/evidently/segment_resource_gen.go b/internal/aws/evidently/segment_resource_gen.go index 8ca6c0cf6..be8895f73 100644 --- a/internal/aws/evidently/segment_resource_gen.go +++ b/internal/aws/evidently/segment_resource_gen.go @@ -158,6 +158,7 @@ func segmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -176,7 +177,6 @@ func segmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Evidently::Segment").WithTerraformTypeName("awscc_evidently_segment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/finspace/environment_resource_gen.go b/internal/aws/finspace/environment_resource_gen.go index bca744d01..391e6c030 100644 --- a/internal/aws/finspace/environment_resource_gen.go +++ b/internal/aws/finspace/environment_resource_gen.go @@ -568,6 +568,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -586,7 +587,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FinSpace::Environment").WithTerraformTypeName("awscc_finspace_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_call_back_url": "ApplicationCallBackURL", "attribute_map": "AttributeMap", diff --git a/internal/aws/fis/experiment_template_resource_gen.go b/internal/aws/fis/experiment_template_resource_gen.go index 9f8c3a075..75dd95c74 100644 --- a/internal/aws/fis/experiment_template_resource_gen.go +++ b/internal/aws/fis/experiment_template_resource_gen.go @@ -252,7 +252,7 @@ func experimentTemplateResource(ctx context.Context) (resource.Resource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "experiment_template_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -643,6 +643,15 @@ func experimentTemplateResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::FIS::ExperimentTemplate", Version: 1, @@ -653,7 +662,6 @@ func experimentTemplateResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::FIS::ExperimentTemplate").WithTerraformTypeName("awscc_fis_experiment_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "account_targeting": "AccountTargeting", "action_id": "ActionId", @@ -663,8 +671,8 @@ func experimentTemplateResource(ctx context.Context) (resource.Resource, error) "description": "Description", "empty_target_resolution_mode": "EmptyTargetResolutionMode", "experiment_options": "ExperimentOptions", + "experiment_template_id": "Id", "filters": "Filters", - "id": "Id", "log_configuration": "LogConfiguration", "log_group_arn": "LogGroupArn", "log_schema_version": "LogSchemaVersion", diff --git a/internal/aws/fis/experiment_template_singular_data_source_gen.go b/internal/aws/fis/experiment_template_singular_data_source_gen.go index 5457e8389..427498b16 100644 --- a/internal/aws/fis/experiment_template_singular_data_source_gen.go +++ b/internal/aws/fis/experiment_template_singular_data_source_gen.go @@ -180,7 +180,7 @@ func experimentTemplateDataSource(ctx context.Context) (datasource.DataSource, e // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "experiment_template_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LogConfiguration @@ -504,8 +504,8 @@ func experimentTemplateDataSource(ctx context.Context) (datasource.DataSource, e "description": "Description", "empty_target_resolution_mode": "EmptyTargetResolutionMode", "experiment_options": "ExperimentOptions", + "experiment_template_id": "Id", "filters": "Filters", - "id": "Id", "log_configuration": "LogConfiguration", "log_group_arn": "LogGroupArn", "log_schema_version": "LogSchemaVersion", diff --git a/internal/aws/fis/target_account_configuration_resource_gen.go b/internal/aws/fis/target_account_configuration_resource_gen.go index 696457cf1..03b9cb9a7 100644 --- a/internal/aws/fis/target_account_configuration_resource_gen.go +++ b/internal/aws/fis/target_account_configuration_resource_gen.go @@ -94,6 +94,7 @@ func targetAccountConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -112,7 +113,6 @@ func targetAccountConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::FIS::TargetAccountConfiguration").WithTerraformTypeName("awscc_fis_target_account_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "description": "Description", diff --git a/internal/aws/fms/notification_channel_resource_gen.go b/internal/aws/fms/notification_channel_resource_gen.go index 90585b7a3..56af0be40 100644 --- a/internal/aws/fms/notification_channel_resource_gen.go +++ b/internal/aws/fms/notification_channel_resource_gen.go @@ -65,6 +65,7 @@ func notificationChannelResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -83,7 +84,6 @@ func notificationChannelResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::FMS::NotificationChannel").WithTerraformTypeName("awscc_fms_notification_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "sns_role_name": "SnsRoleName", "sns_topic_arn": "SnsTopicArn", diff --git a/internal/aws/fms/policy_resource_gen.go b/internal/aws/fms/policy_resource_gen.go index 1c710a4bd..f0ff45a09 100644 --- a/internal/aws/fms/policy_resource_gen.go +++ b/internal/aws/fms/policy_resource_gen.go @@ -153,7 +153,7 @@ func policyResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[a-z0-9A-Z-]{36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -667,6 +667,15 @@ func policyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Creates an AWS Firewall Manager policy.", Version: 1, @@ -677,7 +686,6 @@ func policyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FMS::Policy").WithTerraformTypeName("awscc_fms_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "account": "ACCOUNT", "arn": "Arn", @@ -685,13 +693,13 @@ func policyResource(ctx context.Context) (resource.Resource, error) { "exclude_map": "ExcludeMap", "exclude_resource_tags": "ExcludeResourceTags", "firewall_deployment_model": "FirewallDeploymentModel", - "id": "Id", "include_map": "IncludeMap", "key": "Key", "managed_service_data": "ManagedServiceData", "network_firewall_policy": "NetworkFirewallPolicy", "orgunit": "ORGUNIT", "policy_description": "PolicyDescription", + "policy_id": "Id", "policy_name": "PolicyName", "policy_option": "PolicyOption", "remediation_enabled": "RemediationEnabled", diff --git a/internal/aws/fms/policy_singular_data_source_gen.go b/internal/aws/fms/policy_singular_data_source_gen.go index ee98e244b..00501fc51 100644 --- a/internal/aws/fms/policy_singular_data_source_gen.go +++ b/internal/aws/fms/policy_singular_data_source_gen.go @@ -112,7 +112,7 @@ func policyDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[a-z0-9A-Z-]{36}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: IncludeMap @@ -501,13 +501,13 @@ func policyDataSource(ctx context.Context) (datasource.DataSource, error) { "exclude_map": "ExcludeMap", "exclude_resource_tags": "ExcludeResourceTags", "firewall_deployment_model": "FirewallDeploymentModel", - "id": "Id", "include_map": "IncludeMap", "key": "Key", "managed_service_data": "ManagedServiceData", "network_firewall_policy": "NetworkFirewallPolicy", "orgunit": "ORGUNIT", "policy_description": "PolicyDescription", + "policy_id": "Id", "policy_name": "PolicyName", "policy_option": "PolicyOption", "remediation_enabled": "RemediationEnabled", diff --git a/internal/aws/fms/resource_set_resource_gen.go b/internal/aws/fms/resource_set_resource_gen.go index b1c90a4cb..7d157e31d 100644 --- a/internal/aws/fms/resource_set_resource_gen.go +++ b/internal/aws/fms/resource_set_resource_gen.go @@ -61,7 +61,7 @@ func resourceSetResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^([a-z0-9A-Z]*)$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resource_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "A Base62 ID", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -201,6 +201,15 @@ func resourceSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Creates an AWS Firewall Manager resource set.", Version: 1, @@ -211,12 +220,11 @@ func resourceSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FMS::ResourceSet").WithTerraformTypeName("awscc_fms_resource_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", - "id": "Id", "key": "Key", "name": "Name", + "resource_set_id": "Id", "resource_type_list": "ResourceTypeList", "resources": "Resources", "tags": "Tags", diff --git a/internal/aws/fms/resource_set_singular_data_source_gen.go b/internal/aws/fms/resource_set_singular_data_source_gen.go index cc80cb59d..32aad563b 100644 --- a/internal/aws/fms/resource_set_singular_data_source_gen.go +++ b/internal/aws/fms/resource_set_singular_data_source_gen.go @@ -44,7 +44,7 @@ func resourceSetDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^([a-z0-9A-Z]*)$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resource_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "A Base62 ID", Computed: true, }, /*END ATTRIBUTE*/ @@ -161,9 +161,9 @@ func resourceSetDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", - "id": "Id", "key": "Key", "name": "Name", + "resource_set_id": "Id", "resource_type_list": "ResourceTypeList", "resources": "Resources", "tags": "Tags", diff --git a/internal/aws/forecast/dataset_group_resource_gen.go b/internal/aws/forecast/dataset_group_resource_gen.go index 3a8f3cf0e..ef7a55c0c 100644 --- a/internal/aws/forecast/dataset_group_resource_gen.go +++ b/internal/aws/forecast/dataset_group_resource_gen.go @@ -192,6 +192,7 @@ func datasetGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -210,7 +211,6 @@ func datasetGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Forecast::DatasetGroup").WithTerraformTypeName("awscc_forecast_dataset_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dataset_arns": "DatasetArns", "dataset_group_arn": "DatasetGroupArn", diff --git a/internal/aws/forecast/dataset_resource_gen.go b/internal/aws/forecast/dataset_resource_gen.go index c54873fac..7c6ec03a2 100644 --- a/internal/aws/forecast/dataset_resource_gen.go +++ b/internal/aws/forecast/dataset_resource_gen.go @@ -345,6 +345,7 @@ func datasetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -363,7 +364,6 @@ func datasetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Forecast::Dataset").WithTerraformTypeName("awscc_forecast_dataset") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "attribute_name": "AttributeName", diff --git a/internal/aws/frauddetector/detector_resource_gen.go b/internal/aws/frauddetector/detector_resource_gen.go index 95032e095..23f9e8238 100644 --- a/internal/aws/frauddetector/detector_resource_gen.go +++ b/internal/aws/frauddetector/detector_resource_gen.go @@ -1434,6 +1434,7 @@ func detectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1452,7 +1453,6 @@ func detectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::Detector").WithTerraformTypeName("awscc_frauddetector_detector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "associated_models": "AssociatedModels", diff --git a/internal/aws/frauddetector/entity_type_resource_gen.go b/internal/aws/frauddetector/entity_type_resource_gen.go index 534792e3e..15b1f1a5b 100644 --- a/internal/aws/frauddetector/entity_type_resource_gen.go +++ b/internal/aws/frauddetector/entity_type_resource_gen.go @@ -174,6 +174,7 @@ func entityTypeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func entityTypeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::EntityType").WithTerraformTypeName("awscc_frauddetector_entity_type") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/frauddetector/event_type_resource_gen.go b/internal/aws/frauddetector/event_type_resource_gen.go index b18a9afc0..e15f0ae90 100644 --- a/internal/aws/frauddetector/event_type_resource_gen.go +++ b/internal/aws/frauddetector/event_type_resource_gen.go @@ -802,6 +802,7 @@ func eventTypeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -820,7 +821,6 @@ func eventTypeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::EventType").WithTerraformTypeName("awscc_frauddetector_event_type") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/frauddetector/label_resource_gen.go b/internal/aws/frauddetector/label_resource_gen.go index 506801772..fefacc4c4 100644 --- a/internal/aws/frauddetector/label_resource_gen.go +++ b/internal/aws/frauddetector/label_resource_gen.go @@ -174,6 +174,7 @@ func labelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func labelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::Label").WithTerraformTypeName("awscc_frauddetector_label") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/frauddetector/list_resource_gen.go b/internal/aws/frauddetector/list_resource_gen.go index d47af1a62..672d4c31a 100644 --- a/internal/aws/frauddetector/list_resource_gen.go +++ b/internal/aws/frauddetector/list_resource_gen.go @@ -236,6 +236,7 @@ func listResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -254,7 +255,6 @@ func listResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::List").WithTerraformTypeName("awscc_frauddetector_list") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/frauddetector/outcome_resource_gen.go b/internal/aws/frauddetector/outcome_resource_gen.go index c63efc9db..4a34acd45 100644 --- a/internal/aws/frauddetector/outcome_resource_gen.go +++ b/internal/aws/frauddetector/outcome_resource_gen.go @@ -174,6 +174,7 @@ func outcomeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func outcomeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::Outcome").WithTerraformTypeName("awscc_frauddetector_outcome") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/frauddetector/variable_resource_gen.go b/internal/aws/frauddetector/variable_resource_gen.go index fb2d9d7ea..93312ea0d 100644 --- a/internal/aws/frauddetector/variable_resource_gen.go +++ b/internal/aws/frauddetector/variable_resource_gen.go @@ -315,6 +315,7 @@ func variableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -333,7 +334,6 @@ func variableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::FraudDetector::Variable").WithTerraformTypeName("awscc_frauddetector_variable") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "created_time": "CreatedTime", diff --git a/internal/aws/fsx/data_repository_association_resource_gen.go b/internal/aws/fsx/data_repository_association_resource_gen.go index 246a141b8..6620020da 100644 --- a/internal/aws/fsx/data_repository_association_resource_gen.go +++ b/internal/aws/fsx/data_repository_association_resource_gen.go @@ -320,6 +320,7 @@ func dataRepositoryAssociationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -338,7 +339,6 @@ func dataRepositoryAssociationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::FSx::DataRepositoryAssociation").WithTerraformTypeName("awscc_fsx_data_repository_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "association_id": "AssociationId", "auto_export_policy": "AutoExportPolicy", diff --git a/internal/aws/gamelift/alias_resource_gen.go b/internal/aws/gamelift/alias_resource_gen.go index 35ad6fe1f..c7212a909 100644 --- a/internal/aws/gamelift/alias_resource_gen.go +++ b/internal/aws/gamelift/alias_resource_gen.go @@ -161,6 +161,7 @@ func aliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -179,7 +180,6 @@ func aliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::Alias").WithTerraformTypeName("awscc_gamelift_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias_id": "AliasId", "description": "Description", diff --git a/internal/aws/gamelift/build_resource_gen.go b/internal/aws/gamelift/build_resource_gen.go index e2e179336..7d844654f 100644 --- a/internal/aws/gamelift/build_resource_gen.go +++ b/internal/aws/gamelift/build_resource_gen.go @@ -190,6 +190,7 @@ func buildResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -208,7 +209,6 @@ func buildResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::Build").WithTerraformTypeName("awscc_gamelift_build") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "build_id": "BuildId", diff --git a/internal/aws/gamelift/fleet_resource_gen.go b/internal/aws/gamelift/fleet_resource_gen.go index dcacefd97..4accf2dd6 100644 --- a/internal/aws/gamelift/fleet_resource_gen.go +++ b/internal/aws/gamelift/fleet_resource_gen.go @@ -1276,6 +1276,7 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1294,7 +1295,6 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::Fleet").WithTerraformTypeName("awscc_gamelift_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "anywhere_configuration": "AnywhereConfiguration", "apply_capacity": "ApplyCapacity", diff --git a/internal/aws/gamelift/game_server_group_resource_gen.go b/internal/aws/gamelift/game_server_group_resource_gen.go index 798968038..264196bd5 100644 --- a/internal/aws/gamelift/game_server_group_resource_gen.go +++ b/internal/aws/gamelift/game_server_group_resource_gen.go @@ -498,6 +498,7 @@ func gameServerGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -516,7 +517,6 @@ func gameServerGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::GameServerGroup").WithTerraformTypeName("awscc_gamelift_game_server_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auto_scaling_group_arn": "AutoScalingGroupArn", "auto_scaling_policy": "AutoScalingPolicy", diff --git a/internal/aws/gamelift/game_session_queue_resource_gen.go b/internal/aws/gamelift/game_session_queue_resource_gen.go index 06a233d37..54ce65528 100644 --- a/internal/aws/gamelift/game_session_queue_resource_gen.go +++ b/internal/aws/gamelift/game_session_queue_resource_gen.go @@ -447,6 +447,7 @@ func gameSessionQueueResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -465,7 +466,6 @@ func gameSessionQueueResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::GameSessionQueue").WithTerraformTypeName("awscc_gamelift_game_session_queue") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_locations": "AllowedLocations", "arn": "Arn", diff --git a/internal/aws/gamelift/location_resource_gen.go b/internal/aws/gamelift/location_resource_gen.go index f9c245cab..60c7a269a 100644 --- a/internal/aws/gamelift/location_resource_gen.go +++ b/internal/aws/gamelift/location_resource_gen.go @@ -127,6 +127,7 @@ func locationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -145,7 +146,6 @@ func locationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::Location").WithTerraformTypeName("awscc_gamelift_location") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "location_arn": "LocationArn", diff --git a/internal/aws/gamelift/matchmaking_configuration_resource_gen.go b/internal/aws/gamelift/matchmaking_configuration_resource_gen.go index cf0614dc0..2149c3f7c 100644 --- a/internal/aws/gamelift/matchmaking_configuration_resource_gen.go +++ b/internal/aws/gamelift/matchmaking_configuration_resource_gen.go @@ -476,6 +476,7 @@ func matchmakingConfigurationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -494,7 +495,6 @@ func matchmakingConfigurationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::GameLift::MatchmakingConfiguration").WithTerraformTypeName("awscc_gamelift_matchmaking_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acceptance_required": "AcceptanceRequired", "acceptance_timeout_seconds": "AcceptanceTimeoutSeconds", diff --git a/internal/aws/gamelift/matchmaking_rule_set_resource_gen.go b/internal/aws/gamelift/matchmaking_rule_set_resource_gen.go index 5565bd58b..292d2dbbc 100644 --- a/internal/aws/gamelift/matchmaking_rule_set_resource_gen.go +++ b/internal/aws/gamelift/matchmaking_rule_set_resource_gen.go @@ -164,6 +164,7 @@ func matchmakingRuleSetResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -182,7 +183,6 @@ func matchmakingRuleSetResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::GameLift::MatchmakingRuleSet").WithTerraformTypeName("awscc_gamelift_matchmaking_rule_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", diff --git a/internal/aws/gamelift/script_resource_gen.go b/internal/aws/gamelift/script_resource_gen.go index 9aa368566..e89ff1428 100644 --- a/internal/aws/gamelift/script_resource_gen.go +++ b/internal/aws/gamelift/script_resource_gen.go @@ -66,7 +66,7 @@ func scriptResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^script-\\S+", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "script_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "A unique identifier for the Realtime script", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -272,6 +272,15 @@ func scriptResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The AWS::GameLift::Script resource creates a new script record for your Realtime Servers script. Realtime scripts are JavaScript that provide configuration settings and optional custom game logic for your game. The script is deployed when you create a Realtime Servers fleet to host your game sessions. Script logic is executed during an active game session.", Version: 1, @@ -282,16 +291,15 @@ func scriptResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GameLift::Script").WithTerraformTypeName("awscc_gamelift_script") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", "creation_time": "CreationTime", - "id": "Id", "key": "Key", "name": "Name", "object_version": "ObjectVersion", "role_arn": "RoleArn", + "script_id": "Id", "size_on_disk": "SizeOnDisk", "storage_location": "StorageLocation", "tags": "Tags", diff --git a/internal/aws/gamelift/script_singular_data_source_gen.go b/internal/aws/gamelift/script_singular_data_source_gen.go index 79560babc..1bfdce51b 100644 --- a/internal/aws/gamelift/script_singular_data_source_gen.go +++ b/internal/aws/gamelift/script_singular_data_source_gen.go @@ -53,7 +53,7 @@ func scriptDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^script-\\S+", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "script_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "A unique identifier for the Realtime script", Computed: true, }, /*END ATTRIBUTE*/ @@ -228,11 +228,11 @@ func scriptDataSource(ctx context.Context) (datasource.DataSource, error) { "arn": "Arn", "bucket": "Bucket", "creation_time": "CreationTime", - "id": "Id", "key": "Key", "name": "Name", "object_version": "ObjectVersion", "role_arn": "RoleArn", + "script_id": "Id", "size_on_disk": "SizeOnDisk", "storage_location": "StorageLocation", "tags": "Tags", diff --git a/internal/aws/globalaccelerator/accelerator_resource_gen.go b/internal/aws/globalaccelerator/accelerator_resource_gen.go index fe21fa2d6..b113bbe0c 100644 --- a/internal/aws/globalaccelerator/accelerator_resource_gen.go +++ b/internal/aws/globalaccelerator/accelerator_resource_gen.go @@ -259,6 +259,7 @@ func acceleratorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -277,7 +278,6 @@ func acceleratorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GlobalAccelerator::Accelerator").WithTerraformTypeName("awscc_globalaccelerator_accelerator") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_arn": "AcceleratorArn", "dns_name": "DnsName", diff --git a/internal/aws/globalaccelerator/endpoint_group_resource_gen.go b/internal/aws/globalaccelerator/endpoint_group_resource_gen.go index 3e315f6bb..0652ebd48 100644 --- a/internal/aws/globalaccelerator/endpoint_group_resource_gen.go +++ b/internal/aws/globalaccelerator/endpoint_group_resource_gen.go @@ -342,6 +342,7 @@ func endpointGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -360,7 +361,6 @@ func endpointGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GlobalAccelerator::EndpointGroup").WithTerraformTypeName("awscc_globalaccelerator_endpoint_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_arn": "AttachmentArn", "client_ip_preservation_enabled": "ClientIPPreservationEnabled", diff --git a/internal/aws/globalaccelerator/listener_resource_gen.go b/internal/aws/globalaccelerator/listener_resource_gen.go index e380ccc33..1f359360a 100644 --- a/internal/aws/globalaccelerator/listener_resource_gen.go +++ b/internal/aws/globalaccelerator/listener_resource_gen.go @@ -163,6 +163,7 @@ func listenerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -181,7 +182,6 @@ func listenerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GlobalAccelerator::Listener").WithTerraformTypeName("awscc_globalaccelerator_listener") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accelerator_arn": "AcceleratorArn", "client_affinity": "ClientAffinity", diff --git a/internal/aws/glue/registry_resource_gen.go b/internal/aws/glue/registry_resource_gen.go index acf8afea4..56a247aa9 100644 --- a/internal/aws/glue/registry_resource_gen.go +++ b/internal/aws/glue/registry_resource_gen.go @@ -146,6 +146,7 @@ func registryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -164,7 +165,6 @@ func registryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Glue::Registry").WithTerraformTypeName("awscc_glue_registry") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/glue/schema_resource_gen.go b/internal/aws/glue/schema_resource_gen.go index fee96514b..cb88e4e1e 100644 --- a/internal/aws/glue/schema_resource_gen.go +++ b/internal/aws/glue/schema_resource_gen.go @@ -352,6 +352,7 @@ func schemaResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -370,7 +371,6 @@ func schemaResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Glue::Schema").WithTerraformTypeName("awscc_glue_schema") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "checkpoint_version": "CheckpointVersion", diff --git a/internal/aws/glue/schema_version_metadata_resource_gen.go b/internal/aws/glue/schema_version_metadata_resource_gen.go index fecfbe6d5..5c6f4a987 100644 --- a/internal/aws/glue/schema_version_metadata_resource_gen.go +++ b/internal/aws/glue/schema_version_metadata_resource_gen.go @@ -85,6 +85,7 @@ func schemaVersionMetadataResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -103,7 +104,6 @@ func schemaVersionMetadataResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::Glue::SchemaVersionMetadata").WithTerraformTypeName("awscc_glue_schema_version_metadata") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "schema_version_id": "SchemaVersionId", diff --git a/internal/aws/glue/schema_version_resource_gen.go b/internal/aws/glue/schema_version_resource_gen.go index 13c2a8a0d..f571a4a06 100644 --- a/internal/aws/glue/schema_version_resource_gen.go +++ b/internal/aws/glue/schema_version_resource_gen.go @@ -136,6 +136,7 @@ func schemaVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -154,7 +155,6 @@ func schemaVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Glue::SchemaVersion").WithTerraformTypeName("awscc_glue_schema_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "registry_name": "RegistryName", "schema": "Schema", diff --git a/internal/aws/grafana/workspace_resource_gen.go b/internal/aws/grafana/workspace_resource_gen.go index 0a74984ed..61798466e 100644 --- a/internal/aws/grafana/workspace_resource_gen.go +++ b/internal/aws/grafana/workspace_resource_gen.go @@ -236,7 +236,7 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^g-[0-9a-f]{10}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "workspace_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The id that uniquely identifies a Grafana workspace.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -946,6 +946,15 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Definition of AWS::Grafana::Workspace Resource Type", Version: 1, @@ -956,7 +965,6 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Grafana::Workspace").WithTerraformTypeName("awscc_grafana_workspace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "account_access_type": "AccountAccessType", "admin": "Admin", @@ -972,7 +980,6 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { "endpoint": "Endpoint", "grafana_version": "GrafanaVersion", "groups": "Groups", - "id": "Id", "idp_metadata": "IdpMetadata", "login": "Login", "login_validity_duration": "LoginValidityDuration", @@ -999,6 +1006,7 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { "url": "Url", "vpc_configuration": "VpcConfiguration", "vpce_ids": "VpceIds", + "workspace_id": "Id", "xml": "Xml", }) diff --git a/internal/aws/grafana/workspace_singular_data_source_gen.go b/internal/aws/grafana/workspace_singular_data_source_gen.go index 8a289c222..999195ce3 100644 --- a/internal/aws/grafana/workspace_singular_data_source_gen.go +++ b/internal/aws/grafana/workspace_singular_data_source_gen.go @@ -161,7 +161,7 @@ func workspaceDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^g-[0-9a-f]{10}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "workspace_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The id that uniquely identifies a Grafana workspace.", Computed: true, }, /*END ATTRIBUTE*/ @@ -694,7 +694,6 @@ func workspaceDataSource(ctx context.Context) (datasource.DataSource, error) { "endpoint": "Endpoint", "grafana_version": "GrafanaVersion", "groups": "Groups", - "id": "Id", "idp_metadata": "IdpMetadata", "login": "Login", "login_validity_duration": "LoginValidityDuration", @@ -721,6 +720,7 @@ func workspaceDataSource(ctx context.Context) (datasource.DataSource, error) { "url": "Url", "vpc_configuration": "VpcConfiguration", "vpce_ids": "VpceIds", + "workspace_id": "Id", "xml": "Xml", }) diff --git a/internal/aws/greengrassv2/component_version_resource_gen.go b/internal/aws/greengrassv2/component_version_resource_gen.go index 031265b03..32ec04e44 100644 --- a/internal/aws/greengrassv2/component_version_resource_gen.go +++ b/internal/aws/greengrassv2/component_version_resource_gen.go @@ -686,6 +686,7 @@ func componentVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -704,7 +705,6 @@ func componentVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GreengrassV2::ComponentVersion").WithTerraformTypeName("awscc_greengrassv2_component_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "add_group_owner": "AddGroupOwner", "arn": "Arn", diff --git a/internal/aws/greengrassv2/deployment_resource_gen.go b/internal/aws/greengrassv2/deployment_resource_gen.go index 3b73a4772..e5873214f 100644 --- a/internal/aws/greengrassv2/deployment_resource_gen.go +++ b/internal/aws/greengrassv2/deployment_resource_gen.go @@ -726,6 +726,7 @@ func deploymentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -744,7 +745,6 @@ func deploymentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GreengrassV2::Deployment").WithTerraformTypeName("awscc_greengrassv2_deployment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "abort_config": "AbortConfig", "action": "Action", diff --git a/internal/aws/groundstation/config_plural_data_source_gen.go b/internal/aws/groundstation/config_plural_data_source_gen.go new file mode 100644 index 000000000..1a7c58c37 --- /dev/null +++ b/internal/aws/groundstation/config_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package groundstation + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_groundstation_configs", configsDataSource) +} + +// configsDataSource returns the Terraform awscc_groundstation_configs data source. +// This Terraform data source corresponds to the CloudFormation AWS::GroundStation::Config resource. +func configsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::GroundStation::Config", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::GroundStation::Config").WithTerraformTypeName("awscc_groundstation_configs") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/groundstation/config_plural_data_source_gen_test.go b/internal/aws/groundstation/config_plural_data_source_gen_test.go new file mode 100644 index 000000000..1ff618893 --- /dev/null +++ b/internal/aws/groundstation/config_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package groundstation_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSGroundStationConfigsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::GroundStation::Config", "awscc_groundstation_configs", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/groundstation/config_resource_gen.go b/internal/aws/groundstation/config_resource_gen.go new file mode 100644 index 000000000..0cc277380 --- /dev/null +++ b/internal/aws/groundstation/config_resource_gen.go @@ -0,0 +1,914 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package groundstation + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_groundstation_config", configResource) +} + +// configResource returns the Terraform awscc_groundstation_config resource. +// This Terraform resource corresponds to the CloudFormation AWS::GroundStation::Config resource. +func configResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ConfigData + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AntennaDownlinkConfig": { + // "additionalProperties": false, + // "properties": { + // "SpectrumConfig": { + // "additionalProperties": false, + // "properties": { + // "Bandwidth": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "CenterFrequency": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "Polarization": { + // "enum": [ + // "LEFT_HAND", + // "RIGHT_HAND", + // "NONE" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "AntennaDownlinkDemodDecodeConfig": { + // "additionalProperties": false, + // "properties": { + // "DecodeConfig": { + // "additionalProperties": false, + // "properties": { + // "UnvalidatedJSON": { + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "DemodulationConfig": { + // "additionalProperties": false, + // "properties": { + // "UnvalidatedJSON": { + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "SpectrumConfig": { + // "additionalProperties": false, + // "properties": { + // "Bandwidth": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "CenterFrequency": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "Polarization": { + // "enum": [ + // "LEFT_HAND", + // "RIGHT_HAND", + // "NONE" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "AntennaUplinkConfig": { + // "additionalProperties": false, + // "properties": { + // "SpectrumConfig": { + // "additionalProperties": false, + // "properties": { + // "CenterFrequency": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "Polarization": { + // "enum": [ + // "LEFT_HAND", + // "RIGHT_HAND", + // "NONE" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "TargetEirp": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "dBW" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "TransmitDisabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // }, + // "DataflowEndpointConfig": { + // "additionalProperties": false, + // "properties": { + // "DataflowEndpointName": { + // "type": "string" + // }, + // "DataflowEndpointRegion": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "S3RecordingConfig": { + // "additionalProperties": false, + // "properties": { + // "BucketArn": { + // "type": "string" + // }, + // "Prefix": { + // "pattern": "^([a-zA-Z0-9_\\-=/]|\\{satellite_id\\}|\\{config\\-name}|\\{s3\\-config-id}|\\{year\\}|\\{month\\}|\\{day\\}){1,900}$", + // "type": "string" + // }, + // "RoleArn": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "TrackingConfig": { + // "additionalProperties": false, + // "properties": { + // "Autotrack": { + // "enum": [ + // "REQUIRED", + // "PREFERRED", + // "REMOVED" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "UplinkEchoConfig": { + // "additionalProperties": false, + // "properties": { + // "AntennaUplinkConfigArn": { + // "type": "string" + // }, + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "config_data": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AntennaDownlinkConfig + "antenna_downlink_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SpectrumConfig + "spectrum_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bandwidth + "bandwidth": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "GHz", + "MHz", + "kHz", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CenterFrequency + "center_frequency": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "GHz", + "MHz", + "kHz", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Polarization + "polarization": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "LEFT_HAND", + "RIGHT_HAND", + "NONE", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AntennaDownlinkDemodDecodeConfig + "antenna_downlink_demod_decode_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DecodeConfig + "decode_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: UnvalidatedJSON + "unvalidated_json": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DemodulationConfig + "demodulation_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: UnvalidatedJSON + "unvalidated_json": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SpectrumConfig + "spectrum_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bandwidth + "bandwidth": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "GHz", + "MHz", + "kHz", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CenterFrequency + "center_frequency": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "GHz", + "MHz", + "kHz", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Polarization + "polarization": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "LEFT_HAND", + "RIGHT_HAND", + "NONE", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AntennaUplinkConfig + "antenna_uplink_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SpectrumConfig + "spectrum_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CenterFrequency + "center_frequency": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "GHz", + "MHz", + "kHz", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Polarization + "polarization": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "LEFT_HAND", + "RIGHT_HAND", + "NONE", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TargetEirp + "target_eirp": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "dBW", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TransmitDisabled + "transmit_disabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DataflowEndpointConfig + "dataflow_endpoint_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DataflowEndpointName + "dataflow_endpoint_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DataflowEndpointRegion + "dataflow_endpoint_region": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: S3RecordingConfig + "s3_recording_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BucketArn + "bucket_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Prefix + "prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^([a-zA-Z0-9_\\-=/]|\\{satellite_id\\}|\\{config\\-name}|\\{s3\\-config-id}|\\{year\\}|\\{month\\}|\\{day\\}){1,900}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TrackingConfig + "tracking_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Autotrack + "autotrack": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "REQUIRED", + "PREFERRED", + "REMOVED", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: UplinkEchoConfig + "uplink_echo_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AntennaUplinkConfigArn + "antenna_uplink_config_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "pattern": "^[ a-zA-Z0-9_:-]{1,256}$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^[ a-zA-Z0-9_:-]{1,256}$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "pattern": "^[ a-zA-Z0-9\\+\\-=._:/@]{1,128}$", + // "type": "string" + // }, + // "Value": { + // "pattern": "^[ a-zA-Z0-9\\+\\-=._:/@]{1,256}$", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "type": "array" + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^[ a-zA-Z0-9\\+\\-=._:/@]{1,128}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^[ a-zA-Z0-9\\+\\-=._:/@]{1,256}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Type + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "AWS Ground Station config resource type for CloudFormation.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::GroundStation::Config").WithTerraformTypeName("awscc_groundstation_config") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "antenna_downlink_config": "AntennaDownlinkConfig", + "antenna_downlink_demod_decode_config": "AntennaDownlinkDemodDecodeConfig", + "antenna_uplink_config": "AntennaUplinkConfig", + "antenna_uplink_config_arn": "AntennaUplinkConfigArn", + "arn": "Arn", + "autotrack": "Autotrack", + "bandwidth": "Bandwidth", + "bucket_arn": "BucketArn", + "center_frequency": "CenterFrequency", + "config_data": "ConfigData", + "config_id": "Id", + "dataflow_endpoint_config": "DataflowEndpointConfig", + "dataflow_endpoint_name": "DataflowEndpointName", + "dataflow_endpoint_region": "DataflowEndpointRegion", + "decode_config": "DecodeConfig", + "demodulation_config": "DemodulationConfig", + "enabled": "Enabled", + "key": "Key", + "name": "Name", + "polarization": "Polarization", + "prefix": "Prefix", + "role_arn": "RoleArn", + "s3_recording_config": "S3RecordingConfig", + "spectrum_config": "SpectrumConfig", + "tags": "Tags", + "target_eirp": "TargetEirp", + "tracking_config": "TrackingConfig", + "transmit_disabled": "TransmitDisabled", + "type": "Type", + "units": "Units", + "unvalidated_json": "UnvalidatedJSON", + "uplink_echo_config": "UplinkEchoConfig", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/groundstation/config_resource_gen_test.go b/internal/aws/groundstation/config_resource_gen_test.go new file mode 100644 index 000000000..4a70ef3c7 --- /dev/null +++ b/internal/aws/groundstation/config_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package groundstation_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSGroundStationConfig_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::GroundStation::Config", "awscc_groundstation_config", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/groundstation/config_singular_data_source_gen.go b/internal/aws/groundstation/config_singular_data_source_gen.go new file mode 100644 index 000000000..d051579b2 --- /dev/null +++ b/internal/aws/groundstation/config_singular_data_source_gen.go @@ -0,0 +1,619 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package groundstation + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_groundstation_config", configDataSource) +} + +// configDataSource returns the Terraform awscc_groundstation_config data source. +// This Terraform data source corresponds to the CloudFormation AWS::GroundStation::Config resource. +func configDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ConfigData + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AntennaDownlinkConfig": { + // "additionalProperties": false, + // "properties": { + // "SpectrumConfig": { + // "additionalProperties": false, + // "properties": { + // "Bandwidth": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "CenterFrequency": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "Polarization": { + // "enum": [ + // "LEFT_HAND", + // "RIGHT_HAND", + // "NONE" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "AntennaDownlinkDemodDecodeConfig": { + // "additionalProperties": false, + // "properties": { + // "DecodeConfig": { + // "additionalProperties": false, + // "properties": { + // "UnvalidatedJSON": { + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "DemodulationConfig": { + // "additionalProperties": false, + // "properties": { + // "UnvalidatedJSON": { + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "SpectrumConfig": { + // "additionalProperties": false, + // "properties": { + // "Bandwidth": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "CenterFrequency": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "Polarization": { + // "enum": [ + // "LEFT_HAND", + // "RIGHT_HAND", + // "NONE" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "AntennaUplinkConfig": { + // "additionalProperties": false, + // "properties": { + // "SpectrumConfig": { + // "additionalProperties": false, + // "properties": { + // "CenterFrequency": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "GHz", + // "MHz", + // "kHz" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "Polarization": { + // "enum": [ + // "LEFT_HAND", + // "RIGHT_HAND", + // "NONE" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "TargetEirp": { + // "additionalProperties": false, + // "properties": { + // "Units": { + // "enum": [ + // "dBW" + // ], + // "type": "string" + // }, + // "Value": { + // "type": "number" + // } + // }, + // "type": "object" + // }, + // "TransmitDisabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // }, + // "DataflowEndpointConfig": { + // "additionalProperties": false, + // "properties": { + // "DataflowEndpointName": { + // "type": "string" + // }, + // "DataflowEndpointRegion": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "S3RecordingConfig": { + // "additionalProperties": false, + // "properties": { + // "BucketArn": { + // "type": "string" + // }, + // "Prefix": { + // "pattern": "^([a-zA-Z0-9_\\-=/]|\\{satellite_id\\}|\\{config\\-name}|\\{s3\\-config-id}|\\{year\\}|\\{month\\}|\\{day\\}){1,900}$", + // "type": "string" + // }, + // "RoleArn": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "TrackingConfig": { + // "additionalProperties": false, + // "properties": { + // "Autotrack": { + // "enum": [ + // "REQUIRED", + // "PREFERRED", + // "REMOVED" + // ], + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "UplinkEchoConfig": { + // "additionalProperties": false, + // "properties": { + // "AntennaUplinkConfigArn": { + // "type": "string" + // }, + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "config_data": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AntennaDownlinkConfig + "antenna_downlink_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SpectrumConfig + "spectrum_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bandwidth + "bandwidth": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CenterFrequency + "center_frequency": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Polarization + "polarization": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AntennaDownlinkDemodDecodeConfig + "antenna_downlink_demod_decode_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DecodeConfig + "decode_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: UnvalidatedJSON + "unvalidated_json": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DemodulationConfig + "demodulation_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: UnvalidatedJSON + "unvalidated_json": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SpectrumConfig + "spectrum_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bandwidth + "bandwidth": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CenterFrequency + "center_frequency": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Polarization + "polarization": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AntennaUplinkConfig + "antenna_uplink_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SpectrumConfig + "spectrum_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CenterFrequency + "center_frequency": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Polarization + "polarization": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TargetEirp + "target_eirp": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Units + "units": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TransmitDisabled + "transmit_disabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DataflowEndpointConfig + "dataflow_endpoint_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DataflowEndpointName + "dataflow_endpoint_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DataflowEndpointRegion + "dataflow_endpoint_region": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3RecordingConfig + "s3_recording_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BucketArn + "bucket_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Prefix + "prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TrackingConfig + "tracking_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Autotrack + "autotrack": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UplinkEchoConfig + "uplink_echo_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AntennaUplinkConfigArn + "antenna_uplink_config_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "pattern": "^[ a-zA-Z0-9_:-]{1,256}$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "pattern": "^[ a-zA-Z0-9\\+\\-=._:/@]{1,128}$", + // "type": "string" + // }, + // "Value": { + // "pattern": "^[ a-zA-Z0-9\\+\\-=._:/@]{1,256}$", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "type": "array" + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Type + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::GroundStation::Config", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::GroundStation::Config").WithTerraformTypeName("awscc_groundstation_config") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "antenna_downlink_config": "AntennaDownlinkConfig", + "antenna_downlink_demod_decode_config": "AntennaDownlinkDemodDecodeConfig", + "antenna_uplink_config": "AntennaUplinkConfig", + "antenna_uplink_config_arn": "AntennaUplinkConfigArn", + "arn": "Arn", + "autotrack": "Autotrack", + "bandwidth": "Bandwidth", + "bucket_arn": "BucketArn", + "center_frequency": "CenterFrequency", + "config_data": "ConfigData", + "config_id": "Id", + "dataflow_endpoint_config": "DataflowEndpointConfig", + "dataflow_endpoint_name": "DataflowEndpointName", + "dataflow_endpoint_region": "DataflowEndpointRegion", + "decode_config": "DecodeConfig", + "demodulation_config": "DemodulationConfig", + "enabled": "Enabled", + "key": "Key", + "name": "Name", + "polarization": "Polarization", + "prefix": "Prefix", + "role_arn": "RoleArn", + "s3_recording_config": "S3RecordingConfig", + "spectrum_config": "SpectrumConfig", + "tags": "Tags", + "target_eirp": "TargetEirp", + "tracking_config": "TrackingConfig", + "transmit_disabled": "TransmitDisabled", + "type": "Type", + "units": "Units", + "unvalidated_json": "UnvalidatedJSON", + "uplink_echo_config": "UplinkEchoConfig", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/groundstation/config_singular_data_source_gen_test.go b/internal/aws/groundstation/config_singular_data_source_gen_test.go new file mode 100644 index 000000000..d7c63206a --- /dev/null +++ b/internal/aws/groundstation/config_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package groundstation_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSGroundStationConfigDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::GroundStation::Config", "awscc_groundstation_config", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSGroundStationConfigDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::GroundStation::Config", "awscc_groundstation_config", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/groundstation/dataflow_endpoint_group_resource_gen.go b/internal/aws/groundstation/dataflow_endpoint_group_resource_gen.go index 1696ed5a8..34c030019 100644 --- a/internal/aws/groundstation/dataflow_endpoint_group_resource_gen.go +++ b/internal/aws/groundstation/dataflow_endpoint_group_resource_gen.go @@ -511,7 +511,7 @@ func dataflowEndpointGroupResource(ctx context.Context) (resource.Resource, erro // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "dataflow_endpoint_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -568,6 +568,15 @@ func dataflowEndpointGroupResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "AWS Ground Station DataflowEndpointGroup schema for CloudFormation", Version: 1, @@ -578,7 +587,6 @@ func dataflowEndpointGroupResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::GroundStation::DataflowEndpointGroup").WithTerraformTypeName("awscc_groundstation_dataflow_endpoint_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "agent_status": "AgentStatus", @@ -587,10 +595,10 @@ func dataflowEndpointGroupResource(ctx context.Context) (resource.Resource, erro "aws_ground_station_agent_endpoint": "AwsGroundStationAgentEndpoint", "contact_post_pass_duration_seconds": "ContactPostPassDurationSeconds", "contact_pre_pass_duration_seconds": "ContactPrePassDurationSeconds", + "dataflow_endpoint_group_id": "Id", "egress_address": "EgressAddress", "endpoint": "Endpoint", "endpoint_details": "EndpointDetails", - "id": "Id", "ingress_address": "IngressAddress", "key": "Key", "maximum": "Maximum", diff --git a/internal/aws/groundstation/dataflow_endpoint_group_singular_data_source_gen.go b/internal/aws/groundstation/dataflow_endpoint_group_singular_data_source_gen.go index dfe9966fe..3fc651f2b 100644 --- a/internal/aws/groundstation/dataflow_endpoint_group_singular_data_source_gen.go +++ b/internal/aws/groundstation/dataflow_endpoint_group_singular_data_source_gen.go @@ -364,7 +364,7 @@ func dataflowEndpointGroupDataSource(ctx context.Context) (datasource.DataSource // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "dataflow_endpoint_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Tags @@ -430,10 +430,10 @@ func dataflowEndpointGroupDataSource(ctx context.Context) (datasource.DataSource "aws_ground_station_agent_endpoint": "AwsGroundStationAgentEndpoint", "contact_post_pass_duration_seconds": "ContactPostPassDurationSeconds", "contact_pre_pass_duration_seconds": "ContactPrePassDurationSeconds", + "dataflow_endpoint_group_id": "Id", "egress_address": "EgressAddress", "endpoint": "Endpoint", "endpoint_details": "EndpointDetails", - "id": "Id", "ingress_address": "IngressAddress", "key": "Key", "maximum": "Maximum", diff --git a/internal/aws/groundstation/mission_profile_resource_gen.go b/internal/aws/groundstation/mission_profile_resource_gen.go index 010f2c383..dec01efd4 100644 --- a/internal/aws/groundstation/mission_profile_resource_gen.go +++ b/internal/aws/groundstation/mission_profile_resource_gen.go @@ -126,7 +126,7 @@ func missionProfileResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "mission_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -299,6 +299,15 @@ func missionProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "AWS Ground Station Mission Profile resource type for CloudFormation.", Version: 1, @@ -309,26 +318,25 @@ func missionProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GroundStation::MissionProfile").WithTerraformTypeName("awscc_groundstation_mission_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "contact_post_pass_duration_seconds": "ContactPostPassDurationSeconds", "contact_pre_pass_duration_seconds": "ContactPrePassDurationSeconds", "dataflow_edges": "DataflowEdges", "destination": "Destination", - "id": "Id", "key": "Key", "kms_alias_arn": "KmsAliasArn", "kms_key_arn": "KmsKeyArn", "minimum_viable_contact_duration_seconds": "MinimumViableContactDurationSeconds", - "name": "Name", - "region": "Region", - "source": "Source", - "streams_kms_key": "StreamsKmsKey", - "streams_kms_role": "StreamsKmsRole", - "tags": "Tags", - "tracking_config_arn": "TrackingConfigArn", - "value": "Value", + "mission_profile_id": "Id", + "name": "Name", + "region": "Region", + "source": "Source", + "streams_kms_key": "StreamsKmsKey", + "streams_kms_role": "StreamsKmsRole", + "tags": "Tags", + "tracking_config_arn": "TrackingConfigArn", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/groundstation/mission_profile_singular_data_source_gen.go b/internal/aws/groundstation/mission_profile_singular_data_source_gen.go index c612c3999..6f6100ae8 100644 --- a/internal/aws/groundstation/mission_profile_singular_data_source_gen.go +++ b/internal/aws/groundstation/mission_profile_singular_data_source_gen.go @@ -95,7 +95,7 @@ func missionProfileDataSource(ctx context.Context) (datasource.DataSource, error // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "mission_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: MinimumViableContactDurationSeconds @@ -253,19 +253,19 @@ func missionProfileDataSource(ctx context.Context) (datasource.DataSource, error "contact_pre_pass_duration_seconds": "ContactPrePassDurationSeconds", "dataflow_edges": "DataflowEdges", "destination": "Destination", - "id": "Id", "key": "Key", "kms_alias_arn": "KmsAliasArn", "kms_key_arn": "KmsKeyArn", "minimum_viable_contact_duration_seconds": "MinimumViableContactDurationSeconds", - "name": "Name", - "region": "Region", - "source": "Source", - "streams_kms_key": "StreamsKmsKey", - "streams_kms_role": "StreamsKmsRole", - "tags": "Tags", - "tracking_config_arn": "TrackingConfigArn", - "value": "Value", + "mission_profile_id": "Id", + "name": "Name", + "region": "Region", + "source": "Source", + "streams_kms_key": "StreamsKmsKey", + "streams_kms_role": "StreamsKmsRole", + "tags": "Tags", + "tracking_config_arn": "TrackingConfigArn", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/guardduty/detector_resource_gen.go b/internal/aws/guardduty/detector_resource_gen.go index e4f31f18e..2682c9054 100644 --- a/internal/aws/guardduty/detector_resource_gen.go +++ b/internal/aws/guardduty/detector_resource_gen.go @@ -293,7 +293,7 @@ func detectorResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "detector_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -352,6 +352,15 @@ func detectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::GuardDuty::Detector", Version: 1, @@ -362,16 +371,15 @@ func detectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::Detector").WithTerraformTypeName("awscc_guardduty_detector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "additional_configuration": "AdditionalConfiguration", "audit_logs": "AuditLogs", "data_sources": "DataSources", + "detector_id": "Id", "ebs_volumes": "EbsVolumes", "enable": "Enable", "features": "Features", "finding_publishing_frequency": "FindingPublishingFrequency", - "id": "Id", "key": "Key", "kubernetes": "Kubernetes", "malware_protection": "MalwareProtection", diff --git a/internal/aws/guardduty/detector_singular_data_source_gen.go b/internal/aws/guardduty/detector_singular_data_source_gen.go index 17b88b705..f91337e1e 100644 --- a/internal/aws/guardduty/detector_singular_data_source_gen.go +++ b/internal/aws/guardduty/detector_singular_data_source_gen.go @@ -227,7 +227,7 @@ func detectorDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "detector_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Tags @@ -291,11 +291,11 @@ func detectorDataSource(ctx context.Context) (datasource.DataSource, error) { "additional_configuration": "AdditionalConfiguration", "audit_logs": "AuditLogs", "data_sources": "DataSources", + "detector_id": "Id", "ebs_volumes": "EbsVolumes", "enable": "Enable", "features": "Features", "finding_publishing_frequency": "FindingPublishingFrequency", - "id": "Id", "key": "Key", "kubernetes": "Kubernetes", "malware_protection": "MalwareProtection", diff --git a/internal/aws/guardduty/filter_resource_gen.go b/internal/aws/guardduty/filter_resource_gen.go index 3f0e7329a..00b69f06b 100644 --- a/internal/aws/guardduty/filter_resource_gen.go +++ b/internal/aws/guardduty/filter_resource_gen.go @@ -361,6 +361,7 @@ func filterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -379,7 +380,6 @@ func filterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::Filter").WithTerraformTypeName("awscc_guardduty_filter") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "criterion": "Criterion", diff --git a/internal/aws/guardduty/ip_set_resource_gen.go b/internal/aws/guardduty/ip_set_resource_gen.go index 5f2953860..ecdf75313 100644 --- a/internal/aws/guardduty/ip_set_resource_gen.go +++ b/internal/aws/guardduty/ip_set_resource_gen.go @@ -79,7 +79,7 @@ func iPSetResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "ip_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -170,6 +170,15 @@ func iPSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::GuardDuty::IPSet", Version: 1, @@ -180,12 +189,11 @@ func iPSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::IPSet").WithTerraformTypeName("awscc_guardduty_ip_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "activate": "Activate", "detector_id": "DetectorId", "format": "Format", - "id": "Id", + "ip_set_id": "Id", "key": "Key", "location": "Location", "name": "Name", diff --git a/internal/aws/guardduty/ip_set_singular_data_source_gen.go b/internal/aws/guardduty/ip_set_singular_data_source_gen.go index c2204672d..f2295882b 100644 --- a/internal/aws/guardduty/ip_set_singular_data_source_gen.go +++ b/internal/aws/guardduty/ip_set_singular_data_source_gen.go @@ -57,7 +57,7 @@ func iPSetDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "ip_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Location @@ -143,7 +143,7 @@ func iPSetDataSource(ctx context.Context) (datasource.DataSource, error) { "activate": "Activate", "detector_id": "DetectorId", "format": "Format", - "id": "Id", + "ip_set_id": "Id", "key": "Key", "location": "Location", "name": "Name", diff --git a/internal/aws/guardduty/master_resource_gen.go b/internal/aws/guardduty/master_resource_gen.go index 7272e9d37..d6b11a3f1 100644 --- a/internal/aws/guardduty/master_resource_gen.go +++ b/internal/aws/guardduty/master_resource_gen.go @@ -70,6 +70,7 @@ func masterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -88,7 +89,6 @@ func masterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::Master").WithTerraformTypeName("awscc_guardduty_master") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "detector_id": "DetectorId", "invitation_id": "InvitationId", diff --git a/internal/aws/guardduty/member_resource_gen.go b/internal/aws/guardduty/member_resource_gen.go index 02dfc68f9..44038301a 100644 --- a/internal/aws/guardduty/member_resource_gen.go +++ b/internal/aws/guardduty/member_resource_gen.go @@ -105,6 +105,7 @@ func memberResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -123,7 +124,6 @@ func memberResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::Member").WithTerraformTypeName("awscc_guardduty_member") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "detector_id": "DetectorId", "disable_email_notification": "DisableEmailNotification", diff --git a/internal/aws/guardduty/threat_intel_set_resource_gen.go b/internal/aws/guardduty/threat_intel_set_resource_gen.go index 7f33c4f7b..7d1661b65 100644 --- a/internal/aws/guardduty/threat_intel_set_resource_gen.go +++ b/internal/aws/guardduty/threat_intel_set_resource_gen.go @@ -84,7 +84,7 @@ func threatIntelSetResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "threat_intel_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -170,6 +170,15 @@ func threatIntelSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::GuardDuty::ThreatIntelSet", Version: 1, @@ -180,17 +189,16 @@ func threatIntelSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::ThreatIntelSet").WithTerraformTypeName("awscc_guardduty_threat_intel_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "activate": "Activate", - "detector_id": "DetectorId", - "format": "Format", - "id": "Id", - "key": "Key", - "location": "Location", - "name": "Name", - "tags": "Tags", - "value": "Value", + "activate": "Activate", + "detector_id": "DetectorId", + "format": "Format", + "key": "Key", + "location": "Location", + "name": "Name", + "tags": "Tags", + "threat_intel_set_id": "Id", + "value": "Value", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/guardduty/threat_intel_set_singular_data_source_gen.go b/internal/aws/guardduty/threat_intel_set_singular_data_source_gen.go index 8531ca8bf..734df4076 100644 --- a/internal/aws/guardduty/threat_intel_set_singular_data_source_gen.go +++ b/internal/aws/guardduty/threat_intel_set_singular_data_source_gen.go @@ -59,7 +59,7 @@ func threatIntelSetDataSource(ctx context.Context) (datasource.DataSource, error // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "threat_intel_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Location @@ -140,15 +140,15 @@ func threatIntelSetDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::GuardDuty::ThreatIntelSet").WithTerraformTypeName("awscc_guardduty_threat_intel_set") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "activate": "Activate", - "detector_id": "DetectorId", - "format": "Format", - "id": "Id", - "key": "Key", - "location": "Location", - "name": "Name", - "tags": "Tags", - "value": "Value", + "activate": "Activate", + "detector_id": "DetectorId", + "format": "Format", + "key": "Key", + "location": "Location", + "name": "Name", + "tags": "Tags", + "threat_intel_set_id": "Id", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/healthimaging/datastore_resource_gen.go b/internal/aws/healthimaging/datastore_resource_gen.go index fc4e07d6c..ec45c8db0 100644 --- a/internal/aws/healthimaging/datastore_resource_gen.go +++ b/internal/aws/healthimaging/datastore_resource_gen.go @@ -185,6 +185,7 @@ func datastoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -203,7 +204,6 @@ func datastoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::HealthImaging::Datastore").WithTerraformTypeName("awscc_healthimaging_datastore") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "created_at": "CreatedAt", "datastore_arn": "DatastoreArn", diff --git a/internal/aws/healthlake/fhir_datastore_resource_gen.go b/internal/aws/healthlake/fhir_datastore_resource_gen.go index 99127ded6..7104f834c 100644 --- a/internal/aws/healthlake/fhir_datastore_resource_gen.go +++ b/internal/aws/healthlake/fhir_datastore_resource_gen.go @@ -450,6 +450,7 @@ func fHIRDatastoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -468,7 +469,6 @@ func fHIRDatastoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::HealthLake::FHIRDatastore").WithTerraformTypeName("awscc_healthlake_fhir_datastore") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "authorization_strategy": "AuthorizationStrategy", "cmk_type": "CmkType", diff --git a/internal/aws/iam/group_policy_resource_gen.go b/internal/aws/iam/group_policy_resource_gen.go index a72c7c003..d00a2340f 100644 --- a/internal/aws/iam/group_policy_resource_gen.go +++ b/internal/aws/iam/group_policy_resource_gen.go @@ -71,6 +71,7 @@ func groupPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -89,7 +90,6 @@ func groupPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::GroupPolicy").WithTerraformTypeName("awscc_iam_group_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "group_name": "GroupName", "policy_document": "PolicyDocument", diff --git a/internal/aws/iam/group_resource_gen.go b/internal/aws/iam/group_resource_gen.go index 60d48472a..954cdff0a 100644 --- a/internal/aws/iam/group_resource_gen.go +++ b/internal/aws/iam/group_resource_gen.go @@ -146,6 +146,7 @@ func groupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -164,7 +165,6 @@ func groupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::Group").WithTerraformTypeName("awscc_iam_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "group_name": "GroupName", diff --git a/internal/aws/iam/managed_policy_resource_gen.go b/internal/aws/iam/managed_policy_resource_gen.go index 7277adadf..bf5904d6d 100644 --- a/internal/aws/iam/managed_policy_resource_gen.go +++ b/internal/aws/iam/managed_policy_resource_gen.go @@ -264,6 +264,7 @@ func managedPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -282,7 +283,6 @@ func managedPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::ManagedPolicy").WithTerraformTypeName("awscc_iam_managed_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_count": "AttachmentCount", "create_date": "CreateDate", diff --git a/internal/aws/iam/oidc_provider_resource_gen.go b/internal/aws/iam/oidc_provider_resource_gen.go index 99c123831..561d4dbbd 100644 --- a/internal/aws/iam/oidc_provider_resource_gen.go +++ b/internal/aws/iam/oidc_provider_resource_gen.go @@ -180,6 +180,7 @@ func oIDCProviderResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -198,7 +199,6 @@ func oIDCProviderResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::OIDCProvider").WithTerraformTypeName("awscc_iam_oidc_provider") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "client_id_list": "ClientIdList", diff --git a/internal/aws/iam/role_policy_resource_gen.go b/internal/aws/iam/role_policy_resource_gen.go index ccd619fce..b7d3e168a 100644 --- a/internal/aws/iam/role_policy_resource_gen.go +++ b/internal/aws/iam/role_policy_resource_gen.go @@ -71,6 +71,7 @@ func rolePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -89,7 +90,6 @@ func rolePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::RolePolicy").WithTerraformTypeName("awscc_iam_role_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy_document": "PolicyDocument", "policy_name": "PolicyName", diff --git a/internal/aws/iam/role_resource_gen.go b/internal/aws/iam/role_resource_gen.go index b8b80a330..233810a4f 100644 --- a/internal/aws/iam/role_resource_gen.go +++ b/internal/aws/iam/role_resource_gen.go @@ -271,6 +271,7 @@ func roleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -289,7 +290,6 @@ func roleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::Role").WithTerraformTypeName("awscc_iam_role") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "assume_role_policy_document": "AssumeRolePolicyDocument", diff --git a/internal/aws/iam/saml_provider_resource_gen.go b/internal/aws/iam/saml_provider_resource_gen.go index 2562fa7c4..2d32888e4 100644 --- a/internal/aws/iam/saml_provider_resource_gen.go +++ b/internal/aws/iam/saml_provider_resource_gen.go @@ -140,6 +140,7 @@ func sAMLProviderResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -158,7 +159,6 @@ func sAMLProviderResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::SAMLProvider").WithTerraformTypeName("awscc_iam_saml_provider") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/iam/server_certificate_resource_gen.go b/internal/aws/iam/server_certificate_resource_gen.go index 93fccebca..3b931b8b2 100644 --- a/internal/aws/iam/server_certificate_resource_gen.go +++ b/internal/aws/iam/server_certificate_resource_gen.go @@ -208,6 +208,7 @@ func serverCertificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -226,7 +227,6 @@ func serverCertificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::ServerCertificate").WithTerraformTypeName("awscc_iam_server_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "certificate_body": "CertificateBody", diff --git a/internal/aws/iam/service_linked_role_resource_gen.go b/internal/aws/iam/service_linked_role_resource_gen.go index d5f357558..3ea540f44 100644 --- a/internal/aws/iam/service_linked_role_resource_gen.go +++ b/internal/aws/iam/service_linked_role_resource_gen.go @@ -89,6 +89,7 @@ func serviceLinkedRoleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -107,7 +108,6 @@ func serviceLinkedRoleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::ServiceLinkedRole").WithTerraformTypeName("awscc_iam_service_linked_role") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aws_service_name": "AWSServiceName", "custom_suffix": "CustomSuffix", diff --git a/internal/aws/iam/user_policy_resource_gen.go b/internal/aws/iam/user_policy_resource_gen.go index 9db925be0..34bf28859 100644 --- a/internal/aws/iam/user_policy_resource_gen.go +++ b/internal/aws/iam/user_policy_resource_gen.go @@ -71,6 +71,7 @@ func userPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -89,7 +90,6 @@ func userPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::UserPolicy").WithTerraformTypeName("awscc_iam_user_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy_document": "PolicyDocument", "policy_name": "PolicyName", diff --git a/internal/aws/iam/user_resource_gen.go b/internal/aws/iam/user_resource_gen.go index 6de1f2c6e..c316231a4 100644 --- a/internal/aws/iam/user_resource_gen.go +++ b/internal/aws/iam/user_resource_gen.go @@ -282,6 +282,7 @@ func userResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -300,7 +301,6 @@ func userResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::User").WithTerraformTypeName("awscc_iam_user") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "groups": "Groups", diff --git a/internal/aws/iam/virtual_mfa_device_resource_gen.go b/internal/aws/iam/virtual_mfa_device_resource_gen.go index a02f6bace..36fe4029b 100644 --- a/internal/aws/iam/virtual_mfa_device_resource_gen.go +++ b/internal/aws/iam/virtual_mfa_device_resource_gen.go @@ -158,6 +158,7 @@ func virtualMFADeviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -176,7 +177,6 @@ func virtualMFADeviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IAM::VirtualMFADevice").WithTerraformTypeName("awscc_iam_virtual_mfa_device") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "path": "Path", diff --git a/internal/aws/identitystore/group_membership_resource_gen.go b/internal/aws/identitystore/group_membership_resource_gen.go index 75e6ea2db..4fd694a20 100644 --- a/internal/aws/identitystore/group_membership_resource_gen.go +++ b/internal/aws/identitystore/group_membership_resource_gen.go @@ -127,6 +127,7 @@ func groupMembershipResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -145,7 +146,6 @@ func groupMembershipResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IdentityStore::GroupMembership").WithTerraformTypeName("awscc_identitystore_group_membership") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "group_id": "GroupId", "identity_store_id": "IdentityStoreId", diff --git a/internal/aws/identitystore/group_resource_gen.go b/internal/aws/identitystore/group_resource_gen.go index 134c038d5..620371d91 100644 --- a/internal/aws/identitystore/group_resource_gen.go +++ b/internal/aws/identitystore/group_resource_gen.go @@ -107,6 +107,7 @@ func groupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -125,7 +126,6 @@ func groupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IdentityStore::Group").WithTerraformTypeName("awscc_identitystore_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "display_name": "DisplayName", diff --git a/internal/aws/imagebuilder/component_resource_gen.go b/internal/aws/imagebuilder/component_resource_gen.go index 9ec6a4b41..8cac0d14a 100644 --- a/internal/aws/imagebuilder/component_resource_gen.go +++ b/internal/aws/imagebuilder/component_resource_gen.go @@ -264,6 +264,7 @@ func componentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -282,7 +283,6 @@ func componentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::Component").WithTerraformTypeName("awscc_imagebuilder_component") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "change_description": "ChangeDescription", diff --git a/internal/aws/imagebuilder/container_recipe_resource_gen.go b/internal/aws/imagebuilder/container_recipe_resource_gen.go index d6649a2c4..77b84d44a 100644 --- a/internal/aws/imagebuilder/container_recipe_resource_gen.go +++ b/internal/aws/imagebuilder/container_recipe_resource_gen.go @@ -660,6 +660,7 @@ func containerRecipeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -678,7 +679,6 @@ func containerRecipeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::ContainerRecipe").WithTerraformTypeName("awscc_imagebuilder_container_recipe") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "block_device_mappings": "BlockDeviceMappings", diff --git a/internal/aws/imagebuilder/distribution_configuration_resource_gen.go b/internal/aws/imagebuilder/distribution_configuration_resource_gen.go index 6681a47c6..ec970f215 100644 --- a/internal/aws/imagebuilder/distribution_configuration_resource_gen.go +++ b/internal/aws/imagebuilder/distribution_configuration_resource_gen.go @@ -661,6 +661,7 @@ func distributionConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -679,7 +680,6 @@ func distributionConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::DistributionConfiguration").WithTerraformTypeName("awscc_imagebuilder_distribution_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "ami_distribution_configuration": "AmiDistributionConfiguration", diff --git a/internal/aws/imagebuilder/image_pipeline_resource_gen.go b/internal/aws/imagebuilder/image_pipeline_resource_gen.go index b01f8c311..97c28651e 100644 --- a/internal/aws/imagebuilder/image_pipeline_resource_gen.go +++ b/internal/aws/imagebuilder/image_pipeline_resource_gen.go @@ -537,6 +537,7 @@ func imagePipelineResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -555,7 +556,6 @@ func imagePipelineResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::ImagePipeline").WithTerraformTypeName("awscc_imagebuilder_image_pipeline") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "container_recipe_arn": "ContainerRecipeArn", diff --git a/internal/aws/imagebuilder/image_recipe_resource_gen.go b/internal/aws/imagebuilder/image_recipe_resource_gen.go index c2d181932..048bc1678 100644 --- a/internal/aws/imagebuilder/image_recipe_resource_gen.go +++ b/internal/aws/imagebuilder/image_recipe_resource_gen.go @@ -512,6 +512,7 @@ func imageRecipeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -530,7 +531,6 @@ func imageRecipeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::ImageRecipe").WithTerraformTypeName("awscc_imagebuilder_image_recipe") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "additional_instance_configuration": "AdditionalInstanceConfiguration", "arn": "Arn", diff --git a/internal/aws/imagebuilder/image_resource_gen.go b/internal/aws/imagebuilder/image_resource_gen.go index 5888607c6..489a441c5 100644 --- a/internal/aws/imagebuilder/image_resource_gen.go +++ b/internal/aws/imagebuilder/image_resource_gen.go @@ -476,6 +476,7 @@ func imageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -494,7 +495,6 @@ func imageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::Image").WithTerraformTypeName("awscc_imagebuilder_image") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "container_recipe_arn": "ContainerRecipeArn", diff --git a/internal/aws/imagebuilder/infrastructure_configuration_resource_gen.go b/internal/aws/imagebuilder/infrastructure_configuration_resource_gen.go index 0c3c02702..e8d8f12fa 100644 --- a/internal/aws/imagebuilder/infrastructure_configuration_resource_gen.go +++ b/internal/aws/imagebuilder/infrastructure_configuration_resource_gen.go @@ -355,6 +355,7 @@ func infrastructureConfigurationResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -373,7 +374,6 @@ func infrastructureConfigurationResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::InfrastructureConfiguration").WithTerraformTypeName("awscc_imagebuilder_infrastructure_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/imagebuilder/lifecycle_policy_resource_gen.go b/internal/aws/imagebuilder/lifecycle_policy_resource_gen.go index 14fd17803..07510761c 100644 --- a/internal/aws/imagebuilder/lifecycle_policy_resource_gen.go +++ b/internal/aws/imagebuilder/lifecycle_policy_resource_gen.go @@ -636,6 +636,7 @@ func lifecyclePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -654,7 +655,6 @@ func lifecyclePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ImageBuilder::LifecyclePolicy").WithTerraformTypeName("awscc_imagebuilder_lifecycle_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "amis": "Amis", diff --git a/internal/aws/inspector/assessment_target_resource_gen.go b/internal/aws/inspector/assessment_target_resource_gen.go index ab33b0bb6..23835c770 100644 --- a/internal/aws/inspector/assessment_target_resource_gen.go +++ b/internal/aws/inspector/assessment_target_resource_gen.go @@ -65,6 +65,7 @@ func assessmentTargetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -83,7 +84,6 @@ func assessmentTargetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Inspector::AssessmentTarget").WithTerraformTypeName("awscc_inspector_assessment_target") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "assessment_target_name": "AssessmentTargetName", diff --git a/internal/aws/inspector/assessment_template_resource_gen.go b/internal/aws/inspector/assessment_template_resource_gen.go index 4a2d71eab..af8f69661 100644 --- a/internal/aws/inspector/assessment_template_resource_gen.go +++ b/internal/aws/inspector/assessment_template_resource_gen.go @@ -139,6 +139,7 @@ func assessmentTemplateResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -157,7 +158,6 @@ func assessmentTemplateResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Inspector::AssessmentTemplate").WithTerraformTypeName("awscc_inspector_assessment_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "assessment_target_arn": "AssessmentTargetArn", diff --git a/internal/aws/inspector/resource_group_resource_gen.go b/internal/aws/inspector/resource_group_resource_gen.go index c7b93f3ca..29fad6934 100644 --- a/internal/aws/inspector/resource_group_resource_gen.go +++ b/internal/aws/inspector/resource_group_resource_gen.go @@ -80,6 +80,7 @@ func resourceGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -98,7 +99,6 @@ func resourceGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Inspector::ResourceGroup").WithTerraformTypeName("awscc_inspector_resource_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/inspectorv2/filter_resource_gen.go b/internal/aws/inspectorv2/filter_resource_gen.go index 39296356d..c1e1b0688 100644 --- a/internal/aws/inspectorv2/filter_resource_gen.go +++ b/internal/aws/inspectorv2/filter_resource_gen.go @@ -2289,6 +2289,7 @@ func filterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -2307,7 +2308,6 @@ func filterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::InspectorV2::Filter").WithTerraformTypeName("awscc_inspectorv2_filter") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "architecture": "Architecture", "arn": "Arn", diff --git a/internal/aws/internetmonitor/monitor_resource_gen.go b/internal/aws/internetmonitor/monitor_resource_gen.go index 78dd23cc6..3df5b4437 100644 --- a/internal/aws/internetmonitor/monitor_resource_gen.go +++ b/internal/aws/internetmonitor/monitor_resource_gen.go @@ -631,6 +631,7 @@ func monitorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -649,7 +650,6 @@ func monitorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::InternetMonitor::Monitor").WithTerraformTypeName("awscc_internetmonitor_monitor") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "availability_local_health_events_config": "AvailabilityLocalHealthEventsConfig", "availability_score_threshold": "AvailabilityScoreThreshold", diff --git a/internal/aws/iot/account_audit_configuration_resource_gen.go b/internal/aws/iot/account_audit_configuration_resource_gen.go index 496e1570a..77f4be4d1 100644 --- a/internal/aws/iot/account_audit_configuration_resource_gen.go +++ b/internal/aws/iot/account_audit_configuration_resource_gen.go @@ -661,6 +661,7 @@ func accountAuditConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -679,7 +680,6 @@ func accountAuditConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::IoT::AccountAuditConfiguration").WithTerraformTypeName("awscc_iot_account_audit_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "audit_check_configurations": "AuditCheckConfigurations", diff --git a/internal/aws/iot/authorizer_resource_gen.go b/internal/aws/iot/authorizer_resource_gen.go index b74731fdd..405600bed 100644 --- a/internal/aws/iot/authorizer_resource_gen.go +++ b/internal/aws/iot/authorizer_resource_gen.go @@ -202,6 +202,7 @@ func authorizerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -220,7 +221,6 @@ func authorizerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::Authorizer").WithTerraformTypeName("awscc_iot_authorizer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "authorizer_function_arn": "AuthorizerFunctionArn", diff --git a/internal/aws/iot/billing_group_plural_data_source_gen.go b/internal/aws/iot/billing_group_plural_data_source_gen.go new file mode 100644 index 000000000..da56200dd --- /dev/null +++ b/internal/aws/iot/billing_group_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_billing_groups", billingGroupsDataSource) +} + +// billingGroupsDataSource returns the Terraform awscc_iot_billing_groups data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::BillingGroup resource. +func billingGroupsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoT::BillingGroup", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::BillingGroup").WithTerraformTypeName("awscc_iot_billing_groups") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/billing_group_plural_data_source_gen_test.go b/internal/aws/iot/billing_group_plural_data_source_gen_test.go new file mode 100644 index 000000000..34d7d20ad --- /dev/null +++ b/internal/aws/iot/billing_group_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTBillingGroupsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::BillingGroup", "awscc_iot_billing_groups", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iot/billing_group_resource_gen.go b/internal/aws/iot/billing_group_resource_gen.go new file mode 100644 index 000000000..584ef0bd5 --- /dev/null +++ b/internal/aws/iot/billing_group_resource_gen.go @@ -0,0 +1,221 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iot_billing_group", billingGroupResource) +} + +// billingGroupResource returns the Terraform awscc_iot_billing_group resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoT::BillingGroup resource. +func billingGroupResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: BillingGroupName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "billing_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9:_-]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: BillingGroupProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "BillingGroupDescription": { + // "maxLength": 2028, + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // } + "billing_group_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BillingGroupDescription + "billing_group_description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(2028), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "billing_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeAtMost(50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoT::BillingGroup", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::BillingGroup").WithTerraformTypeName("awscc_iot_billing_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "billing_group_description": "BillingGroupDescription", + "billing_group_id": "Id", + "billing_group_name": "BillingGroupName", + "billing_group_properties": "BillingGroupProperties", + "key": "Key", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/billing_group_resource_gen_test.go b/internal/aws/iot/billing_group_resource_gen_test.go new file mode 100644 index 000000000..cf42320fb --- /dev/null +++ b/internal/aws/iot/billing_group_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTBillingGroup_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::BillingGroup", "awscc_iot_billing_group", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIoTBillingGroup_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::BillingGroup", "awscc_iot_billing_group", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/iot/billing_group_singular_data_source_gen.go b/internal/aws/iot/billing_group_singular_data_source_gen.go new file mode 100644 index 000000000..db839579e --- /dev/null +++ b/internal/aws/iot/billing_group_singular_data_source_gen.go @@ -0,0 +1,164 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_billing_group", billingGroupDataSource) +} + +// billingGroupDataSource returns the Terraform awscc_iot_billing_group data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::BillingGroup resource. +func billingGroupDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: BillingGroupName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "billing_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: BillingGroupProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "BillingGroupDescription": { + // "maxLength": 2028, + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // } + "billing_group_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BillingGroupDescription + "billing_group_description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "billing_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoT::BillingGroup", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::BillingGroup").WithTerraformTypeName("awscc_iot_billing_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "billing_group_description": "BillingGroupDescription", + "billing_group_id": "Id", + "billing_group_name": "BillingGroupName", + "billing_group_properties": "BillingGroupProperties", + "key": "Key", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/billing_group_singular_data_source_gen_test.go b/internal/aws/iot/billing_group_singular_data_source_gen_test.go new file mode 100644 index 000000000..f152c406d --- /dev/null +++ b/internal/aws/iot/billing_group_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTBillingGroupDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::BillingGroup", "awscc_iot_billing_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIoTBillingGroupDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::BillingGroup", "awscc_iot_billing_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iot/ca_certificate_resource_gen.go b/internal/aws/iot/ca_certificate_resource_gen.go index 9866f5921..57a4e4272 100644 --- a/internal/aws/iot/ca_certificate_resource_gen.go +++ b/internal/aws/iot/ca_certificate_resource_gen.go @@ -114,7 +114,7 @@ func cACertificateResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "ca_certificate_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -311,6 +311,15 @@ func cACertificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Registers a CA Certificate in IoT.", Version: 1, @@ -321,13 +330,12 @@ func cACertificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::CACertificate").WithTerraformTypeName("awscc_iot_ca_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "auto_registration_status": "AutoRegistrationStatus", + "ca_certificate_id": "Id", "ca_certificate_pem": "CACertificatePem", "certificate_mode": "CertificateMode", - "id": "Id", "key": "Key", "registration_config": "RegistrationConfig", "remove_auto_registration": "RemoveAutoRegistration", diff --git a/internal/aws/iot/ca_certificate_singular_data_source_gen.go b/internal/aws/iot/ca_certificate_singular_data_source_gen.go index f5690c08d..47789db9a 100644 --- a/internal/aws/iot/ca_certificate_singular_data_source_gen.go +++ b/internal/aws/iot/ca_certificate_singular_data_source_gen.go @@ -75,7 +75,7 @@ func cACertificateDataSource(ctx context.Context) (datasource.DataSource, error) // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "ca_certificate_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: RegistrationConfig @@ -226,9 +226,9 @@ func cACertificateDataSource(ctx context.Context) (datasource.DataSource, error) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "auto_registration_status": "AutoRegistrationStatus", + "ca_certificate_id": "Id", "ca_certificate_pem": "CACertificatePem", "certificate_mode": "CertificateMode", - "id": "Id", "key": "Key", "registration_config": "RegistrationConfig", "remove_auto_registration": "RemoveAutoRegistration", diff --git a/internal/aws/iot/certificate_provider_resource_gen.go b/internal/aws/iot/certificate_provider_resource_gen.go index 1e54df03c..27b906aaa 100644 --- a/internal/aws/iot/certificate_provider_resource_gen.go +++ b/internal/aws/iot/certificate_provider_resource_gen.go @@ -171,6 +171,7 @@ func certificateProviderResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -189,7 +190,6 @@ func certificateProviderResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::IoT::CertificateProvider").WithTerraformTypeName("awscc_iot_certificate_provider") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_default_for_operations": "AccountDefaultForOperations", "arn": "Arn", diff --git a/internal/aws/iot/certificate_resource_gen.go b/internal/aws/iot/certificate_resource_gen.go index 304144e71..8e72353e4 100644 --- a/internal/aws/iot/certificate_resource_gen.go +++ b/internal/aws/iot/certificate_resource_gen.go @@ -122,7 +122,7 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "certificate_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -155,6 +155,15 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Use the AWS::IoT::Certificate resource to declare an AWS IoT X.509 certificate.", Version: 1, @@ -165,14 +174,13 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::Certificate").WithTerraformTypeName("awscc_iot_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "ca_certificate_pem": "CACertificatePem", + "certificate_id": "Id", "certificate_mode": "CertificateMode", "certificate_pem": "CertificatePem", "certificate_signing_request": "CertificateSigningRequest", - "id": "Id", "status": "Status", }) diff --git a/internal/aws/iot/certificate_singular_data_source_gen.go b/internal/aws/iot/certificate_singular_data_source_gen.go index ed771d7da..007cbc61b 100644 --- a/internal/aws/iot/certificate_singular_data_source_gen.go +++ b/internal/aws/iot/certificate_singular_data_source_gen.go @@ -81,7 +81,7 @@ func certificateDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "certificate_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Status @@ -119,10 +119,10 @@ func certificateDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "ca_certificate_pem": "CACertificatePem", + "certificate_id": "Id", "certificate_mode": "CertificateMode", "certificate_pem": "CertificatePem", "certificate_signing_request": "CertificateSigningRequest", - "id": "Id", "status": "Status", }) diff --git a/internal/aws/iot/custom_metric_resource_gen.go b/internal/aws/iot/custom_metric_resource_gen.go index a3705d490..527d87da7 100644 --- a/internal/aws/iot/custom_metric_resource_gen.go +++ b/internal/aws/iot/custom_metric_resource_gen.go @@ -181,6 +181,7 @@ func customMetricResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -199,7 +200,6 @@ func customMetricResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::CustomMetric").WithTerraformTypeName("awscc_iot_custom_metric") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "display_name": "DisplayName", "key": "Key", diff --git a/internal/aws/iot/dimension_resource_gen.go b/internal/aws/iot/dimension_resource_gen.go index 731734adc..81da3ed31 100644 --- a/internal/aws/iot/dimension_resource_gen.go +++ b/internal/aws/iot/dimension_resource_gen.go @@ -182,6 +182,7 @@ func dimensionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -200,7 +201,6 @@ func dimensionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::Dimension").WithTerraformTypeName("awscc_iot_dimension") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/iot/domain_configuration_resource_gen.go b/internal/aws/iot/domain_configuration_resource_gen.go index 241f99baf..1d1014b63 100644 --- a/internal/aws/iot/domain_configuration_resource_gen.go +++ b/internal/aws/iot/domain_configuration_resource_gen.go @@ -405,6 +405,7 @@ func domainConfigurationResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -423,7 +424,6 @@ func domainConfigurationResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::IoT::DomainConfiguration").WithTerraformTypeName("awscc_iot_domain_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_authorizer_override": "AllowAuthorizerOverride", "arn": "Arn", diff --git a/internal/aws/iot/fleet_metric_resource_gen.go b/internal/aws/iot/fleet_metric_resource_gen.go index 5f3ddce34..2186b9588 100644 --- a/internal/aws/iot/fleet_metric_resource_gen.go +++ b/internal/aws/iot/fleet_metric_resource_gen.go @@ -325,6 +325,7 @@ func fleetMetricResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -343,7 +344,6 @@ func fleetMetricResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::FleetMetric").WithTerraformTypeName("awscc_iot_fleet_metric") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation_field": "AggregationField", "aggregation_type": "AggregationType", diff --git a/internal/aws/iot/job_template_resource_gen.go b/internal/aws/iot/job_template_resource_gen.go index d9508a730..707f296a7 100644 --- a/internal/aws/iot/job_template_resource_gen.go +++ b/internal/aws/iot/job_template_resource_gen.go @@ -744,6 +744,7 @@ func jobTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -762,7 +763,6 @@ func jobTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::JobTemplate").WithTerraformTypeName("awscc_iot_job_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "abort_config": "AbortConfig", "action": "Action", diff --git a/internal/aws/iot/logging_resource_gen.go b/internal/aws/iot/logging_resource_gen.go index 45e70c5a6..b590e5aad 100644 --- a/internal/aws/iot/logging_resource_gen.go +++ b/internal/aws/iot/logging_resource_gen.go @@ -93,6 +93,7 @@ func loggingResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -111,7 +112,6 @@ func loggingResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::Logging").WithTerraformTypeName("awscc_iot_logging") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "default_log_level": "DefaultLogLevel", diff --git a/internal/aws/iot/mitigation_action_resource_gen.go b/internal/aws/iot/mitigation_action_resource_gen.go index 4573abe65..fd80b69de 100644 --- a/internal/aws/iot/mitigation_action_resource_gen.go +++ b/internal/aws/iot/mitigation_action_resource_gen.go @@ -439,6 +439,7 @@ func mitigationActionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -457,7 +458,6 @@ func mitigationActionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::MitigationAction").WithTerraformTypeName("awscc_iot_mitigation_action") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "action_name": "ActionName", diff --git a/internal/aws/iot/policy_resource_gen.go b/internal/aws/iot/policy_resource_gen.go index cc05bb0b4..bd81cef83 100644 --- a/internal/aws/iot/policy_resource_gen.go +++ b/internal/aws/iot/policy_resource_gen.go @@ -45,7 +45,7 @@ func policyResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -123,6 +123,15 @@ func policyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::IoT::Policy", Version: 1, @@ -133,12 +142,11 @@ func policyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::Policy").WithTerraformTypeName("awscc_iot_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", - "id": "Id", "key": "Key", "policy_document": "PolicyDocument", + "policy_id": "Id", "policy_name": "PolicyName", "tags": "Tags", "value": "Value", diff --git a/internal/aws/iot/policy_singular_data_source_gen.go b/internal/aws/iot/policy_singular_data_source_gen.go index 89e336ad6..bb8cde408 100644 --- a/internal/aws/iot/policy_singular_data_source_gen.go +++ b/internal/aws/iot/policy_singular_data_source_gen.go @@ -37,7 +37,7 @@ func policyDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: PolicyDocument @@ -116,9 +116,9 @@ func policyDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", - "id": "Id", "key": "Key", "policy_document": "PolicyDocument", + "policy_id": "Id", "policy_name": "PolicyName", "tags": "Tags", "value": "Value", diff --git a/internal/aws/iot/provisioning_template_resource_gen.go b/internal/aws/iot/provisioning_template_resource_gen.go index a02ef61b9..2536106fa 100644 --- a/internal/aws/iot/provisioning_template_resource_gen.go +++ b/internal/aws/iot/provisioning_template_resource_gen.go @@ -218,6 +218,7 @@ func provisioningTemplateResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -236,7 +237,6 @@ func provisioningTemplateResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::IoT::ProvisioningTemplate").WithTerraformTypeName("awscc_iot_provisioning_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "enabled": "Enabled", diff --git a/internal/aws/iot/resource_specific_logging_resource_gen.go b/internal/aws/iot/resource_specific_logging_resource_gen.go index 3438d862e..7804ae8ac 100644 --- a/internal/aws/iot/resource_specific_logging_resource_gen.go +++ b/internal/aws/iot/resource_specific_logging_resource_gen.go @@ -124,6 +124,7 @@ func resourceSpecificLoggingResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -142,7 +143,6 @@ func resourceSpecificLoggingResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::IoT::ResourceSpecificLogging").WithTerraformTypeName("awscc_iot_resource_specific_logging") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "log_level": "LogLevel", "target_id": "TargetId", diff --git a/internal/aws/iot/role_alias_resource_gen.go b/internal/aws/iot/role_alias_resource_gen.go index e533dd1e9..805908473 100644 --- a/internal/aws/iot/role_alias_resource_gen.go +++ b/internal/aws/iot/role_alias_resource_gen.go @@ -165,6 +165,7 @@ func roleAliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -183,7 +184,6 @@ func roleAliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::RoleAlias").WithTerraformTypeName("awscc_iot_role_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "credential_duration_seconds": "CredentialDurationSeconds", "key": "Key", diff --git a/internal/aws/iot/scheduled_audit_resource_gen.go b/internal/aws/iot/scheduled_audit_resource_gen.go index 116c22227..e137ec46e 100644 --- a/internal/aws/iot/scheduled_audit_resource_gen.go +++ b/internal/aws/iot/scheduled_audit_resource_gen.go @@ -233,6 +233,7 @@ func scheduledAuditResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -251,7 +252,6 @@ func scheduledAuditResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::ScheduledAudit").WithTerraformTypeName("awscc_iot_scheduled_audit") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "day_of_month": "DayOfMonth", "day_of_week": "DayOfWeek", diff --git a/internal/aws/iot/security_profile_resource_gen.go b/internal/aws/iot/security_profile_resource_gen.go index 077a7028c..fcbf6cff3 100644 --- a/internal/aws/iot/security_profile_resource_gen.go +++ b/internal/aws/iot/security_profile_resource_gen.go @@ -919,6 +919,7 @@ func securityProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -937,7 +938,6 @@ func securityProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::SecurityProfile").WithTerraformTypeName("awscc_iot_security_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "additional_metrics_to_retain_v2": "AdditionalMetricsToRetainV2", "alert_target_arn": "AlertTargetArn", diff --git a/internal/aws/iot/software_package_resource_gen.go b/internal/aws/iot/software_package_resource_gen.go index 4bb0b7deb..79365adb7 100644 --- a/internal/aws/iot/software_package_resource_gen.go +++ b/internal/aws/iot/software_package_resource_gen.go @@ -150,6 +150,7 @@ func softwarePackageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -168,7 +169,6 @@ func softwarePackageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::SoftwarePackage").WithTerraformTypeName("awscc_iot_software_package") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "key": "Key", diff --git a/internal/aws/iot/software_package_version_resource_gen.go b/internal/aws/iot/software_package_version_resource_gen.go index 85dd728aa..b563e3271 100644 --- a/internal/aws/iot/software_package_version_resource_gen.go +++ b/internal/aws/iot/software_package_version_resource_gen.go @@ -223,6 +223,7 @@ func softwarePackageVersionResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -241,7 +242,6 @@ func softwarePackageVersionResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::IoT::SoftwarePackageVersion").WithTerraformTypeName("awscc_iot_software_package_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attributes": "Attributes", "description": "Description", diff --git a/internal/aws/iot/thing_group_plural_data_source_gen.go b/internal/aws/iot/thing_group_plural_data_source_gen.go new file mode 100644 index 000000000..c77fbb51d --- /dev/null +++ b/internal/aws/iot/thing_group_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_thing_groups", thingGroupsDataSource) +} + +// thingGroupsDataSource returns the Terraform awscc_iot_thing_groups data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::ThingGroup resource. +func thingGroupsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoT::ThingGroup", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::ThingGroup").WithTerraformTypeName("awscc_iot_thing_groups") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_group_plural_data_source_gen_test.go b/internal/aws/iot/thing_group_plural_data_source_gen_test.go new file mode 100644 index 000000000..2572ec006 --- /dev/null +++ b/internal/aws/iot/thing_group_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingGroupsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingGroup", "awscc_iot_thing_groups", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iot/thing_group_resource_gen.go b/internal/aws/iot/thing_group_resource_gen.go new file mode 100644 index 000000000..e90a0cd84 --- /dev/null +++ b/internal/aws/iot/thing_group_resource_gen.go @@ -0,0 +1,301 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iot_thing_group", thingGroupResource) +} + +// thingGroupResource returns the Terraform awscc_iot_thing_group resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoT::ThingGroup resource. +func thingGroupResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "thing_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ParentGroupName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "parent_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9:_-]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: QueryString + // CloudFormation resource type schema: + // + // { + // "maxLength": 1000, + // "minLength": 1, + // "type": "string" + // } + "query_string": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 1000), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeAtMost(50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingGroupName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "thing_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9:_-]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingGroupProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AttributePayload": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "ThingGroupDescription": { + // "maxLength": 2028, + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // } + "thing_group_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AttributePayload + "attribute_payload": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingGroupDescription + "thing_group_description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(2028), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoT::ThingGroup", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::ThingGroup").WithTerraformTypeName("awscc_iot_thing_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "attribute_payload": "AttributePayload", + "attributes": "Attributes", + "key": "Key", + "parent_group_name": "ParentGroupName", + "query_string": "QueryString", + "tags": "Tags", + "thing_group_description": "ThingGroupDescription", + "thing_group_id": "Id", + "thing_group_name": "ThingGroupName", + "thing_group_properties": "ThingGroupProperties", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_group_resource_gen_test.go b/internal/aws/iot/thing_group_resource_gen_test.go new file mode 100644 index 000000000..f073805e8 --- /dev/null +++ b/internal/aws/iot/thing_group_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingGroup_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingGroup", "awscc_iot_thing_group", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIoTThingGroup_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingGroup", "awscc_iot_thing_group", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/iot/thing_group_singular_data_source_gen.go b/internal/aws/iot/thing_group_singular_data_source_gen.go new file mode 100644 index 000000000..f99249cd9 --- /dev/null +++ b/internal/aws/iot/thing_group_singular_data_source_gen.go @@ -0,0 +1,219 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_thing_group", thingGroupDataSource) +} + +// thingGroupDataSource returns the Terraform awscc_iot_thing_group data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::ThingGroup resource. +func thingGroupDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "thing_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ParentGroupName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "parent_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: QueryString + // CloudFormation resource type schema: + // + // { + // "maxLength": 1000, + // "minLength": 1, + // "type": "string" + // } + "query_string": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingGroupName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "thing_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingGroupProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AttributePayload": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "ThingGroupDescription": { + // "maxLength": 2028, + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // } + "thing_group_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AttributePayload + "attribute_payload": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingGroupDescription + "thing_group_description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoT::ThingGroup", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::ThingGroup").WithTerraformTypeName("awscc_iot_thing_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "attribute_payload": "AttributePayload", + "attributes": "Attributes", + "key": "Key", + "parent_group_name": "ParentGroupName", + "query_string": "QueryString", + "tags": "Tags", + "thing_group_description": "ThingGroupDescription", + "thing_group_id": "Id", + "thing_group_name": "ThingGroupName", + "thing_group_properties": "ThingGroupProperties", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_group_singular_data_source_gen_test.go b/internal/aws/iot/thing_group_singular_data_source_gen_test.go new file mode 100644 index 000000000..55c1cef29 --- /dev/null +++ b/internal/aws/iot/thing_group_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingGroupDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingGroup", "awscc_iot_thing_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIoTThingGroupDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingGroup", "awscc_iot_thing_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iot/thing_plural_data_source_gen.go b/internal/aws/iot/thing_plural_data_source_gen.go new file mode 100644 index 000000000..9ddc62cb7 --- /dev/null +++ b/internal/aws/iot/thing_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_things", thingsDataSource) +} + +// thingsDataSource returns the Terraform awscc_iot_things data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::Thing resource. +func thingsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoT::Thing", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::Thing").WithTerraformTypeName("awscc_iot_things") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_plural_data_source_gen_test.go b/internal/aws/iot/thing_plural_data_source_gen_test.go new file mode 100644 index 000000000..e3adfd2e2 --- /dev/null +++ b/internal/aws/iot/thing_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::Thing", "awscc_iot_things", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iot/thing_resource_gen.go b/internal/aws/iot/thing_resource_gen.go new file mode 100644 index 000000000..6a5c983be --- /dev/null +++ b/internal/aws/iot/thing_resource_gen.go @@ -0,0 +1,155 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iot_thing", thingResource) +} + +// thingResource returns the Terraform awscc_iot_thing resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoT::Thing resource. +func thingResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AttributePayload + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "attribute_payload": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "thing_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "thing_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9:_-]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoT::Thing", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::Thing").WithTerraformTypeName("awscc_iot_thing") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "attribute_payload": "AttributePayload", + "attributes": "Attributes", + "thing_id": "Id", + "thing_name": "ThingName", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_resource_gen_test.go b/internal/aws/iot/thing_resource_gen_test.go new file mode 100644 index 000000000..1df2e4afc --- /dev/null +++ b/internal/aws/iot/thing_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThing_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::Thing", "awscc_iot_thing", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIoTThing_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::Thing", "awscc_iot_thing", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/iot/thing_singular_data_source_gen.go b/internal/aws/iot/thing_singular_data_source_gen.go new file mode 100644 index 000000000..e52d23da3 --- /dev/null +++ b/internal/aws/iot/thing_singular_data_source_gen.go @@ -0,0 +1,116 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_thing", thingDataSource) +} + +// thingDataSource returns the Terraform awscc_iot_thing data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::Thing resource. +func thingDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AttributePayload + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "attribute_payload": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "thing_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "thing_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoT::Thing", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::Thing").WithTerraformTypeName("awscc_iot_thing") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "attribute_payload": "AttributePayload", + "attributes": "Attributes", + "thing_id": "Id", + "thing_name": "ThingName", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_singular_data_source_gen_test.go b/internal/aws/iot/thing_singular_data_source_gen_test.go new file mode 100644 index 000000000..53ecfe9b0 --- /dev/null +++ b/internal/aws/iot/thing_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::Thing", "awscc_iot_thing", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIoTThingDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::Thing", "awscc_iot_thing", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iot/thing_type_plural_data_source_gen.go b/internal/aws/iot/thing_type_plural_data_source_gen.go new file mode 100644 index 000000000..c3e61e886 --- /dev/null +++ b/internal/aws/iot/thing_type_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_thing_types", thingTypesDataSource) +} + +// thingTypesDataSource returns the Terraform awscc_iot_thing_types data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::ThingType resource. +func thingTypesDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoT::ThingType", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::ThingType").WithTerraformTypeName("awscc_iot_thing_types") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_type_plural_data_source_gen_test.go b/internal/aws/iot/thing_type_plural_data_source_gen_test.go new file mode 100644 index 000000000..58ba67676 --- /dev/null +++ b/internal/aws/iot/thing_type_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingTypesDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingType", "awscc_iot_thing_types", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iot/thing_type_resource_gen.go b/internal/aws/iot/thing_type_resource_gen.go new file mode 100644 index 000000000..57a168f31 --- /dev/null +++ b/internal/aws/iot/thing_type_resource_gen.go @@ -0,0 +1,269 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iot_thing_type", thingTypeResource) +} + +// thingTypeResource returns the Terraform awscc_iot_thing_type resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoT::ThingType resource. +func thingTypeResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeprecateThingType + // CloudFormation resource type schema: + // + // { + // "type": "boolean" + // } + "deprecate_thing_type": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "thing_type_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeAtMost(50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingTypeName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "thing_type_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9:_-]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingTypeProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "SearchableAttributes": { + // "insertionOrder": true, + // "items": { + // "maxLength": 128, + // "pattern": "[a-zA-Z0-9_.,@/:#-]+", + // "type": "string" + // }, + // "maxItems": 3, + // "type": "array", + // "uniqueItems": true + // }, + // "ThingTypeDescription": { + // "maxLength": 2028, + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // } + "thing_type_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SearchableAttributes + "searchable_attributes": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeAtMost(3), + listvalidator.UniqueValues(), + listvalidator.ValueStringsAre( + stringvalidator.LengthAtMost(128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_.,@/:#-]+"), ""), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingTypeDescription + "thing_type_description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(2028), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + objectplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoT::ThingType", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::ThingType").WithTerraformTypeName("awscc_iot_thing_type") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "deprecate_thing_type": "DeprecateThingType", + "key": "Key", + "searchable_attributes": "SearchableAttributes", + "tags": "Tags", + "thing_type_description": "ThingTypeDescription", + "thing_type_id": "Id", + "thing_type_name": "ThingTypeName", + "thing_type_properties": "ThingTypeProperties", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_type_resource_gen_test.go b/internal/aws/iot/thing_type_resource_gen_test.go new file mode 100644 index 000000000..506d2153e --- /dev/null +++ b/internal/aws/iot/thing_type_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iot_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingType_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingType", "awscc_iot_thing_type", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIoTThingType_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingType", "awscc_iot_thing_type", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/iot/thing_type_singular_data_source_gen.go b/internal/aws/iot/thing_type_singular_data_source_gen.go new file mode 100644 index 000000000..c0fa6083d --- /dev/null +++ b/internal/aws/iot/thing_type_singular_data_source_gen.go @@ -0,0 +1,192 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iot_thing_type", thingTypeDataSource) +} + +// thingTypeDataSource returns the Terraform awscc_iot_thing_type data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoT::ThingType resource. +func thingTypeDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeprecateThingType + // CloudFormation resource type schema: + // + // { + // "type": "boolean" + // } + "deprecate_thing_type": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "thing_type_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingTypeName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9:_-]+", + // "type": "string" + // } + "thing_type_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingTypeProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "SearchableAttributes": { + // "insertionOrder": true, + // "items": { + // "maxLength": 128, + // "pattern": "[a-zA-Z0-9_.,@/:#-]+", + // "type": "string" + // }, + // "maxItems": 3, + // "type": "array", + // "uniqueItems": true + // }, + // "ThingTypeDescription": { + // "maxLength": 2028, + // "pattern": "", + // "type": "string" + // } + // }, + // "type": "object" + // } + "thing_type_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SearchableAttributes + "searchable_attributes": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingTypeDescription + "thing_type_description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoT::ThingType", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoT::ThingType").WithTerraformTypeName("awscc_iot_thing_type") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "deprecate_thing_type": "DeprecateThingType", + "key": "Key", + "searchable_attributes": "SearchableAttributes", + "tags": "Tags", + "thing_type_description": "ThingTypeDescription", + "thing_type_id": "Id", + "thing_type_name": "ThingTypeName", + "thing_type_properties": "ThingTypeProperties", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iot/thing_type_singular_data_source_gen_test.go b/internal/aws/iot/thing_type_singular_data_source_gen_test.go new file mode 100644 index 000000000..7004bb63a --- /dev/null +++ b/internal/aws/iot/thing_type_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iot_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTThingTypeDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingType", "awscc_iot_thing_type", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIoTThingTypeDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoT::ThingType", "awscc_iot_thing_type", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iot/topic_rule_destination_resource_gen.go b/internal/aws/iot/topic_rule_destination_resource_gen.go index 4dd0989ab..6b1dff6c4 100644 --- a/internal/aws/iot/topic_rule_destination_resource_gen.go +++ b/internal/aws/iot/topic_rule_destination_resource_gen.go @@ -200,6 +200,7 @@ func topicRuleDestinationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -218,7 +219,6 @@ func topicRuleDestinationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::IoT::TopicRuleDestination").WithTerraformTypeName("awscc_iot_topic_rule_destination") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "confirmation_url": "ConfirmationUrl", diff --git a/internal/aws/iot/topic_rule_resource_gen.go b/internal/aws/iot/topic_rule_resource_gen.go index 3df8b35a7..a2ae4af00 100644 --- a/internal/aws/iot/topic_rule_resource_gen.go +++ b/internal/aws/iot/topic_rule_resource_gen.go @@ -3708,6 +3708,7 @@ func topicRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3726,7 +3727,6 @@ func topicRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoT::TopicRule").WithTerraformTypeName("awscc_iot_topic_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "alarm_name": "AlarmName", diff --git a/internal/aws/iotanalytics/channel_plural_data_source_gen.go b/internal/aws/iotanalytics/channel_plural_data_source_gen.go new file mode 100644 index 000000000..91c00cf94 --- /dev/null +++ b/internal/aws/iotanalytics/channel_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_channels", channelsDataSource) +} + +// channelsDataSource returns the Terraform awscc_iotanalytics_channels data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Channel resource. +func channelsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoTAnalytics::Channel", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Channel").WithTerraformTypeName("awscc_iotanalytics_channels") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/channel_plural_data_source_gen_test.go b/internal/aws/iotanalytics/channel_plural_data_source_gen_test.go new file mode 100644 index 000000000..48838597e --- /dev/null +++ b/internal/aws/iotanalytics/channel_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsChannelsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Channel", "awscc_iotanalytics_channels", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iotanalytics/channel_resource_gen.go b/internal/aws/iotanalytics/channel_resource_gen.go new file mode 100644 index 000000000..2abe998d6 --- /dev/null +++ b/internal/aws/iotanalytics/channel_resource_gen.go @@ -0,0 +1,317 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iotanalytics_channel", channelResource) +} + +// channelResource returns the Terraform awscc_iotanalytics_channel resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoTAnalytics::Channel resource. +func channelResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ChannelName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + "channel_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ChannelStorage + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "CustomerManagedS3": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "^[a-zA-Z0-9.\\-_]*$", + // "type": "string" + // }, + // "KeyPrefix": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9!_.*'()/{}:-]*/$", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "Bucket", + // "RoleArn" + // ], + // "type": "object" + // }, + // "ServiceManagedS3": { + // "additionalProperties": false, + // "type": "object" + // } + // }, + // "type": "object" + // } + "channel_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomerManagedS3 + "customer_managed_s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 255), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9.\\-_]*$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: KeyPrefix + "key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9!_.*'()/{}:-]*/$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceManagedS3 + "service_managed_s3": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "channel_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RetentionPeriod + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "NumberOfDays": { + // "maximum": 2147483647, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "retention_period": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NumberOfDays + "number_of_days": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 2147483647), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoTAnalytics::Channel", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Channel").WithTerraformTypeName("awscc_iotanalytics_channel") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "bucket": "Bucket", + "channel_id": "Id", + "channel_name": "ChannelName", + "channel_storage": "ChannelStorage", + "customer_managed_s3": "CustomerManagedS3", + "key": "Key", + "key_prefix": "KeyPrefix", + "number_of_days": "NumberOfDays", + "retention_period": "RetentionPeriod", + "role_arn": "RoleArn", + "service_managed_s3": "ServiceManagedS3", + "tags": "Tags", + "unlimited": "Unlimited", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/channel_resource_gen_test.go b/internal/aws/iotanalytics/channel_resource_gen_test.go new file mode 100644 index 000000000..190c82f00 --- /dev/null +++ b/internal/aws/iotanalytics/channel_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsChannel_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Channel", "awscc_iotanalytics_channel", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIoTAnalyticsChannel_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Channel", "awscc_iotanalytics_channel", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/iotanalytics/channel_singular_data_source_gen.go b/internal/aws/iotanalytics/channel_singular_data_source_gen.go new file mode 100644 index 000000000..2eb812bd7 --- /dev/null +++ b/internal/aws/iotanalytics/channel_singular_data_source_gen.go @@ -0,0 +1,230 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_channel", channelDataSource) +} + +// channelDataSource returns the Terraform awscc_iotanalytics_channel data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Channel resource. +func channelDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ChannelName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + "channel_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ChannelStorage + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "CustomerManagedS3": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "^[a-zA-Z0-9.\\-_]*$", + // "type": "string" + // }, + // "KeyPrefix": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9!_.*'()/{}:-]*/$", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "Bucket", + // "RoleArn" + // ], + // "type": "object" + // }, + // "ServiceManagedS3": { + // "additionalProperties": false, + // "type": "object" + // } + // }, + // "type": "object" + // } + "channel_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomerManagedS3 + "customer_managed_s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KeyPrefix + "key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceManagedS3 + "service_managed_s3": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "channel_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RetentionPeriod + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "NumberOfDays": { + // "maximum": 2147483647, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "retention_period": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NumberOfDays + "number_of_days": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoTAnalytics::Channel", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Channel").WithTerraformTypeName("awscc_iotanalytics_channel") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "bucket": "Bucket", + "channel_id": "Id", + "channel_name": "ChannelName", + "channel_storage": "ChannelStorage", + "customer_managed_s3": "CustomerManagedS3", + "key": "Key", + "key_prefix": "KeyPrefix", + "number_of_days": "NumberOfDays", + "retention_period": "RetentionPeriod", + "role_arn": "RoleArn", + "service_managed_s3": "ServiceManagedS3", + "tags": "Tags", + "unlimited": "Unlimited", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/channel_singular_data_source_gen_test.go b/internal/aws/iotanalytics/channel_singular_data_source_gen_test.go new file mode 100644 index 000000000..aba23d8e0 --- /dev/null +++ b/internal/aws/iotanalytics/channel_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsChannelDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Channel", "awscc_iotanalytics_channel", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIoTAnalyticsChannelDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Channel", "awscc_iotanalytics_channel", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iotanalytics/dataset_plural_data_source_gen.go b/internal/aws/iotanalytics/dataset_plural_data_source_gen.go new file mode 100644 index 000000000..da88b4c27 --- /dev/null +++ b/internal/aws/iotanalytics/dataset_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_datasets", datasetsDataSource) +} + +// datasetsDataSource returns the Terraform awscc_iotanalytics_datasets data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Dataset resource. +func datasetsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoTAnalytics::Dataset", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Dataset").WithTerraformTypeName("awscc_iotanalytics_datasets") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/dataset_plural_data_source_gen_test.go b/internal/aws/iotanalytics/dataset_plural_data_source_gen_test.go new file mode 100644 index 000000000..8f73c7a6e --- /dev/null +++ b/internal/aws/iotanalytics/dataset_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsDatasetsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Dataset", "awscc_iotanalytics_datasets", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iotanalytics/dataset_resource_gen.go b/internal/aws/iotanalytics/dataset_resource_gen.go new file mode 100644 index 000000000..9964990d5 --- /dev/null +++ b/internal/aws/iotanalytics/dataset_resource_gen.go @@ -0,0 +1,1053 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iotanalytics_dataset", datasetResource) +} + +// datasetResource returns the Terraform awscc_iotanalytics_dataset resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoTAnalytics::Dataset resource. +func datasetResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Actions + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "ActionName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9_]+$", + // "type": "string" + // }, + // "ContainerAction": { + // "additionalProperties": false, + // "properties": { + // "ExecutionRoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // }, + // "Image": { + // "maxLength": 255, + // "type": "string" + // }, + // "ResourceConfiguration": { + // "additionalProperties": false, + // "properties": { + // "ComputeType": { + // "enum": [ + // "ACU_1", + // "ACU_2" + // ], + // "type": "string" + // }, + // "VolumeSizeInGB": { + // "maximum": 50, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "VolumeSizeInGB", + // "ComputeType" + // ], + // "type": "object" + // }, + // "Variables": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "DatasetContentVersionValue": { + // "additionalProperties": false, + // "properties": { + // "DatasetName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + // }, + // "required": [ + // "DatasetName" + // ], + // "type": "object" + // }, + // "DoubleValue": { + // "type": "number" + // }, + // "OutputFileUriValue": { + // "additionalProperties": false, + // "properties": { + // "FileName": { + // "pattern": "^[\\w\\.-]{1,255}$", + // "type": "string" + // } + // }, + // "required": [ + // "FileName" + // ], + // "type": "object" + // }, + // "StringValue": { + // "maxLength": 1024, + // "minLength": 0, + // "type": "string" + // }, + // "VariableName": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "VariableName" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + // }, + // "required": [ + // "ExecutionRoleArn", + // "Image", + // "ResourceConfiguration" + // ], + // "type": "object" + // }, + // "QueryAction": { + // "additionalProperties": false, + // "properties": { + // "Filters": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "DeltaTime": { + // "additionalProperties": false, + // "properties": { + // "OffsetSeconds": { + // "type": "integer" + // }, + // "TimeExpression": { + // "type": "string" + // } + // }, + // "required": [ + // "TimeExpression", + // "OffsetSeconds" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 1, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // }, + // "SqlQuery": { + // "type": "string" + // } + // }, + // "required": [ + // "SqlQuery" + // ], + // "type": "object" + // } + // }, + // "required": [ + // "ActionName" + // ], + // "type": "object" + // }, + // "maxItems": 1, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "actions": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ActionName + "action_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9_]+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: ContainerAction + "container_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ExecutionRoleArn + "execution_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Image + "image": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(255), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: ResourceConfiguration + "resource_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ComputeType + "compute_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "ACU_1", + "ACU_2", + ), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: VolumeSizeInGB + "volume_size_in_gb": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 50), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Variables + "variables": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatasetContentVersionValue + "dataset_content_version_value": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatasetName + "dataset_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DoubleValue + "double_value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: OutputFileUriValue + "output_file_uri_value": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FileName + "file_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^[\\w\\.-]{1,255}$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: StringValue + "string_value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 1024), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VariableName + "variable_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: QueryAction + "query_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Filters + "filters": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DeltaTime + "delta_time": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: OffsetSeconds + "offset_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: TimeExpression + "time_expression": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 1), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SqlQuery + "sql_query": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 1), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ContentDeliveryRules + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Destination": { + // "additionalProperties": false, + // "properties": { + // "IotEventsDestinationConfiguration": { + // "additionalProperties": false, + // "properties": { + // "InputName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "InputName", + // "RoleArn" + // ], + // "type": "object" + // }, + // "S3DestinationConfiguration": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "^[a-zA-Z0-9.\\-_]*$", + // "type": "string" + // }, + // "GlueConfiguration": { + // "additionalProperties": false, + // "properties": { + // "DatabaseName": { + // "maxLength": 150, + // "minLength": 1, + // "type": "string" + // }, + // "TableName": { + // "maxLength": 150, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "TableName", + // "DatabaseName" + // ], + // "type": "object" + // }, + // "Key": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9!_.*'()/{}:-]*$", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "Bucket", + // "Key", + // "RoleArn" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "EntryName": { + // "type": "string" + // } + // }, + // "required": [ + // "Destination" + // ], + // "type": "object" + // }, + // "maxItems": 20, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + "content_delivery_rules": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Destination + "destination": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: IotEventsDestinationConfiguration + "iot_events_destination_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: InputName + "input_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z][a-zA-Z0-9_]*$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: S3DestinationConfiguration + "s3_destination_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 255), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9.\\-_]*$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: GlueConfiguration + "glue_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatabaseName + "database_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 150), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: TableName + "table_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 150), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9!_.*'()/{}:-]*$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: EntryName + "entry_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 20), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DatasetName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + "dataset_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "dataset_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LateDataRules + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "RuleConfiguration": { + // "additionalProperties": false, + // "properties": { + // "DeltaTimeSessionWindowConfiguration": { + // "additionalProperties": false, + // "properties": { + // "TimeoutInMinutes": { + // "maximum": 60, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "TimeoutInMinutes" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "RuleName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9_]+$", + // "type": "string" + // } + // }, + // "required": [ + // "RuleConfiguration" + // ], + // "type": "object" + // }, + // "maxItems": 1, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "late_data_rules": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: RuleConfiguration + "rule_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DeltaTimeSessionWindowConfiguration + "delta_time_session_window_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TimeoutInMinutes + "timeout_in_minutes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 60), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: RuleName + "rule_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9_]+$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 1), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RetentionPeriod + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "NumberOfDays": { + // "maximum": 2147483647, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "retention_period": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NumberOfDays + "number_of_days": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 2147483647), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Triggers + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Schedule": { + // "additionalProperties": false, + // "properties": { + // "ScheduleExpression": { + // "type": "string" + // } + // }, + // "required": [ + // "ScheduleExpression" + // ], + // "type": "object" + // }, + // "TriggeringDataset": { + // "additionalProperties": false, + // "properties": { + // "DatasetName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + // }, + // "required": [ + // "DatasetName" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 5, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + "triggers": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Schedule + "schedule": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ScheduleExpression + "schedule_expression": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TriggeringDataset + "triggering_dataset": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatasetName + "dataset_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 5), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VersioningConfiguration + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "MaxVersions": { + // "maximum": 1000, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "versioning_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: MaxVersions + "max_versions": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 1000), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoTAnalytics::Dataset", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Dataset").WithTerraformTypeName("awscc_iotanalytics_dataset") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "action_name": "ActionName", + "actions": "Actions", + "bucket": "Bucket", + "compute_type": "ComputeType", + "container_action": "ContainerAction", + "content_delivery_rules": "ContentDeliveryRules", + "database_name": "DatabaseName", + "dataset_content_version_value": "DatasetContentVersionValue", + "dataset_id": "Id", + "dataset_name": "DatasetName", + "delta_time": "DeltaTime", + "delta_time_session_window_configuration": "DeltaTimeSessionWindowConfiguration", + "destination": "Destination", + "double_value": "DoubleValue", + "entry_name": "EntryName", + "execution_role_arn": "ExecutionRoleArn", + "file_name": "FileName", + "filters": "Filters", + "glue_configuration": "GlueConfiguration", + "image": "Image", + "input_name": "InputName", + "iot_events_destination_configuration": "IotEventsDestinationConfiguration", + "key": "Key", + "late_data_rules": "LateDataRules", + "max_versions": "MaxVersions", + "number_of_days": "NumberOfDays", + "offset_seconds": "OffsetSeconds", + "output_file_uri_value": "OutputFileUriValue", + "query_action": "QueryAction", + "resource_configuration": "ResourceConfiguration", + "retention_period": "RetentionPeriod", + "role_arn": "RoleArn", + "rule_configuration": "RuleConfiguration", + "rule_name": "RuleName", + "s3_destination_configuration": "S3DestinationConfiguration", + "schedule": "Schedule", + "schedule_expression": "ScheduleExpression", + "sql_query": "SqlQuery", + "string_value": "StringValue", + "table_name": "TableName", + "tags": "Tags", + "time_expression": "TimeExpression", + "timeout_in_minutes": "TimeoutInMinutes", + "triggering_dataset": "TriggeringDataset", + "triggers": "Triggers", + "unlimited": "Unlimited", + "value": "Value", + "variable_name": "VariableName", + "variables": "Variables", + "versioning_configuration": "VersioningConfiguration", + "volume_size_in_gb": "VolumeSizeInGB", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/dataset_resource_gen_test.go b/internal/aws/iotanalytics/dataset_resource_gen_test.go new file mode 100644 index 000000000..e882f8dc1 --- /dev/null +++ b/internal/aws/iotanalytics/dataset_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsDataset_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Dataset", "awscc_iotanalytics_dataset", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/iotanalytics/dataset_singular_data_source_gen.go b/internal/aws/iotanalytics/dataset_singular_data_source_gen.go new file mode 100644 index 000000000..1362c03e2 --- /dev/null +++ b/internal/aws/iotanalytics/dataset_singular_data_source_gen.go @@ -0,0 +1,806 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_dataset", datasetDataSource) +} + +// datasetDataSource returns the Terraform awscc_iotanalytics_dataset data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Dataset resource. +func datasetDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Actions + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "ActionName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9_]+$", + // "type": "string" + // }, + // "ContainerAction": { + // "additionalProperties": false, + // "properties": { + // "ExecutionRoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // }, + // "Image": { + // "maxLength": 255, + // "type": "string" + // }, + // "ResourceConfiguration": { + // "additionalProperties": false, + // "properties": { + // "ComputeType": { + // "enum": [ + // "ACU_1", + // "ACU_2" + // ], + // "type": "string" + // }, + // "VolumeSizeInGB": { + // "maximum": 50, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "VolumeSizeInGB", + // "ComputeType" + // ], + // "type": "object" + // }, + // "Variables": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "DatasetContentVersionValue": { + // "additionalProperties": false, + // "properties": { + // "DatasetName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + // }, + // "required": [ + // "DatasetName" + // ], + // "type": "object" + // }, + // "DoubleValue": { + // "type": "number" + // }, + // "OutputFileUriValue": { + // "additionalProperties": false, + // "properties": { + // "FileName": { + // "pattern": "^[\\w\\.-]{1,255}$", + // "type": "string" + // } + // }, + // "required": [ + // "FileName" + // ], + // "type": "object" + // }, + // "StringValue": { + // "maxLength": 1024, + // "minLength": 0, + // "type": "string" + // }, + // "VariableName": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "VariableName" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + // }, + // "required": [ + // "ExecutionRoleArn", + // "Image", + // "ResourceConfiguration" + // ], + // "type": "object" + // }, + // "QueryAction": { + // "additionalProperties": false, + // "properties": { + // "Filters": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "DeltaTime": { + // "additionalProperties": false, + // "properties": { + // "OffsetSeconds": { + // "type": "integer" + // }, + // "TimeExpression": { + // "type": "string" + // } + // }, + // "required": [ + // "TimeExpression", + // "OffsetSeconds" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 1, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // }, + // "SqlQuery": { + // "type": "string" + // } + // }, + // "required": [ + // "SqlQuery" + // ], + // "type": "object" + // } + // }, + // "required": [ + // "ActionName" + // ], + // "type": "object" + // }, + // "maxItems": 1, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "actions": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ActionName + "action_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ContainerAction + "container_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ExecutionRoleArn + "execution_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Image + "image": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceConfiguration + "resource_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ComputeType + "compute_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VolumeSizeInGB + "volume_size_in_gb": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Variables + "variables": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatasetContentVersionValue + "dataset_content_version_value": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatasetName + "dataset_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DoubleValue + "double_value": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OutputFileUriValue + "output_file_uri_value": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FileName + "file_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: StringValue + "string_value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VariableName + "variable_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: QueryAction + "query_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Filters + "filters": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DeltaTime + "delta_time": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: OffsetSeconds + "offset_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TimeExpression + "time_expression": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SqlQuery + "sql_query": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ContentDeliveryRules + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Destination": { + // "additionalProperties": false, + // "properties": { + // "IotEventsDestinationConfiguration": { + // "additionalProperties": false, + // "properties": { + // "InputName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^[a-zA-Z][a-zA-Z0-9_]*$", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "InputName", + // "RoleArn" + // ], + // "type": "object" + // }, + // "S3DestinationConfiguration": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "^[a-zA-Z0-9.\\-_]*$", + // "type": "string" + // }, + // "GlueConfiguration": { + // "additionalProperties": false, + // "properties": { + // "DatabaseName": { + // "maxLength": 150, + // "minLength": 1, + // "type": "string" + // }, + // "TableName": { + // "maxLength": 150, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "TableName", + // "DatabaseName" + // ], + // "type": "object" + // }, + // "Key": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9!_.*'()/{}:-]*$", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "Bucket", + // "Key", + // "RoleArn" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "EntryName": { + // "type": "string" + // } + // }, + // "required": [ + // "Destination" + // ], + // "type": "object" + // }, + // "maxItems": 20, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + "content_delivery_rules": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Destination + "destination": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: IotEventsDestinationConfiguration + "iot_events_destination_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: InputName + "input_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3DestinationConfiguration + "s3_destination_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: GlueConfiguration + "glue_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatabaseName + "database_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TableName + "table_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EntryName + "entry_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DatasetName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + "dataset_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "dataset_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LateDataRules + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "RuleConfiguration": { + // "additionalProperties": false, + // "properties": { + // "DeltaTimeSessionWindowConfiguration": { + // "additionalProperties": false, + // "properties": { + // "TimeoutInMinutes": { + // "maximum": 60, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "TimeoutInMinutes" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "RuleName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9_]+$", + // "type": "string" + // } + // }, + // "required": [ + // "RuleConfiguration" + // ], + // "type": "object" + // }, + // "maxItems": 1, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "late_data_rules": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: RuleConfiguration + "rule_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DeltaTimeSessionWindowConfiguration + "delta_time_session_window_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TimeoutInMinutes + "timeout_in_minutes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RuleName + "rule_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RetentionPeriod + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "NumberOfDays": { + // "maximum": 2147483647, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "retention_period": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NumberOfDays + "number_of_days": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Triggers + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Schedule": { + // "additionalProperties": false, + // "properties": { + // "ScheduleExpression": { + // "type": "string" + // } + // }, + // "required": [ + // "ScheduleExpression" + // ], + // "type": "object" + // }, + // "TriggeringDataset": { + // "additionalProperties": false, + // "properties": { + // "DatasetName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // } + // }, + // "required": [ + // "DatasetName" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 5, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + "triggers": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Schedule + "schedule": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ScheduleExpression + "schedule_expression": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TriggeringDataset + "triggering_dataset": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatasetName + "dataset_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VersioningConfiguration + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "MaxVersions": { + // "maximum": 1000, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "versioning_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: MaxVersions + "max_versions": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoTAnalytics::Dataset", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Dataset").WithTerraformTypeName("awscc_iotanalytics_dataset") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "action_name": "ActionName", + "actions": "Actions", + "bucket": "Bucket", + "compute_type": "ComputeType", + "container_action": "ContainerAction", + "content_delivery_rules": "ContentDeliveryRules", + "database_name": "DatabaseName", + "dataset_content_version_value": "DatasetContentVersionValue", + "dataset_id": "Id", + "dataset_name": "DatasetName", + "delta_time": "DeltaTime", + "delta_time_session_window_configuration": "DeltaTimeSessionWindowConfiguration", + "destination": "Destination", + "double_value": "DoubleValue", + "entry_name": "EntryName", + "execution_role_arn": "ExecutionRoleArn", + "file_name": "FileName", + "filters": "Filters", + "glue_configuration": "GlueConfiguration", + "image": "Image", + "input_name": "InputName", + "iot_events_destination_configuration": "IotEventsDestinationConfiguration", + "key": "Key", + "late_data_rules": "LateDataRules", + "max_versions": "MaxVersions", + "number_of_days": "NumberOfDays", + "offset_seconds": "OffsetSeconds", + "output_file_uri_value": "OutputFileUriValue", + "query_action": "QueryAction", + "resource_configuration": "ResourceConfiguration", + "retention_period": "RetentionPeriod", + "role_arn": "RoleArn", + "rule_configuration": "RuleConfiguration", + "rule_name": "RuleName", + "s3_destination_configuration": "S3DestinationConfiguration", + "schedule": "Schedule", + "schedule_expression": "ScheduleExpression", + "sql_query": "SqlQuery", + "string_value": "StringValue", + "table_name": "TableName", + "tags": "Tags", + "time_expression": "TimeExpression", + "timeout_in_minutes": "TimeoutInMinutes", + "triggering_dataset": "TriggeringDataset", + "triggers": "Triggers", + "unlimited": "Unlimited", + "value": "Value", + "variable_name": "VariableName", + "variables": "Variables", + "versioning_configuration": "VersioningConfiguration", + "volume_size_in_gb": "VolumeSizeInGB", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/dataset_singular_data_source_gen_test.go b/internal/aws/iotanalytics/dataset_singular_data_source_gen_test.go new file mode 100644 index 000000000..1dc862280 --- /dev/null +++ b/internal/aws/iotanalytics/dataset_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsDatasetDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Dataset", "awscc_iotanalytics_dataset", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSIoTAnalyticsDatasetDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Dataset", "awscc_iotanalytics_dataset", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iotanalytics/datastore_plural_data_source_gen.go b/internal/aws/iotanalytics/datastore_plural_data_source_gen.go new file mode 100644 index 000000000..ce60f7d5b --- /dev/null +++ b/internal/aws/iotanalytics/datastore_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_datastores", datastoresDataSource) +} + +// datastoresDataSource returns the Terraform awscc_iotanalytics_datastores data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Datastore resource. +func datastoresDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoTAnalytics::Datastore", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Datastore").WithTerraformTypeName("awscc_iotanalytics_datastores") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/datastore_plural_data_source_gen_test.go b/internal/aws/iotanalytics/datastore_plural_data_source_gen_test.go new file mode 100644 index 000000000..7dfad9cac --- /dev/null +++ b/internal/aws/iotanalytics/datastore_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsDatastoresDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Datastore", "awscc_iotanalytics_datastores", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iotanalytics/datastore_resource_gen.go b/internal/aws/iotanalytics/datastore_resource_gen.go new file mode 100644 index 000000000..4035d709f --- /dev/null +++ b/internal/aws/iotanalytics/datastore_resource_gen.go @@ -0,0 +1,632 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iotanalytics_datastore", datastoreResource) +} + +// datastoreResource returns the Terraform awscc_iotanalytics_datastore resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoTAnalytics::Datastore resource. +func datastoreResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatastoreName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // } + "datastore_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DatastorePartitions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Partitions": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Partition": { + // "additionalProperties": false, + // "properties": { + // "AttributeName": { + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // } + // }, + // "required": [ + // "AttributeName" + // ], + // "type": "object" + // }, + // "TimestampPartition": { + // "additionalProperties": false, + // "properties": { + // "AttributeName": { + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // }, + // "TimestampFormat": { + // "pattern": "[a-zA-Z0-9\\s\\[\\]_,.'/:-]*", + // "type": "string" + // } + // }, + // "required": [ + // "AttributeName" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 25, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + // }, + // "type": "object" + // } + "datastore_partitions": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Partitions + "partitions": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Partition + "partition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AttributeName + "attribute_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_]+"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TimestampPartition + "timestamp_partition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AttributeName + "attribute_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_]+"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: TimestampFormat + "timestamp_format": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9\\s\\[\\]_,.'/:-]*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 25), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DatastoreStorage + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "CustomerManagedS3": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "[a-zA-Z0-9.\\-_]*", + // "type": "string" + // }, + // "KeyPrefix": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9!_.*'()/{}:-]*/", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "Bucket", + // "RoleArn" + // ], + // "type": "object" + // }, + // "IotSiteWiseMultiLayerStorage": { + // "additionalProperties": false, + // "properties": { + // "CustomerManagedS3Storage": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "[a-zA-Z0-9.\\-_]*", + // "type": "string" + // }, + // "KeyPrefix": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9!_.*'()/{}:-]*/", + // "type": "string" + // } + // }, + // "required": [ + // "Bucket" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "ServiceManagedS3": { + // "additionalProperties": false, + // "type": "object" + // } + // }, + // "type": "object" + // } + "datastore_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomerManagedS3 + "customer_managed_s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 255), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9.\\-_]*"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: KeyPrefix + "key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9!_.*'()/{}:-]*/"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: IotSiteWiseMultiLayerStorage + "iot_site_wise_multi_layer_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomerManagedS3Storage + "customer_managed_s3_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 255), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9.\\-_]*"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: KeyPrefix + "key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9!_.*'()/{}:-]*/"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceManagedS3 + "service_managed_s3": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: FileFormatConfiguration + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "JsonConfiguration": { + // "additionalProperties": false, + // "type": "object" + // }, + // "ParquetConfiguration": { + // "additionalProperties": false, + // "properties": { + // "SchemaDefinition": { + // "additionalProperties": false, + // "properties": { + // "Columns": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Name": { + // "type": "string" + // }, + // "Type": { + // "type": "string" + // } + // }, + // "required": [ + // "Type", + // "Name" + // ], + // "type": "object" + // }, + // "maxItems": 100, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "file_format_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: JsonConfiguration + "json_configuration": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ParquetConfiguration + "parquet_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SchemaDefinition + "schema_definition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Columns + "columns": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Type + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 100), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "datastore_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RetentionPeriod + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "NumberOfDays": { + // "maximum": 2147483647, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "retention_period": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NumberOfDays + "number_of_days": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 2147483647), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoTAnalytics::Datastore", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Datastore").WithTerraformTypeName("awscc_iotanalytics_datastore") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "attribute_name": "AttributeName", + "bucket": "Bucket", + "columns": "Columns", + "customer_managed_s3": "CustomerManagedS3", + "customer_managed_s3_storage": "CustomerManagedS3Storage", + "datastore_id": "Id", + "datastore_name": "DatastoreName", + "datastore_partitions": "DatastorePartitions", + "datastore_storage": "DatastoreStorage", + "file_format_configuration": "FileFormatConfiguration", + "iot_site_wise_multi_layer_storage": "IotSiteWiseMultiLayerStorage", + "json_configuration": "JsonConfiguration", + "key": "Key", + "key_prefix": "KeyPrefix", + "name": "Name", + "number_of_days": "NumberOfDays", + "parquet_configuration": "ParquetConfiguration", + "partition": "Partition", + "partitions": "Partitions", + "retention_period": "RetentionPeriod", + "role_arn": "RoleArn", + "schema_definition": "SchemaDefinition", + "service_managed_s3": "ServiceManagedS3", + "tags": "Tags", + "timestamp_format": "TimestampFormat", + "timestamp_partition": "TimestampPartition", + "type": "Type", + "unlimited": "Unlimited", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/datastore_resource_gen_test.go b/internal/aws/iotanalytics/datastore_resource_gen_test.go new file mode 100644 index 000000000..27a8ddd8b --- /dev/null +++ b/internal/aws/iotanalytics/datastore_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsDatastore_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Datastore", "awscc_iotanalytics_datastore", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIoTAnalyticsDatastore_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Datastore", "awscc_iotanalytics_datastore", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/iotanalytics/datastore_singular_data_source_gen.go b/internal/aws/iotanalytics/datastore_singular_data_source_gen.go new file mode 100644 index 000000000..891741cbc --- /dev/null +++ b/internal/aws/iotanalytics/datastore_singular_data_source_gen.go @@ -0,0 +1,467 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_datastore", datastoreDataSource) +} + +// datastoreDataSource returns the Terraform awscc_iotanalytics_datastore data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Datastore resource. +func datastoreDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatastoreName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // } + "datastore_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DatastorePartitions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Partitions": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Partition": { + // "additionalProperties": false, + // "properties": { + // "AttributeName": { + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // } + // }, + // "required": [ + // "AttributeName" + // ], + // "type": "object" + // }, + // "TimestampPartition": { + // "additionalProperties": false, + // "properties": { + // "AttributeName": { + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // }, + // "TimestampFormat": { + // "pattern": "[a-zA-Z0-9\\s\\[\\]_,.'/:-]*", + // "type": "string" + // } + // }, + // "required": [ + // "AttributeName" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 25, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + // }, + // "type": "object" + // } + "datastore_partitions": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Partitions + "partitions": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Partition + "partition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AttributeName + "attribute_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TimestampPartition + "timestamp_partition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AttributeName + "attribute_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TimestampFormat + "timestamp_format": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DatastoreStorage + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "CustomerManagedS3": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "[a-zA-Z0-9.\\-_]*", + // "type": "string" + // }, + // "KeyPrefix": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9!_.*'()/{}:-]*/", + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // } + // }, + // "required": [ + // "Bucket", + // "RoleArn" + // ], + // "type": "object" + // }, + // "IotSiteWiseMultiLayerStorage": { + // "additionalProperties": false, + // "properties": { + // "CustomerManagedS3Storage": { + // "additionalProperties": false, + // "properties": { + // "Bucket": { + // "maxLength": 255, + // "minLength": 3, + // "pattern": "[a-zA-Z0-9.\\-_]*", + // "type": "string" + // }, + // "KeyPrefix": { + // "maxLength": 255, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9!_.*'()/{}:-]*/", + // "type": "string" + // } + // }, + // "required": [ + // "Bucket" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "ServiceManagedS3": { + // "additionalProperties": false, + // "type": "object" + // } + // }, + // "type": "object" + // } + "datastore_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomerManagedS3 + "customer_managed_s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KeyPrefix + "key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: IotSiteWiseMultiLayerStorage + "iot_site_wise_multi_layer_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomerManagedS3Storage + "customer_managed_s3_storage": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Bucket + "bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KeyPrefix + "key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceManagedS3 + "service_managed_s3": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: FileFormatConfiguration + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "JsonConfiguration": { + // "additionalProperties": false, + // "type": "object" + // }, + // "ParquetConfiguration": { + // "additionalProperties": false, + // "properties": { + // "SchemaDefinition": { + // "additionalProperties": false, + // "properties": { + // "Columns": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Name": { + // "type": "string" + // }, + // "Type": { + // "type": "string" + // } + // }, + // "required": [ + // "Type", + // "Name" + // ], + // "type": "object" + // }, + // "maxItems": 100, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "file_format_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: JsonConfiguration + "json_configuration": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ParquetConfiguration + "parquet_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SchemaDefinition + "schema_definition": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Columns + "columns": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Type + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "datastore_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RetentionPeriod + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "NumberOfDays": { + // "maximum": 2147483647, + // "minimum": 1, + // "type": "integer" + // }, + // "Unlimited": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "retention_period": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NumberOfDays + "number_of_days": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Unlimited + "unlimited": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoTAnalytics::Datastore", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Datastore").WithTerraformTypeName("awscc_iotanalytics_datastore") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "attribute_name": "AttributeName", + "bucket": "Bucket", + "columns": "Columns", + "customer_managed_s3": "CustomerManagedS3", + "customer_managed_s3_storage": "CustomerManagedS3Storage", + "datastore_id": "Id", + "datastore_name": "DatastoreName", + "datastore_partitions": "DatastorePartitions", + "datastore_storage": "DatastoreStorage", + "file_format_configuration": "FileFormatConfiguration", + "iot_site_wise_multi_layer_storage": "IotSiteWiseMultiLayerStorage", + "json_configuration": "JsonConfiguration", + "key": "Key", + "key_prefix": "KeyPrefix", + "name": "Name", + "number_of_days": "NumberOfDays", + "parquet_configuration": "ParquetConfiguration", + "partition": "Partition", + "partitions": "Partitions", + "retention_period": "RetentionPeriod", + "role_arn": "RoleArn", + "schema_definition": "SchemaDefinition", + "service_managed_s3": "ServiceManagedS3", + "tags": "Tags", + "timestamp_format": "TimestampFormat", + "timestamp_partition": "TimestampPartition", + "type": "Type", + "unlimited": "Unlimited", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/datastore_singular_data_source_gen_test.go b/internal/aws/iotanalytics/datastore_singular_data_source_gen_test.go new file mode 100644 index 000000000..67bd2abe3 --- /dev/null +++ b/internal/aws/iotanalytics/datastore_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsDatastoreDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Datastore", "awscc_iotanalytics_datastore", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIoTAnalyticsDatastoreDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Datastore", "awscc_iotanalytics_datastore", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iotanalytics/pipeline_plural_data_source_gen.go b/internal/aws/iotanalytics/pipeline_plural_data_source_gen.go new file mode 100644 index 000000000..0736c79e8 --- /dev/null +++ b/internal/aws/iotanalytics/pipeline_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_pipelines", pipelinesDataSource) +} + +// pipelinesDataSource returns the Terraform awscc_iotanalytics_pipelines data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Pipeline resource. +func pipelinesDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IoTAnalytics::Pipeline", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Pipeline").WithTerraformTypeName("awscc_iotanalytics_pipelines") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/pipeline_plural_data_source_gen_test.go b/internal/aws/iotanalytics/pipeline_plural_data_source_gen_test.go new file mode 100644 index 000000000..862a3ed63 --- /dev/null +++ b/internal/aws/iotanalytics/pipeline_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsPipelinesDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Pipeline", "awscc_iotanalytics_pipelines", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/iotanalytics/pipeline_resource_gen.go b/internal/aws/iotanalytics/pipeline_resource_gen.go new file mode 100644 index 000000000..0c6c29a47 --- /dev/null +++ b/internal/aws/iotanalytics/pipeline_resource_gen.go @@ -0,0 +1,918 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_iotanalytics_pipeline", pipelineResource) +} + +// pipelineResource returns the Terraform awscc_iotanalytics_pipeline resource. +// This Terraform resource corresponds to the CloudFormation AWS::IoTAnalytics::Pipeline resource. +func pipelineResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "pipeline_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: PipelineActivities + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "AddAttributes": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attributes", + // "Name" + // ], + // "type": "object" + // }, + // "Channel": { + // "additionalProperties": false, + // "properties": { + // "ChannelName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "ChannelName", + // "Name" + // ], + // "type": "object" + // }, + // "Datastore": { + // "additionalProperties": false, + // "properties": { + // "DatastoreName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "DatastoreName", + // "Name" + // ], + // "type": "object" + // }, + // "DeviceRegistryEnrich": { + // "additionalProperties": false, + // "properties": { + // "Attribute": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // }, + // "ThingName": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attribute", + // "ThingName", + // "RoleArn", + // "Name" + // ], + // "type": "object" + // }, + // "DeviceShadowEnrich": { + // "additionalProperties": false, + // "properties": { + // "Attribute": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // }, + // "ThingName": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attribute", + // "ThingName", + // "RoleArn", + // "Name" + // ], + // "type": "object" + // }, + // "Filter": { + // "additionalProperties": false, + // "properties": { + // "Filter": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Filter", + // "Name" + // ], + // "type": "object" + // }, + // "Lambda": { + // "additionalProperties": false, + // "properties": { + // "BatchSize": { + // "maximum": 1000, + // "minimum": 1, + // "type": "integer" + // }, + // "LambdaName": { + // "maxLength": 64, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_-]+", + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "LambdaName", + // "Name", + // "BatchSize" + // ], + // "type": "object" + // }, + // "Math": { + // "additionalProperties": false, + // "properties": { + // "Attribute": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Math": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attribute", + // "Math", + // "Name" + // ], + // "type": "object" + // }, + // "RemoveAttributes": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "insertionOrder": false, + // "items": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attributes", + // "Name" + // ], + // "type": "object" + // }, + // "SelectAttributes": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "insertionOrder": false, + // "items": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Name", + // "Attributes" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 25, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "pipeline_activities": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AddAttributes + "add_attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Channel + "channel": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ChannelName + "channel_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_]+"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Datastore + "datastore": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatastoreName + "datastore_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_]+"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeviceRegistryEnrich + "device_registry_enrich": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attribute + "attribute": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingName + "thing_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeviceShadowEnrich + "device_shadow_enrich": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attribute + "attribute": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: ThingName + "thing_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Filter + "filter": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Filter + "filter": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Lambda + "lambda": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BatchSize + "batch_size": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 1000), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: LambdaName + "lambda_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 64), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_-]+"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Math + "math": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attribute + "attribute": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Math + "math": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RemoveAttributes + "remove_attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 50), + listvalidator.ValueStringsAre( + stringvalidator.LengthBetween(1, 256), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SelectAttributes + "select_attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 50), + listvalidator.ValueStringsAre( + stringvalidator.LengthBetween(1, 256), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 25), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: PipelineName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // } + "pipeline_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9_]+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::IoTAnalytics::Pipeline", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Pipeline").WithTerraformTypeName("awscc_iotanalytics_pipeline") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "add_attributes": "AddAttributes", + "attribute": "Attribute", + "attributes": "Attributes", + "batch_size": "BatchSize", + "channel": "Channel", + "channel_name": "ChannelName", + "datastore": "Datastore", + "datastore_name": "DatastoreName", + "device_registry_enrich": "DeviceRegistryEnrich", + "device_shadow_enrich": "DeviceShadowEnrich", + "filter": "Filter", + "key": "Key", + "lambda": "Lambda", + "lambda_name": "LambdaName", + "math": "Math", + "name": "Name", + "next": "Next", + "pipeline_activities": "PipelineActivities", + "pipeline_id": "Id", + "pipeline_name": "PipelineName", + "remove_attributes": "RemoveAttributes", + "role_arn": "RoleArn", + "select_attributes": "SelectAttributes", + "tags": "Tags", + "thing_name": "ThingName", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/pipeline_resource_gen_test.go b/internal/aws/iotanalytics/pipeline_resource_gen_test.go new file mode 100644 index 000000000..26776a536 --- /dev/null +++ b/internal/aws/iotanalytics/pipeline_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsPipeline_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Pipeline", "awscc_iotanalytics_pipeline", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/iotanalytics/pipeline_singular_data_source_gen.go b/internal/aws/iotanalytics/pipeline_singular_data_source_gen.go new file mode 100644 index 000000000..64400debf --- /dev/null +++ b/internal/aws/iotanalytics/pipeline_singular_data_source_gen.go @@ -0,0 +1,675 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_iotanalytics_pipeline", pipelineDataSource) +} + +// pipelineDataSource returns the Terraform awscc_iotanalytics_pipeline data source. +// This Terraform data source corresponds to the CloudFormation AWS::IoTAnalytics::Pipeline resource. +func pipelineDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "pipeline_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PipelineActivities + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "AddAttributes": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attributes", + // "Name" + // ], + // "type": "object" + // }, + // "Channel": { + // "additionalProperties": false, + // "properties": { + // "ChannelName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "ChannelName", + // "Name" + // ], + // "type": "object" + // }, + // "Datastore": { + // "additionalProperties": false, + // "properties": { + // "DatastoreName": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "DatastoreName", + // "Name" + // ], + // "type": "object" + // }, + // "DeviceRegistryEnrich": { + // "additionalProperties": false, + // "properties": { + // "Attribute": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // }, + // "ThingName": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attribute", + // "ThingName", + // "RoleArn", + // "Name" + // ], + // "type": "object" + // }, + // "DeviceShadowEnrich": { + // "additionalProperties": false, + // "properties": { + // "Attribute": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "RoleArn": { + // "maxLength": 2048, + // "minLength": 20, + // "type": "string" + // }, + // "ThingName": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attribute", + // "ThingName", + // "RoleArn", + // "Name" + // ], + // "type": "object" + // }, + // "Filter": { + // "additionalProperties": false, + // "properties": { + // "Filter": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Filter", + // "Name" + // ], + // "type": "object" + // }, + // "Lambda": { + // "additionalProperties": false, + // "properties": { + // "BatchSize": { + // "maximum": 1000, + // "minimum": 1, + // "type": "integer" + // }, + // "LambdaName": { + // "maxLength": 64, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_-]+", + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "LambdaName", + // "Name", + // "BatchSize" + // ], + // "type": "object" + // }, + // "Math": { + // "additionalProperties": false, + // "properties": { + // "Attribute": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Math": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attribute", + // "Math", + // "Name" + // ], + // "type": "object" + // }, + // "RemoveAttributes": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "insertionOrder": false, + // "items": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Attributes", + // "Name" + // ], + // "type": "object" + // }, + // "SelectAttributes": { + // "additionalProperties": false, + // "properties": { + // "Attributes": { + // "insertionOrder": false, + // "items": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // }, + // "Name": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Next": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Name", + // "Attributes" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // }, + // "maxItems": 25, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "pipeline_activities": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AddAttributes + "add_attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Channel + "channel": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ChannelName + "channel_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Datastore + "datastore": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DatastoreName + "datastore_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeviceRegistryEnrich + "device_registry_enrich": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attribute + "attribute": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingName + "thing_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeviceShadowEnrich + "device_shadow_enrich": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attribute + "attribute": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ThingName + "thing_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Filter + "filter": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Filter + "filter": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Lambda + "lambda": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BatchSize + "batch_size": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LambdaName + "lambda_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Math + "math": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attribute + "attribute": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Math + "math": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RemoveAttributes + "remove_attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SelectAttributes + "select_attributes": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Attributes + "attributes": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Next + "next": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PipelineName + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9_]+", + // "type": "string" + // } + "pipeline_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 1, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IoTAnalytics::Pipeline", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IoTAnalytics::Pipeline").WithTerraformTypeName("awscc_iotanalytics_pipeline") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "add_attributes": "AddAttributes", + "attribute": "Attribute", + "attributes": "Attributes", + "batch_size": "BatchSize", + "channel": "Channel", + "channel_name": "ChannelName", + "datastore": "Datastore", + "datastore_name": "DatastoreName", + "device_registry_enrich": "DeviceRegistryEnrich", + "device_shadow_enrich": "DeviceShadowEnrich", + "filter": "Filter", + "key": "Key", + "lambda": "Lambda", + "lambda_name": "LambdaName", + "math": "Math", + "name": "Name", + "next": "Next", + "pipeline_activities": "PipelineActivities", + "pipeline_id": "Id", + "pipeline_name": "PipelineName", + "remove_attributes": "RemoveAttributes", + "role_arn": "RoleArn", + "select_attributes": "SelectAttributes", + "tags": "Tags", + "thing_name": "ThingName", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/iotanalytics/pipeline_singular_data_source_gen_test.go b/internal/aws/iotanalytics/pipeline_singular_data_source_gen_test.go new file mode 100644 index 000000000..11a5b14ba --- /dev/null +++ b/internal/aws/iotanalytics/pipeline_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package iotanalytics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIoTAnalyticsPipelineDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Pipeline", "awscc_iotanalytics_pipeline", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSIoTAnalyticsPipelineDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IoTAnalytics::Pipeline", "awscc_iotanalytics_pipeline", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/iotcoredeviceadvisor/suite_definition_resource_gen.go b/internal/aws/iotcoredeviceadvisor/suite_definition_resource_gen.go index 7b1869afa..57ae1a26d 100644 --- a/internal/aws/iotcoredeviceadvisor/suite_definition_resource_gen.go +++ b/internal/aws/iotcoredeviceadvisor/suite_definition_resource_gen.go @@ -277,6 +277,7 @@ func suiteDefinitionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -295,7 +296,6 @@ func suiteDefinitionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTCoreDeviceAdvisor::SuiteDefinition").WithTerraformTypeName("awscc_iotcoredeviceadvisor_suite_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_arn": "CertificateArn", "device_permission_role_arn": "DevicePermissionRoleArn", diff --git a/internal/aws/iotevents/alarm_model_resource_gen.go b/internal/aws/iotevents/alarm_model_resource_gen.go index 82e0f734f..96954cb25 100644 --- a/internal/aws/iotevents/alarm_model_resource_gen.go +++ b/internal/aws/iotevents/alarm_model_resource_gen.go @@ -1367,6 +1367,7 @@ func alarmModelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1385,7 +1386,6 @@ func alarmModelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTEvents::AlarmModel").WithTerraformTypeName("awscc_iotevents_alarm_model") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acknowledge_flow": "AcknowledgeFlow", "alarm_actions": "AlarmActions", diff --git a/internal/aws/iotevents/detector_model_resource_gen.go b/internal/aws/iotevents/detector_model_resource_gen.go index cc711414c..fca5366ac 100644 --- a/internal/aws/iotevents/detector_model_resource_gen.go +++ b/internal/aws/iotevents/detector_model_resource_gen.go @@ -5250,6 +5250,7 @@ func detectorModelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -5268,7 +5269,6 @@ func detectorModelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTEvents::DetectorModel").WithTerraformTypeName("awscc_iotevents_detector_model") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "asset_id": "AssetId", diff --git a/internal/aws/iotevents/input_resource_gen.go b/internal/aws/iotevents/input_resource_gen.go index 1f09626be..a6afde997 100644 --- a/internal/aws/iotevents/input_resource_gen.go +++ b/internal/aws/iotevents/input_resource_gen.go @@ -190,6 +190,7 @@ func inputResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -208,7 +209,6 @@ func inputResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTEvents::Input").WithTerraformTypeName("awscc_iotevents_input") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attributes": "Attributes", "input_definition": "InputDefinition", diff --git a/internal/aws/iotfleethub/application_resource_gen.go b/internal/aws/iotfleethub/application_resource_gen.go index c0fdc2a5e..65452f3c5 100644 --- a/internal/aws/iotfleethub/application_resource_gen.go +++ b/internal/aws/iotfleethub/application_resource_gen.go @@ -273,6 +273,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -291,7 +292,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTFleetHub::Application").WithTerraformTypeName("awscc_iotfleethub_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_arn": "ApplicationArn", "application_creation_date": "ApplicationCreationDate", diff --git a/internal/aws/iotfleetwise/campaign_resource_gen.go b/internal/aws/iotfleetwise/campaign_resource_gen.go index 28c055525..14fc72bf8 100644 --- a/internal/aws/iotfleetwise/campaign_resource_gen.go +++ b/internal/aws/iotfleetwise/campaign_resource_gen.go @@ -806,6 +806,7 @@ func campaignResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -824,7 +825,6 @@ func campaignResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTFleetWise::Campaign").WithTerraformTypeName("awscc_iotfleetwise_campaign") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "arn": "Arn", diff --git a/internal/aws/iotfleetwise/fleet_resource_gen.go b/internal/aws/iotfleetwise/fleet_resource_gen.go index 067b71e38..11862c3ce 100644 --- a/internal/aws/iotfleetwise/fleet_resource_gen.go +++ b/internal/aws/iotfleetwise/fleet_resource_gen.go @@ -84,7 +84,7 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[a-zA-Z0-9:_-]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "fleet_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Required: true, Validators: []validator.String{ /*START VALIDATORS*/ stringvalidator.LengthBetween(1, 100), @@ -180,6 +180,15 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Definition of AWS::IoTFleetWise::Fleet Resource Type", Version: 1, @@ -190,12 +199,11 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTFleetWise::Fleet").WithTerraformTypeName("awscc_iotfleetwise_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", "description": "Description", - "id": "Id", + "fleet_id": "Id", "key": "Key", "last_modification_time": "LastModificationTime", "signal_catalog_arn": "SignalCatalogArn", diff --git a/internal/aws/iotfleetwise/fleet_singular_data_source_gen.go b/internal/aws/iotfleetwise/fleet_singular_data_source_gen.go index ed19fedfc..111c833ae 100644 --- a/internal/aws/iotfleetwise/fleet_singular_data_source_gen.go +++ b/internal/aws/iotfleetwise/fleet_singular_data_source_gen.go @@ -64,7 +64,7 @@ func fleetDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[a-zA-Z0-9:_-]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "fleet_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: LastModificationTime @@ -152,7 +152,7 @@ func fleetDataSource(ctx context.Context) (datasource.DataSource, error) { "arn": "Arn", "creation_time": "CreationTime", "description": "Description", - "id": "Id", + "fleet_id": "Id", "key": "Key", "last_modification_time": "LastModificationTime", "signal_catalog_arn": "SignalCatalogArn", diff --git a/internal/aws/iotfleetwise/model_manifest_resource_gen.go b/internal/aws/iotfleetwise/model_manifest_resource_gen.go index 433d67a87..6313aee69 100644 --- a/internal/aws/iotfleetwise/model_manifest_resource_gen.go +++ b/internal/aws/iotfleetwise/model_manifest_resource_gen.go @@ -226,6 +226,7 @@ func modelManifestResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -244,7 +245,6 @@ func modelManifestResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTFleetWise::ModelManifest").WithTerraformTypeName("awscc_iotfleetwise_model_manifest") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", diff --git a/internal/aws/iotfleetwise/signal_catalog_resource_gen.go b/internal/aws/iotfleetwise/signal_catalog_resource_gen.go index 6a11df161..d0fdadf0c 100644 --- a/internal/aws/iotfleetwise/signal_catalog_resource_gen.go +++ b/internal/aws/iotfleetwise/signal_catalog_resource_gen.go @@ -843,6 +843,7 @@ func signalCatalogResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -861,7 +862,6 @@ func signalCatalogResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTFleetWise::SignalCatalog").WithTerraformTypeName("awscc_iotfleetwise_signal_catalog") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actuator": "Actuator", "allowed_values": "AllowedValues", diff --git a/internal/aws/iotfleetwise/vehicle_resource_gen.go b/internal/aws/iotfleetwise/vehicle_resource_gen.go index c9693b72c..37d07f69b 100644 --- a/internal/aws/iotfleetwise/vehicle_resource_gen.go +++ b/internal/aws/iotfleetwise/vehicle_resource_gen.go @@ -214,6 +214,7 @@ func vehicleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -232,7 +233,6 @@ func vehicleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTFleetWise::Vehicle").WithTerraformTypeName("awscc_iotfleetwise_vehicle") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "association_behavior": "AssociationBehavior", diff --git a/internal/aws/iotsitewise/access_policy_resource_gen.go b/internal/aws/iotsitewise/access_policy_resource_gen.go index 0aa7c0ed7..643445d52 100644 --- a/internal/aws/iotsitewise/access_policy_resource_gen.go +++ b/internal/aws/iotsitewise/access_policy_resource_gen.go @@ -253,6 +253,7 @@ func accessPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -271,7 +272,6 @@ func accessPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::AccessPolicy").WithTerraformTypeName("awscc_iotsitewise_access_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_policy_arn": "AccessPolicyArn", "access_policy_id": "AccessPolicyId", diff --git a/internal/aws/iotsitewise/asset_model_resource_gen.go b/internal/aws/iotsitewise/asset_model_resource_gen.go index fbdc04606..6520dfdaa 100644 --- a/internal/aws/iotsitewise/asset_model_resource_gen.go +++ b/internal/aws/iotsitewise/asset_model_resource_gen.go @@ -1919,6 +1919,7 @@ func assetModelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1937,7 +1938,6 @@ func assetModelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::AssetModel").WithTerraformTypeName("awscc_iotsitewise_asset_model") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "asset_model_arn": "AssetModelArn", "asset_model_composite_models": "AssetModelCompositeModels", diff --git a/internal/aws/iotsitewise/asset_resource_gen.go b/internal/aws/iotsitewise/asset_resource_gen.go index 564144d9b..81b1f1916 100644 --- a/internal/aws/iotsitewise/asset_resource_gen.go +++ b/internal/aws/iotsitewise/asset_resource_gen.go @@ -397,6 +397,7 @@ func assetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -415,7 +416,6 @@ func assetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::Asset").WithTerraformTypeName("awscc_iotsitewise_asset") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias": "Alias", "asset_arn": "AssetArn", diff --git a/internal/aws/iotsitewise/dashboard_resource_gen.go b/internal/aws/iotsitewise/dashboard_resource_gen.go index cee6cd592..a9a7c6e6b 100644 --- a/internal/aws/iotsitewise/dashboard_resource_gen.go +++ b/internal/aws/iotsitewise/dashboard_resource_gen.go @@ -151,6 +151,7 @@ func dashboardResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -169,7 +170,6 @@ func dashboardResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::Dashboard").WithTerraformTypeName("awscc_iotsitewise_dashboard") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dashboard_arn": "DashboardArn", "dashboard_definition": "DashboardDefinition", diff --git a/internal/aws/iotsitewise/gateway_resource_gen.go b/internal/aws/iotsitewise/gateway_resource_gen.go index 65dc0d1db..8bc199bba 100644 --- a/internal/aws/iotsitewise/gateway_resource_gen.go +++ b/internal/aws/iotsitewise/gateway_resource_gen.go @@ -249,6 +249,7 @@ func gatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -267,7 +268,6 @@ func gatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::Gateway").WithTerraformTypeName("awscc_iotsitewise_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "capability_configuration": "CapabilityConfiguration", "capability_namespace": "CapabilityNamespace", diff --git a/internal/aws/iotsitewise/portal_resource_gen.go b/internal/aws/iotsitewise/portal_resource_gen.go index 2b85c0c8b..2f2fdb64b 100644 --- a/internal/aws/iotsitewise/portal_resource_gen.go +++ b/internal/aws/iotsitewise/portal_resource_gen.go @@ -257,6 +257,7 @@ func portalResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -275,7 +276,6 @@ func portalResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::Portal").WithTerraformTypeName("awscc_iotsitewise_portal") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarm_role_arn": "AlarmRoleArn", "alarms": "Alarms", diff --git a/internal/aws/iotsitewise/project_resource_gen.go b/internal/aws/iotsitewise/project_resource_gen.go index 67b631946..0c7a1b77b 100644 --- a/internal/aws/iotsitewise/project_resource_gen.go +++ b/internal/aws/iotsitewise/project_resource_gen.go @@ -169,6 +169,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -187,7 +188,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTSiteWise::Project").WithTerraformTypeName("awscc_iotsitewise_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "asset_ids": "AssetIds", "key": "Key", diff --git a/internal/aws/iottwinmaker/scene_resource_gen.go b/internal/aws/iottwinmaker/scene_resource_gen.go index 13817a5ec..d2b7c2b9e 100644 --- a/internal/aws/iottwinmaker/scene_resource_gen.go +++ b/internal/aws/iottwinmaker/scene_resource_gen.go @@ -274,6 +274,7 @@ func sceneResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -292,7 +293,6 @@ func sceneResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTTwinMaker::Scene").WithTerraformTypeName("awscc_iottwinmaker_scene") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "capabilities": "Capabilities", diff --git a/internal/aws/iottwinmaker/sync_job_resource_gen.go b/internal/aws/iottwinmaker/sync_job_resource_gen.go index 71af764a7..28c2730c6 100644 --- a/internal/aws/iottwinmaker/sync_job_resource_gen.go +++ b/internal/aws/iottwinmaker/sync_job_resource_gen.go @@ -185,6 +185,7 @@ func syncJobResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -203,7 +204,6 @@ func syncJobResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTTwinMaker::SyncJob").WithTerraformTypeName("awscc_iottwinmaker_sync_job") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_date_time": "CreationDateTime", diff --git a/internal/aws/iottwinmaker/workspace_resource_gen.go b/internal/aws/iottwinmaker/workspace_resource_gen.go index 85c303218..b0b36fdd3 100644 --- a/internal/aws/iottwinmaker/workspace_resource_gen.go +++ b/internal/aws/iottwinmaker/workspace_resource_gen.go @@ -176,6 +176,7 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -194,7 +195,6 @@ func workspaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTTwinMaker::Workspace").WithTerraformTypeName("awscc_iottwinmaker_workspace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_date_time": "CreationDateTime", diff --git a/internal/aws/iotwireless/destination_resource_gen.go b/internal/aws/iotwireless/destination_resource_gen.go index 1f1596dc5..0b25b189b 100644 --- a/internal/aws/iotwireless/destination_resource_gen.go +++ b/internal/aws/iotwireless/destination_resource_gen.go @@ -201,6 +201,7 @@ func destinationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -219,7 +220,6 @@ func destinationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::Destination").WithTerraformTypeName("awscc_iotwireless_destination") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/iotwireless/device_profile_resource_gen.go b/internal/aws/iotwireless/device_profile_resource_gen.go index 525b1599f..5b8c6aca7 100644 --- a/internal/aws/iotwireless/device_profile_resource_gen.go +++ b/internal/aws/iotwireless/device_profile_resource_gen.go @@ -57,7 +57,7 @@ func deviceProfileResource(ctx context.Context) (resource.Resource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "device_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Service profile Id. Returned after successful create.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -457,6 +457,15 @@ func deviceProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Device Profile's resource schema demonstrating some basic constructs and validation rules.", Version: 1, @@ -467,13 +476,12 @@ func deviceProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::DeviceProfile").WithTerraformTypeName("awscc_iotwireless_device_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "class_b_timeout": "ClassBTimeout", "class_c_timeout": "ClassCTimeout", + "device_profile_id": "Id", "factory_preset_freqs_list": "FactoryPresetFreqsList", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "mac_version": "MacVersion", diff --git a/internal/aws/iotwireless/device_profile_singular_data_source_gen.go b/internal/aws/iotwireless/device_profile_singular_data_source_gen.go index fcefde692..a4215b704 100644 --- a/internal/aws/iotwireless/device_profile_singular_data_source_gen.go +++ b/internal/aws/iotwireless/device_profile_singular_data_source_gen.go @@ -42,7 +42,7 @@ func deviceProfileDataSource(ctx context.Context) (datasource.DataSource, error) // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "device_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Service profile Id. Returned after successful create.", Computed: true, }, /*END ATTRIBUTE*/ @@ -301,8 +301,8 @@ func deviceProfileDataSource(ctx context.Context) (datasource.DataSource, error) "arn": "Arn", "class_b_timeout": "ClassBTimeout", "class_c_timeout": "ClassCTimeout", + "device_profile_id": "Id", "factory_preset_freqs_list": "FactoryPresetFreqsList", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "mac_version": "MacVersion", diff --git a/internal/aws/iotwireless/fuota_task_resource_gen.go b/internal/aws/iotwireless/fuota_task_resource_gen.go index 39d5ccf6a..b64a48418 100644 --- a/internal/aws/iotwireless/fuota_task_resource_gen.go +++ b/internal/aws/iotwireless/fuota_task_resource_gen.go @@ -191,7 +191,7 @@ func fuotaTaskResource(ctx context.Context) (resource.Resource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "fuota_task_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "FUOTA task id. Returned after successful create.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -328,6 +328,15 @@ func fuotaTaskResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Create and manage FUOTA tasks.", Version: 1, @@ -338,7 +347,6 @@ func fuotaTaskResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::FuotaTask").WithTerraformTypeName("awscc_iotwireless_fuota_task") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "associate_multicast_group": "AssociateMulticastGroup", @@ -348,8 +356,8 @@ func fuotaTaskResource(ctx context.Context) (resource.Resource, error) { "disassociate_wireless_device": "DisassociateWirelessDevice", "firmware_update_image": "FirmwareUpdateImage", "firmware_update_role": "FirmwareUpdateRole", + "fuota_task_id": "Id", "fuota_task_status": "FuotaTaskStatus", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "name": "Name", diff --git a/internal/aws/iotwireless/fuota_task_singular_data_source_gen.go b/internal/aws/iotwireless/fuota_task_singular_data_source_gen.go index f46e23c23..14952a302 100644 --- a/internal/aws/iotwireless/fuota_task_singular_data_source_gen.go +++ b/internal/aws/iotwireless/fuota_task_singular_data_source_gen.go @@ -138,7 +138,7 @@ func fuotaTaskDataSource(ctx context.Context) (datasource.DataSource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "fuota_task_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "FUOTA task id. Returned after successful create.", Computed: true, }, /*END ATTRIBUTE*/ @@ -261,8 +261,8 @@ func fuotaTaskDataSource(ctx context.Context) (datasource.DataSource, error) { "disassociate_wireless_device": "DisassociateWirelessDevice", "firmware_update_image": "FirmwareUpdateImage", "firmware_update_role": "FirmwareUpdateRole", + "fuota_task_id": "Id", "fuota_task_status": "FuotaTaskStatus", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "name": "Name", diff --git a/internal/aws/iotwireless/multicast_group_resource_gen.go b/internal/aws/iotwireless/multicast_group_resource_gen.go index c5a784eb4..22563884f 100644 --- a/internal/aws/iotwireless/multicast_group_resource_gen.go +++ b/internal/aws/iotwireless/multicast_group_resource_gen.go @@ -108,7 +108,7 @@ func multicastGroupResource(ctx context.Context) (resource.Resource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "multicast_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Multicast group id. Returned after successful create.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -285,6 +285,15 @@ func multicastGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Create and manage Multicast groups.", Version: 1, @@ -295,16 +304,15 @@ func multicastGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::MulticastGroup").WithTerraformTypeName("awscc_iotwireless_multicast_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "associate_wireless_device": "AssociateWirelessDevice", "description": "Description", "disassociate_wireless_device": "DisassociateWirelessDevice", "dl_class": "DlClass", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", + "multicast_group_id": "Id", "name": "Name", "number_of_devices_in_group": "NumberOfDevicesInGroup", "number_of_devices_requested": "NumberOfDevicesRequested", diff --git a/internal/aws/iotwireless/multicast_group_singular_data_source_gen.go b/internal/aws/iotwireless/multicast_group_singular_data_source_gen.go index f4d4dbc1d..572830f47 100644 --- a/internal/aws/iotwireless/multicast_group_singular_data_source_gen.go +++ b/internal/aws/iotwireless/multicast_group_singular_data_source_gen.go @@ -77,7 +77,7 @@ func multicastGroupDataSource(ctx context.Context) (datasource.DataSource, error // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "multicast_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Multicast group id. Returned after successful create.", Computed: true, }, /*END ATTRIBUTE*/ @@ -228,9 +228,9 @@ func multicastGroupDataSource(ctx context.Context) (datasource.DataSource, error "description": "Description", "disassociate_wireless_device": "DisassociateWirelessDevice", "dl_class": "DlClass", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", + "multicast_group_id": "Id", "name": "Name", "number_of_devices_in_group": "NumberOfDevicesInGroup", "number_of_devices_requested": "NumberOfDevicesRequested", diff --git a/internal/aws/iotwireless/network_analyzer_configuration_resource_gen.go b/internal/aws/iotwireless/network_analyzer_configuration_resource_gen.go index 2c5f6f4b1..8e4239dbc 100644 --- a/internal/aws/iotwireless/network_analyzer_configuration_resource_gen.go +++ b/internal/aws/iotwireless/network_analyzer_configuration_resource_gen.go @@ -267,6 +267,7 @@ func networkAnalyzerConfigurationResource(ctx context.Context) (resource.Resourc }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -285,7 +286,6 @@ func networkAnalyzerConfigurationResource(ctx context.Context) (resource.Resourc opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::NetworkAnalyzerConfiguration").WithTerraformTypeName("awscc_iotwireless_network_analyzer_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/iotwireless/partner_account_resource_gen.go b/internal/aws/iotwireless/partner_account_resource_gen.go index f53e07c6d..c25fd618e 100644 --- a/internal/aws/iotwireless/partner_account_resource_gen.go +++ b/internal/aws/iotwireless/partner_account_resource_gen.go @@ -323,6 +323,7 @@ func partnerAccountResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -341,7 +342,6 @@ func partnerAccountResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::PartnerAccount").WithTerraformTypeName("awscc_iotwireless_partner_account") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_linked": "AccountLinked", "amazon_id": "AmazonId", diff --git a/internal/aws/iotwireless/service_profile_resource_gen.go b/internal/aws/iotwireless/service_profile_resource_gen.go index eeb5fbfc9..83fa2a86d 100644 --- a/internal/aws/iotwireless/service_profile_resource_gen.go +++ b/internal/aws/iotwireless/service_profile_resource_gen.go @@ -53,7 +53,7 @@ func serviceProfileResource(ctx context.Context) (resource.Resource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "service_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Service profile Id. Returned after successful create.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -357,6 +357,15 @@ func serviceProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "An example resource schema demonstrating some basic constructs and validation rules.", Version: 1, @@ -367,7 +376,6 @@ func serviceProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::ServiceProfile").WithTerraformTypeName("awscc_iotwireless_service_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "add_gw_metadata": "AddGwMetadata", "arn": "Arn", @@ -379,7 +387,6 @@ func serviceProfileResource(ctx context.Context) (resource.Resource, error) { "dr_max": "DrMax", "dr_min": "DrMin", "hr_allowed": "HrAllowed", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "min_gw_diversity": "MinGwDiversity", @@ -389,6 +396,7 @@ func serviceProfileResource(ctx context.Context) (resource.Resource, error) { "ra_allowed": "RaAllowed", "report_dev_status_battery": "ReportDevStatusBattery", "report_dev_status_margin": "ReportDevStatusMargin", + "service_profile_id": "Id", "tags": "Tags", "target_per": "TargetPer", "ul_bucket_size": "UlBucketSize", diff --git a/internal/aws/iotwireless/service_profile_singular_data_source_gen.go b/internal/aws/iotwireless/service_profile_singular_data_source_gen.go index cd223a2db..f359c6e05 100644 --- a/internal/aws/iotwireless/service_profile_singular_data_source_gen.go +++ b/internal/aws/iotwireless/service_profile_singular_data_source_gen.go @@ -41,7 +41,7 @@ func serviceProfileDataSource(ctx context.Context) (datasource.DataSource, error // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "service_profile_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Service profile Id. Returned after successful create.", Computed: true, }, /*END ATTRIBUTE*/ @@ -275,7 +275,6 @@ func serviceProfileDataSource(ctx context.Context) (datasource.DataSource, error "dr_max": "DrMax", "dr_min": "DrMin", "hr_allowed": "HrAllowed", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "min_gw_diversity": "MinGwDiversity", @@ -285,6 +284,7 @@ func serviceProfileDataSource(ctx context.Context) (datasource.DataSource, error "ra_allowed": "RaAllowed", "report_dev_status_battery": "ReportDevStatusBattery", "report_dev_status_margin": "ReportDevStatusMargin", + "service_profile_id": "Id", "tags": "Tags", "target_per": "TargetPer", "ul_bucket_size": "UlBucketSize", diff --git a/internal/aws/iotwireless/task_definition_resource_gen.go b/internal/aws/iotwireless/task_definition_resource_gen.go index 1c6da7017..e2f842ea6 100644 --- a/internal/aws/iotwireless/task_definition_resource_gen.go +++ b/internal/aws/iotwireless/task_definition_resource_gen.go @@ -63,7 +63,7 @@ func taskDefinitionResource(ctx context.Context) (resource.Resource, error) { // "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "task_definition_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the new wireless gateway task definition", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -550,6 +550,15 @@ func taskDefinitionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Creates a gateway task definition.", Version: 1, @@ -560,12 +569,10 @@ func taskDefinitionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::TaskDefinition").WithTerraformTypeName("awscc_iotwireless_task_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "auto_create_tasks": "AutoCreateTasks", "current_version": "CurrentVersion", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "lo_ra_wan_update_gateway_task_entry": "LoRaWANUpdateGatewayTaskEntry", @@ -575,6 +582,7 @@ func taskDefinitionResource(ctx context.Context) (resource.Resource, error) { "sig_key_crc": "SigKeyCrc", "station": "Station", "tags": "Tags", + "task_definition_id": "Id", "task_definition_type": "TaskDefinitionType", "update": "Update", "update_data_role": "UpdateDataRole", diff --git a/internal/aws/iotwireless/task_definition_singular_data_source_gen.go b/internal/aws/iotwireless/task_definition_singular_data_source_gen.go index 0938fb266..06df8a7a2 100644 --- a/internal/aws/iotwireless/task_definition_singular_data_source_gen.go +++ b/internal/aws/iotwireless/task_definition_singular_data_source_gen.go @@ -52,7 +52,7 @@ func taskDefinitionDataSource(ctx context.Context) (datasource.DataSource, error // "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "task_definition_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the new wireless gateway task definition", Computed: true, }, /*END ATTRIBUTE*/ @@ -380,7 +380,6 @@ func taskDefinitionDataSource(ctx context.Context) (datasource.DataSource, error "arn": "Arn", "auto_create_tasks": "AutoCreateTasks", "current_version": "CurrentVersion", - "id": "Id", "key": "Key", "lo_ra_wan": "LoRaWAN", "lo_ra_wan_update_gateway_task_entry": "LoRaWANUpdateGatewayTaskEntry", @@ -390,6 +389,7 @@ func taskDefinitionDataSource(ctx context.Context) (datasource.DataSource, error "sig_key_crc": "SigKeyCrc", "station": "Station", "tags": "Tags", + "task_definition_id": "Id", "task_definition_type": "TaskDefinitionType", "update": "Update", "update_data_role": "UpdateDataRole", diff --git a/internal/aws/iotwireless/wireless_device_import_task_resource_gen.go b/internal/aws/iotwireless/wireless_device_import_task_resource_gen.go index 7ef5a8078..7673daa41 100644 --- a/internal/aws/iotwireless/wireless_device_import_task_resource_gen.go +++ b/internal/aws/iotwireless/wireless_device_import_task_resource_gen.go @@ -99,7 +99,7 @@ func wirelessDeviceImportTaskResource(ctx context.Context) (resource.Resource, e // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "wireless_device_import_task_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id for Wireless Device Import Task, Returned upon successful start.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -349,6 +349,15 @@ func wirelessDeviceImportTaskResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Wireless Device Import Tasks", Version: 1, @@ -359,7 +368,6 @@ func wirelessDeviceImportTaskResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::WirelessDeviceImportTask").WithTerraformTypeName("awscc_iotwireless_wireless_device_import_task") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_date": "CreationDate", @@ -367,7 +375,6 @@ func wirelessDeviceImportTaskResource(ctx context.Context) (resource.Resource, e "device_creation_file": "DeviceCreationFile", "device_creation_file_list": "DeviceCreationFileList", "failed_imported_devices_count": "FailedImportedDevicesCount", - "id": "Id", "initialized_imported_devices_count": "InitializedImportedDevicesCount", "key": "Key", "onboarded_imported_devices_count": "OnboardedImportedDevicesCount", @@ -379,6 +386,7 @@ func wirelessDeviceImportTaskResource(ctx context.Context) (resource.Resource, e "status_reason": "StatusReason", "tags": "Tags", "value": "Value", + "wireless_device_import_task_id": "Id", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/iotwireless/wireless_device_import_task_singular_data_source_gen.go b/internal/aws/iotwireless/wireless_device_import_task_singular_data_source_gen.go index f9e9e198c..8009e967a 100644 --- a/internal/aws/iotwireless/wireless_device_import_task_singular_data_source_gen.go +++ b/internal/aws/iotwireless/wireless_device_import_task_singular_data_source_gen.go @@ -78,7 +78,7 @@ func wirelessDeviceImportTaskDataSource(ctx context.Context) (datasource.DataSou // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "wireless_device_import_task_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id for Wireless Device Import Task, Returned upon successful start.", Computed: true, }, /*END ATTRIBUTE*/ @@ -295,7 +295,6 @@ func wirelessDeviceImportTaskDataSource(ctx context.Context) (datasource.DataSou "device_creation_file": "DeviceCreationFile", "device_creation_file_list": "DeviceCreationFileList", "failed_imported_devices_count": "FailedImportedDevicesCount", - "id": "Id", "initialized_imported_devices_count": "InitializedImportedDevicesCount", "key": "Key", "onboarded_imported_devices_count": "OnboardedImportedDevicesCount", @@ -307,6 +306,7 @@ func wirelessDeviceImportTaskDataSource(ctx context.Context) (datasource.DataSou "status_reason": "StatusReason", "tags": "Tags", "value": "Value", + "wireless_device_import_task_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/iotwireless/wireless_device_resource_gen.go b/internal/aws/iotwireless/wireless_device_resource_gen.go index 3fbfa33c6..baa2a5d2f 100644 --- a/internal/aws/iotwireless/wireless_device_resource_gen.go +++ b/internal/aws/iotwireless/wireless_device_resource_gen.go @@ -88,7 +88,7 @@ func wirelessDeviceResource(ctx context.Context) (resource.Resource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "wireless_device_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Wireless device Id. Returned after successful create.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -714,6 +714,15 @@ func wirelessDeviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Create and manage wireless gateways, including LoRa gateways.", Version: 1, @@ -724,7 +733,6 @@ func wirelessDeviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::WirelessDevice").WithTerraformTypeName("awscc_iotwireless_wireless_device") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "abp_v10_x": "AbpV10x", "abp_v11": "AbpV11", @@ -741,7 +749,6 @@ func wirelessDeviceResource(ctx context.Context) (resource.Resource, error) { "f_nwk_s_int_key": "FNwkSIntKey", "f_port": "FPort", "f_ports": "FPorts", - "id": "Id", "join_eui": "JoinEui", "key": "Key", "last_uplink_received_at": "LastUplinkReceivedAt", @@ -761,6 +768,7 @@ func wirelessDeviceResource(ctx context.Context) (resource.Resource, error) { "thing_name": "ThingName", "type": "Type", "value": "Value", + "wireless_device_id": "Id", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/iotwireless/wireless_device_singular_data_source_gen.go b/internal/aws/iotwireless/wireless_device_singular_data_source_gen.go index bc707c98e..78450152b 100644 --- a/internal/aws/iotwireless/wireless_device_singular_data_source_gen.go +++ b/internal/aws/iotwireless/wireless_device_singular_data_source_gen.go @@ -65,7 +65,7 @@ func wirelessDeviceDataSource(ctx context.Context) (datasource.DataSource, error // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "wireless_device_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Wireless device Id. Returned after successful create.", Computed: true, }, /*END ATTRIBUTE*/ @@ -551,7 +551,6 @@ func wirelessDeviceDataSource(ctx context.Context) (datasource.DataSource, error "f_nwk_s_int_key": "FNwkSIntKey", "f_port": "FPort", "f_ports": "FPorts", - "id": "Id", "join_eui": "JoinEui", "key": "Key", "last_uplink_received_at": "LastUplinkReceivedAt", @@ -571,6 +570,7 @@ func wirelessDeviceDataSource(ctx context.Context) (datasource.DataSource, error "thing_name": "ThingName", "type": "Type", "value": "Value", + "wireless_device_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/iotwireless/wireless_gateway_resource_gen.go b/internal/aws/iotwireless/wireless_gateway_resource_gen.go index ccfcbb749..503173a0a 100644 --- a/internal/aws/iotwireless/wireless_gateway_resource_gen.go +++ b/internal/aws/iotwireless/wireless_gateway_resource_gen.go @@ -70,7 +70,7 @@ func wirelessGatewayResource(ctx context.Context) (resource.Resource, error) { // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "wireless_gateway_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id for Wireless Gateway. Returned upon successful create.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -248,6 +248,15 @@ func wirelessGatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Create and manage wireless gateways, including LoRa gateways.", Version: 1, @@ -258,12 +267,10 @@ func wirelessGatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IoTWireless::WirelessGateway").WithTerraformTypeName("awscc_iotwireless_wireless_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", "gateway_eui": "GatewayEui", - "id": "Id", "key": "Key", "last_uplink_received_at": "LastUplinkReceivedAt", "lo_ra_wan": "LoRaWAN", @@ -273,6 +280,7 @@ func wirelessGatewayResource(ctx context.Context) (resource.Resource, error) { "thing_arn": "ThingArn", "thing_name": "ThingName", "value": "Value", + "wireless_gateway_id": "Id", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/iotwireless/wireless_gateway_singular_data_source_gen.go b/internal/aws/iotwireless/wireless_gateway_singular_data_source_gen.go index 1f643aad2..35dfc9178 100644 --- a/internal/aws/iotwireless/wireless_gateway_singular_data_source_gen.go +++ b/internal/aws/iotwireless/wireless_gateway_singular_data_source_gen.go @@ -53,7 +53,7 @@ func wirelessGatewayDataSource(ctx context.Context) (datasource.DataSource, erro // "maxLength": 256, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "wireless_gateway_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id for Wireless Gateway. Returned upon successful create.", Computed: true, }, /*END ATTRIBUTE*/ @@ -200,7 +200,6 @@ func wirelessGatewayDataSource(ctx context.Context) (datasource.DataSource, erro "arn": "Arn", "description": "Description", "gateway_eui": "GatewayEui", - "id": "Id", "key": "Key", "last_uplink_received_at": "LastUplinkReceivedAt", "lo_ra_wan": "LoRaWAN", @@ -210,6 +209,7 @@ func wirelessGatewayDataSource(ctx context.Context) (datasource.DataSource, erro "thing_arn": "ThingArn", "thing_name": "ThingName", "value": "Value", + "wireless_gateway_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ivs/channel_resource_gen.go b/internal/aws/ivs/channel_resource_gen.go index 615dd1e78..6ce48d59b 100644 --- a/internal/aws/ivs/channel_resource_gen.go +++ b/internal/aws/ivs/channel_resource_gen.go @@ -301,6 +301,7 @@ func channelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -319,7 +320,6 @@ func channelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IVS::Channel").WithTerraformTypeName("awscc_ivs_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "authorized": "Authorized", diff --git a/internal/aws/ivs/playback_key_pair_resource_gen.go b/internal/aws/ivs/playback_key_pair_resource_gen.go index 876acb5ac..2a7ea55a3 100644 --- a/internal/aws/ivs/playback_key_pair_resource_gen.go +++ b/internal/aws/ivs/playback_key_pair_resource_gen.go @@ -161,6 +161,7 @@ func playbackKeyPairResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -179,7 +180,6 @@ func playbackKeyPairResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IVS::PlaybackKeyPair").WithTerraformTypeName("awscc_ivs_playback_key_pair") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "fingerprint": "Fingerprint", diff --git a/internal/aws/ivs/recording_configuration_resource_gen.go b/internal/aws/ivs/recording_configuration_resource_gen.go index e45357540..554e34234 100644 --- a/internal/aws/ivs/recording_configuration_resource_gen.go +++ b/internal/aws/ivs/recording_configuration_resource_gen.go @@ -453,6 +453,7 @@ func recordingConfigurationResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -471,7 +472,6 @@ func recordingConfigurationResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::IVS::RecordingConfiguration").WithTerraformTypeName("awscc_ivs_recording_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket_name": "BucketName", diff --git a/internal/aws/ivs/stage_resource_gen.go b/internal/aws/ivs/stage_resource_gen.go index 1c5bb5b06..a84f34cdc 100644 --- a/internal/aws/ivs/stage_resource_gen.go +++ b/internal/aws/ivs/stage_resource_gen.go @@ -142,6 +142,7 @@ func stageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -160,7 +161,6 @@ func stageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IVS::Stage").WithTerraformTypeName("awscc_ivs_stage") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "active_session_id": "ActiveSessionId", "arn": "Arn", diff --git a/internal/aws/ivs/stream_key_resource_gen.go b/internal/aws/ivs/stream_key_resource_gen.go index 60fbb048b..9d49b1277 100644 --- a/internal/aws/ivs/stream_key_resource_gen.go +++ b/internal/aws/ivs/stream_key_resource_gen.go @@ -139,6 +139,7 @@ func streamKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -157,7 +158,6 @@ func streamKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::IVS::StreamKey").WithTerraformTypeName("awscc_ivs_stream_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "channel_arn": "ChannelArn", diff --git a/internal/aws/ivschat/logging_configuration_plural_data_source_gen.go b/internal/aws/ivschat/logging_configuration_plural_data_source_gen.go new file mode 100644 index 000000000..6dd82c9f9 --- /dev/null +++ b/internal/aws/ivschat/logging_configuration_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package ivschat + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_ivschat_logging_configurations", loggingConfigurationsDataSource) +} + +// loggingConfigurationsDataSource returns the Terraform awscc_ivschat_logging_configurations data source. +// This Terraform data source corresponds to the CloudFormation AWS::IVSChat::LoggingConfiguration resource. +func loggingConfigurationsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IVSChat::LoggingConfiguration", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IVSChat::LoggingConfiguration").WithTerraformTypeName("awscc_ivschat_logging_configurations") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ivschat/logging_configuration_plural_data_source_gen_test.go b/internal/aws/ivschat/logging_configuration_plural_data_source_gen_test.go new file mode 100644 index 000000000..274cb9c09 --- /dev/null +++ b/internal/aws/ivschat/logging_configuration_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package ivschat_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIVSChatLoggingConfigurationsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::LoggingConfiguration", "awscc_ivschat_logging_configurations", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/ivschat/logging_configuration_resource_gen.go b/internal/aws/ivschat/logging_configuration_resource_gen.go new file mode 100644 index 000000000..546d0712a --- /dev/null +++ b/internal/aws/ivschat/logging_configuration_resource_gen.go @@ -0,0 +1,347 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package ivschat + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_ivschat_logging_configuration", loggingConfigurationResource) +} + +// loggingConfigurationResource returns the Terraform awscc_ivschat_logging_configuration resource. +// This Terraform resource corresponds to the CloudFormation AWS::IVSChat::LoggingConfiguration resource. +func loggingConfigurationResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "LoggingConfiguration ARN is automatically generated on creation and assigned as the unique identifier.", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:logging-configuration/[a-zA-Z0-9-]+$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "LoggingConfiguration ARN is automatically generated on creation and assigned as the unique identifier.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DestinationConfiguration + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Destination configuration for IVS Chat logging.", + // "properties": { + // "CloudWatchLogs": { + // "additionalProperties": false, + // "description": "CloudWatch destination configuration for IVS Chat logging.", + // "properties": { + // "LogGroupName": { + // "description": "Name of the Amazon CloudWatch Logs log group where chat activity will be logged.", + // "maxLength": 512, + // "minLength": 1, + // "pattern": "^[\\.\\-_/#A-Za-z0-9]+$", + // "type": "string" + // } + // }, + // "required": [ + // "LogGroupName" + // ], + // "type": "object" + // }, + // "Firehose": { + // "additionalProperties": false, + // "description": "Kinesis Firehose destination configuration for IVS Chat logging.", + // "properties": { + // "DeliveryStreamName": { + // "description": "Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.", + // "maxLength": 64, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9_.-]+$", + // "type": "string" + // } + // }, + // "required": [ + // "DeliveryStreamName" + // ], + // "type": "object" + // }, + // "S3": { + // "additionalProperties": false, + // "description": "S3 destination configuration for IVS Chat logging.", + // "properties": { + // "BucketName": { + // "description": "Name of the Amazon S3 bucket where chat activity will be logged.", + // "maxLength": 63, + // "minLength": 3, + // "pattern": "^[a-z0-9-.]+$", + // "type": "string" + // } + // }, + // "required": [ + // "BucketName" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + "destination_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CloudWatchLogs + "cloudwatch_logs": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: LogGroupName + "log_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the Amazon CloudWatch Logs log group where chat activity will be logged.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 512), + stringvalidator.RegexMatches(regexp.MustCompile("^[\\.\\-_/#A-Za-z0-9]+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "CloudWatch destination configuration for IVS Chat logging.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Firehose + "firehose": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DeliveryStreamName + "delivery_stream_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 64), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9_.-]+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Kinesis Firehose destination configuration for IVS Chat logging.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: S3 + "s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BucketName + "bucket_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the Amazon S3 bucket where chat activity will be logged.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 63), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-z0-9-.]+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "S3 destination configuration for IVS Chat logging.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Destination configuration for IVS Chat logging.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The system-generated ID of the logging configuration.", + // "maxLength": 12, + // "minLength": 12, + // "pattern": "^[a-zA-Z0-9]+$", + // "type": "string" + // } + "logging_configuration_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The system-generated ID of the logging configuration.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "The name of the logging configuration. The value does not need to be unique.", + // "maxLength": 128, + // "minLength": 0, + // "pattern": "^[a-zA-Z0-9-_]*$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the logging configuration. The value does not need to be unique.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9-_]*$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: State + // CloudFormation resource type schema: + // + // { + // "description": "The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.", + // "enum": [ + // "CREATING", + // "CREATE_FAILED", + // "DELETING", + // "DELETE_FAILED", + // "UPDATING", + // "UPDATING_FAILED", + // "ACTIVE" + // ], + // "type": "string" + // } + "state": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource type definition for AWS::IVSChat::LoggingConfiguration.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IVSChat::LoggingConfiguration").WithTerraformTypeName("awscc_ivschat_logging_configuration") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "bucket_name": "BucketName", + "cloudwatch_logs": "CloudWatchLogs", + "delivery_stream_name": "DeliveryStreamName", + "destination_configuration": "DestinationConfiguration", + "firehose": "Firehose", + "key": "Key", + "log_group_name": "LogGroupName", + "logging_configuration_id": "Id", + "name": "Name", + "s3": "S3", + "state": "State", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ivschat/logging_configuration_resource_gen_test.go b/internal/aws/ivschat/logging_configuration_resource_gen_test.go new file mode 100644 index 000000000..37cfaf569 --- /dev/null +++ b/internal/aws/ivschat/logging_configuration_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package ivschat_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIVSChatLoggingConfiguration_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::LoggingConfiguration", "awscc_ivschat_logging_configuration", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/ivschat/logging_configuration_singular_data_source_gen.go b/internal/aws/ivschat/logging_configuration_singular_data_source_gen.go new file mode 100644 index 000000000..da06ecdcd --- /dev/null +++ b/internal/aws/ivschat/logging_configuration_singular_data_source_gen.go @@ -0,0 +1,280 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package ivschat + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_ivschat_logging_configuration", loggingConfigurationDataSource) +} + +// loggingConfigurationDataSource returns the Terraform awscc_ivschat_logging_configuration data source. +// This Terraform data source corresponds to the CloudFormation AWS::IVSChat::LoggingConfiguration resource. +func loggingConfigurationDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "LoggingConfiguration ARN is automatically generated on creation and assigned as the unique identifier.", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:logging-configuration/[a-zA-Z0-9-]+$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "LoggingConfiguration ARN is automatically generated on creation and assigned as the unique identifier.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DestinationConfiguration + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Destination configuration for IVS Chat logging.", + // "properties": { + // "CloudWatchLogs": { + // "additionalProperties": false, + // "description": "CloudWatch destination configuration for IVS Chat logging.", + // "properties": { + // "LogGroupName": { + // "description": "Name of the Amazon CloudWatch Logs log group where chat activity will be logged.", + // "maxLength": 512, + // "minLength": 1, + // "pattern": "^[\\.\\-_/#A-Za-z0-9]+$", + // "type": "string" + // } + // }, + // "required": [ + // "LogGroupName" + // ], + // "type": "object" + // }, + // "Firehose": { + // "additionalProperties": false, + // "description": "Kinesis Firehose destination configuration for IVS Chat logging.", + // "properties": { + // "DeliveryStreamName": { + // "description": "Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.", + // "maxLength": 64, + // "minLength": 1, + // "pattern": "^[a-zA-Z0-9_.-]+$", + // "type": "string" + // } + // }, + // "required": [ + // "DeliveryStreamName" + // ], + // "type": "object" + // }, + // "S3": { + // "additionalProperties": false, + // "description": "S3 destination configuration for IVS Chat logging.", + // "properties": { + // "BucketName": { + // "description": "Name of the Amazon S3 bucket where chat activity will be logged.", + // "maxLength": 63, + // "minLength": 3, + // "pattern": "^[a-z0-9-.]+$", + // "type": "string" + // } + // }, + // "required": [ + // "BucketName" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + "destination_configuration": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CloudWatchLogs + "cloudwatch_logs": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: LogGroupName + "log_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the Amazon CloudWatch Logs log group where chat activity will be logged.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "CloudWatch destination configuration for IVS Chat logging.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Firehose + "firehose": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DeliveryStreamName + "delivery_stream_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the Amazon Kinesis Firehose delivery stream where chat activity will be logged.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Kinesis Firehose destination configuration for IVS Chat logging.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3 + "s3": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BucketName + "bucket_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the Amazon S3 bucket where chat activity will be logged.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "S3 destination configuration for IVS Chat logging.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Destination configuration for IVS Chat logging.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The system-generated ID of the logging configuration.", + // "maxLength": 12, + // "minLength": 12, + // "pattern": "^[a-zA-Z0-9]+$", + // "type": "string" + // } + "logging_configuration_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The system-generated ID of the logging configuration.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "The name of the logging configuration. The value does not need to be unique.", + // "maxLength": 128, + // "minLength": 0, + // "pattern": "^[a-zA-Z0-9-_]*$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the logging configuration. The value does not need to be unique.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: State + // CloudFormation resource type schema: + // + // { + // "description": "The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.", + // "enum": [ + // "CREATING", + // "CREATE_FAILED", + // "DELETING", + // "DELETE_FAILED", + // "UPDATING", + // "UPDATING_FAILED", + // "ACTIVE" + // ], + // "type": "string" + // } + "state": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The state of the logging configuration. When the state is ACTIVE, the configuration is ready to log chat content.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IVSChat::LoggingConfiguration", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IVSChat::LoggingConfiguration").WithTerraformTypeName("awscc_ivschat_logging_configuration") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "bucket_name": "BucketName", + "cloudwatch_logs": "CloudWatchLogs", + "delivery_stream_name": "DeliveryStreamName", + "destination_configuration": "DestinationConfiguration", + "firehose": "Firehose", + "key": "Key", + "log_group_name": "LogGroupName", + "logging_configuration_id": "Id", + "name": "Name", + "s3": "S3", + "state": "State", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ivschat/logging_configuration_singular_data_source_gen_test.go b/internal/aws/ivschat/logging_configuration_singular_data_source_gen_test.go new file mode 100644 index 000000000..222de289b --- /dev/null +++ b/internal/aws/ivschat/logging_configuration_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package ivschat_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIVSChatLoggingConfigurationDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::LoggingConfiguration", "awscc_ivschat_logging_configuration", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSIVSChatLoggingConfigurationDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::LoggingConfiguration", "awscc_ivschat_logging_configuration", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/ivschat/room_plural_data_source_gen.go b/internal/aws/ivschat/room_plural_data_source_gen.go new file mode 100644 index 000000000..9550a65ad --- /dev/null +++ b/internal/aws/ivschat/room_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package ivschat + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_ivschat_rooms", roomsDataSource) +} + +// roomsDataSource returns the Terraform awscc_ivschat_rooms data source. +// This Terraform data source corresponds to the CloudFormation AWS::IVSChat::Room resource. +func roomsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::IVSChat::Room", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IVSChat::Room").WithTerraformTypeName("awscc_ivschat_rooms") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ivschat/room_plural_data_source_gen_test.go b/internal/aws/ivschat/room_plural_data_source_gen_test.go new file mode 100644 index 000000000..00bd5906d --- /dev/null +++ b/internal/aws/ivschat/room_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package ivschat_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIVSChatRoomsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::Room", "awscc_ivschat_rooms", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/ivschat/room_resource_gen.go b/internal/aws/ivschat/room_resource_gen.go new file mode 100644 index 000000000..0a7ab3c2a --- /dev/null +++ b/internal/aws/ivschat/room_resource_gen.go @@ -0,0 +1,341 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package ivschat + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_ivschat_room", roomResource) +} + +// roomResource returns the Terraform awscc_ivschat_room resource. +// This Terraform resource corresponds to the CloudFormation AWS::IVSChat::Room resource. +func roomResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "Room ARN is automatically generated on creation and assigned as the unique identifier.", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:room/[a-zA-Z0-9-]+$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Room ARN is automatically generated on creation and assigned as the unique identifier.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The system-generated ID of the room.", + // "maxLength": 12, + // "minLength": 12, + // "pattern": "^[a-zA-Z0-9]+$", + // "type": "string" + // } + "room_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The system-generated ID of the room.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LoggingConfigurationIdentifiers + // CloudFormation resource type schema: + // + // { + // "description": "Array of logging configuration identifiers attached to the room.", + // "insertionOrder": false, + // "items": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:logging-configuration/[a-zA-Z0-9-]+$", + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "logging_configuration_identifiers": schema.SetAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "Array of logging configuration identifiers attached to the room.", + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + setvalidator.ValueStringsAre( + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:logging-configuration/[a-zA-Z0-9-]+$"), ""), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MaximumMessageLength + // CloudFormation resource type schema: + // + // { + // "default": 500, + // "description": "The maximum number of characters in a single message.", + // "maximum": 500, + // "minimum": 1, + // "type": "integer" + // } + "maximum_message_length": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The maximum number of characters in a single message.", + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 500), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + generic.Int64DefaultValue(500), + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MaximumMessageRatePerSecond + // CloudFormation resource type schema: + // + // { + // "default": 10, + // "description": "The maximum number of messages per second that can be sent to the room.", + // "maximum": 10, + // "minimum": 1, + // "type": "integer" + // } + "maximum_message_rate_per_second": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The maximum number of messages per second that can be sent to the room.", + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 10), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + generic.Int64DefaultValue(10), + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MessageReviewHandler + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Configuration information for optional review of messages.", + // "properties": { + // "FallbackResult": { + // "default": "ALLOW", + // "description": "Specifies the fallback behavior if the handler does not return a valid response, encounters an error, or times out.", + // "enum": [ + // "ALLOW", + // "DENY" + // ], + // "type": "string" + // }, + // "Uri": { + // "description": "Identifier of the message review handler.", + // "maxLength": 170, + // "minLength": 0, + // "pattern": "^$|^arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:.+", + // "type": "string" + // } + // }, + // "type": "object" + // } + "message_review_handler": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FallbackResult + "fallback_result": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the fallback behavior if the handler does not return a valid response, encounters an error, or times out.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "ALLOW", + "DENY", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + generic.StringDefaultValue("ALLOW"), + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Uri + "uri": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Identifier of the message review handler.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 170), + stringvalidator.RegexMatches(regexp.MustCompile("^$|^arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:.+"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Configuration information for optional review of messages.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "The name of the room. The value does not need to be unique.", + // "maxLength": 128, + // "minLength": 0, + // "pattern": "^[a-zA-Z0-9-_]*$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the room. The value does not need to be unique.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^[a-zA-Z0-9-_]*$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource type definition for AWS::IVSChat::Room.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IVSChat::Room").WithTerraformTypeName("awscc_ivschat_room") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "fallback_result": "FallbackResult", + "key": "Key", + "logging_configuration_identifiers": "LoggingConfigurationIdentifiers", + "maximum_message_length": "MaximumMessageLength", + "maximum_message_rate_per_second": "MaximumMessageRatePerSecond", + "message_review_handler": "MessageReviewHandler", + "name": "Name", + "room_id": "Id", + "tags": "Tags", + "uri": "Uri", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ivschat/room_resource_gen_test.go b/internal/aws/ivschat/room_resource_gen_test.go new file mode 100644 index 000000000..da919db4b --- /dev/null +++ b/internal/aws/ivschat/room_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package ivschat_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIVSChatRoom_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::Room", "awscc_ivschat_room", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSIVSChatRoom_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::Room", "awscc_ivschat_room", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/ivschat/room_singular_data_source_gen.go b/internal/aws/ivschat/room_singular_data_source_gen.go new file mode 100644 index 000000000..27b106fc3 --- /dev/null +++ b/internal/aws/ivschat/room_singular_data_source_gen.go @@ -0,0 +1,248 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package ivschat + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_ivschat_room", roomDataSource) +} + +// roomDataSource returns the Terraform awscc_ivschat_room data source. +// This Terraform data source corresponds to the CloudFormation AWS::IVSChat::Room resource. +func roomDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "Room ARN is automatically generated on creation and assigned as the unique identifier.", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:room/[a-zA-Z0-9-]+$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Room ARN is automatically generated on creation and assigned as the unique identifier.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The system-generated ID of the room.", + // "maxLength": 12, + // "minLength": 12, + // "pattern": "^[a-zA-Z0-9]+$", + // "type": "string" + // } + "room_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The system-generated ID of the room.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LoggingConfigurationIdentifiers + // CloudFormation resource type schema: + // + // { + // "description": "Array of logging configuration identifiers attached to the room.", + // "insertionOrder": false, + // "items": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^arn:aws:ivschat:[a-z0-9-]+:[0-9]+:logging-configuration/[a-zA-Z0-9-]+$", + // "type": "string" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "logging_configuration_identifiers": schema.SetAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "Array of logging configuration identifiers attached to the room.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MaximumMessageLength + // CloudFormation resource type schema: + // + // { + // "default": 500, + // "description": "The maximum number of characters in a single message.", + // "maximum": 500, + // "minimum": 1, + // "type": "integer" + // } + "maximum_message_length": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The maximum number of characters in a single message.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MaximumMessageRatePerSecond + // CloudFormation resource type schema: + // + // { + // "default": 10, + // "description": "The maximum number of messages per second that can be sent to the room.", + // "maximum": 10, + // "minimum": 1, + // "type": "integer" + // } + "maximum_message_rate_per_second": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The maximum number of messages per second that can be sent to the room.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MessageReviewHandler + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Configuration information for optional review of messages.", + // "properties": { + // "FallbackResult": { + // "default": "ALLOW", + // "description": "Specifies the fallback behavior if the handler does not return a valid response, encounters an error, or times out.", + // "enum": [ + // "ALLOW", + // "DENY" + // ], + // "type": "string" + // }, + // "Uri": { + // "description": "Identifier of the message review handler.", + // "maxLength": 170, + // "minLength": 0, + // "pattern": "^$|^arn:aws:lambda:[a-z0-9-]+:[0-9]{12}:function:.+", + // "type": "string" + // } + // }, + // "type": "object" + // } + "message_review_handler": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FallbackResult + "fallback_result": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the fallback behavior if the handler does not return a valid response, encounters an error, or times out.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Uri + "uri": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Identifier of the message review handler.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Configuration information for optional review of messages.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "The name of the room. The value does not need to be unique.", + // "maxLength": 128, + // "minLength": 0, + // "pattern": "^[a-zA-Z0-9-_]*$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the room. The value does not need to be unique.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An array of key-value pairs to apply to this resource.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An array of key-value pairs to apply to this resource.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::IVSChat::Room", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::IVSChat::Room").WithTerraformTypeName("awscc_ivschat_room") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "fallback_result": "FallbackResult", + "key": "Key", + "logging_configuration_identifiers": "LoggingConfigurationIdentifiers", + "maximum_message_length": "MaximumMessageLength", + "maximum_message_rate_per_second": "MaximumMessageRatePerSecond", + "message_review_handler": "MessageReviewHandler", + "name": "Name", + "room_id": "Id", + "tags": "Tags", + "uri": "Uri", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/ivschat/room_singular_data_source_gen_test.go b/internal/aws/ivschat/room_singular_data_source_gen_test.go new file mode 100644 index 000000000..7b8fad7b7 --- /dev/null +++ b/internal/aws/ivschat/room_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package ivschat_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSIVSChatRoomDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::Room", "awscc_ivschat_room", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSIVSChatRoomDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::IVSChat::Room", "awscc_ivschat_room", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/kafkaconnect/connector_resource_gen.go b/internal/aws/kafkaconnect/connector_resource_gen.go index c7d20e970..16e552b16 100644 --- a/internal/aws/kafkaconnect/connector_resource_gen.go +++ b/internal/aws/kafkaconnect/connector_resource_gen.go @@ -905,6 +905,7 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -923,7 +924,6 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KafkaConnect::Connector").WithTerraformTypeName("awscc_kafkaconnect_connector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "apache_kafka_cluster": "ApacheKafkaCluster", "authentication_type": "AuthenticationType", diff --git a/internal/aws/kendra/data_source_resource_gen.go b/internal/aws/kendra/data_source_resource_gen.go index 4251d809d..a3702da8b 100644 --- a/internal/aws/kendra/data_source_resource_gen.go +++ b/internal/aws/kendra/data_source_resource_gen.go @@ -4795,7 +4795,7 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "data_source_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ID of data source", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -5002,6 +5002,15 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Kendra DataSource", Version: 1, @@ -5012,7 +5021,6 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Kendra::DataSource").WithTerraformTypeName("awscc_kendra_data_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "access_control_list_configuration": "AccessControlListConfiguration", "acl_configuration": "AclConfiguration", @@ -5045,6 +5053,7 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { "custom_knowledge_article_type_configurations": "CustomKnowledgeArticleTypeConfigurations", "data_source_configuration": "DataSourceConfiguration", "data_source_field_name": "DataSourceFieldName", + "data_source_id": "Id", "database_configuration": "DatabaseConfiguration", "database_engine_type": "DatabaseEngineType", "database_host": "DatabaseHost", @@ -5072,7 +5081,6 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { "google_drive_configuration": "GoogleDriveConfiguration", "host": "Host", "host_url": "HostUrl", - "id": "Id", "include_attachment_file_patterns": "IncludeAttachmentFilePatterns", "include_filter_types": "IncludeFilterTypes", "include_spaces": "IncludeSpaces", diff --git a/internal/aws/kendra/data_source_singular_data_source_gen.go b/internal/aws/kendra/data_source_singular_data_source_gen.go index 0575c8b31..c2644a01e 100644 --- a/internal/aws/kendra/data_source_singular_data_source_gen.go +++ b/internal/aws/kendra/data_source_singular_data_source_gen.go @@ -3313,7 +3313,7 @@ func dataSourceDataSource(ctx context.Context) (datasource.DataSource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "data_source_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ID of data source", Computed: true, }, /*END ATTRIBUTE*/ @@ -3504,6 +3504,7 @@ func dataSourceDataSource(ctx context.Context) (datasource.DataSource, error) { "custom_knowledge_article_type_configurations": "CustomKnowledgeArticleTypeConfigurations", "data_source_configuration": "DataSourceConfiguration", "data_source_field_name": "DataSourceFieldName", + "data_source_id": "Id", "database_configuration": "DatabaseConfiguration", "database_engine_type": "DatabaseEngineType", "database_host": "DatabaseHost", @@ -3531,7 +3532,6 @@ func dataSourceDataSource(ctx context.Context) (datasource.DataSource, error) { "google_drive_configuration": "GoogleDriveConfiguration", "host": "Host", "host_url": "HostUrl", - "id": "Id", "include_attachment_file_patterns": "IncludeAttachmentFilePatterns", "include_filter_types": "IncludeFilterTypes", "include_spaces": "IncludeSpaces", diff --git a/internal/aws/kendra/faq_resource_gen.go b/internal/aws/kendra/faq_resource_gen.go index 28e551483..c8020ab30 100644 --- a/internal/aws/kendra/faq_resource_gen.go +++ b/internal/aws/kendra/faq_resource_gen.go @@ -101,7 +101,7 @@ func faqResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "faq_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of the FAQ", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -301,6 +301,15 @@ func faqResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "A Kendra FAQ resource", Version: 1, @@ -311,13 +320,12 @@ func faqResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Kendra::Faq").WithTerraformTypeName("awscc_kendra_faq") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", "description": "Description", + "faq_id": "Id", "file_format": "FileFormat", - "id": "Id", "index_id": "IndexId", "key": "Key", "language_code": "LanguageCode", diff --git a/internal/aws/kendra/faq_singular_data_source_gen.go b/internal/aws/kendra/faq_singular_data_source_gen.go index fac349c64..5d08d4db5 100644 --- a/internal/aws/kendra/faq_singular_data_source_gen.go +++ b/internal/aws/kendra/faq_singular_data_source_gen.go @@ -70,7 +70,7 @@ func faqDataSource(ctx context.Context) (datasource.DataSource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "faq_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of the FAQ", Computed: true, }, /*END ATTRIBUTE*/ @@ -236,8 +236,8 @@ func faqDataSource(ctx context.Context) (datasource.DataSource, error) { "arn": "Arn", "bucket": "Bucket", "description": "Description", + "faq_id": "Id", "file_format": "FileFormat", - "id": "Id", "index_id": "IndexId", "key": "Key", "language_code": "LanguageCode", diff --git a/internal/aws/kendra/index_resource_gen.go b/internal/aws/kendra/index_resource_gen.go index 1652e48bd..2bbcd6fcd 100644 --- a/internal/aws/kendra/index_resource_gen.go +++ b/internal/aws/kendra/index_resource_gen.go @@ -405,7 +405,7 @@ func indexResource(ctx context.Context) (resource.Resource, error) { // "minLength": 36, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "index_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of index", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -777,6 +777,15 @@ func indexResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "A Kendra index", Version: 1, @@ -787,7 +796,6 @@ func indexResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Kendra::Index").WithTerraformTypeName("awscc_kendra_index") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "capacity_units": "CapacityUnits", @@ -800,8 +808,8 @@ func indexResource(ctx context.Context) (resource.Resource, error) { "facetable": "Facetable", "freshness": "Freshness", "group_attribute_field": "GroupAttributeField", - "id": "Id", "importance": "Importance", + "index_id": "Id", "issuer": "Issuer", "json_token_type_configuration": "JsonTokenTypeConfiguration", "jwt_token_type_configuration": "JwtTokenTypeConfiguration", diff --git a/internal/aws/kendra/index_singular_data_source_gen.go b/internal/aws/kendra/index_singular_data_source_gen.go index 67f22c118..a852e8bb8 100644 --- a/internal/aws/kendra/index_singular_data_source_gen.go +++ b/internal/aws/kendra/index_singular_data_source_gen.go @@ -276,7 +276,7 @@ func indexDataSource(ctx context.Context) (datasource.DataSource, error) { // "minLength": 36, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "index_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of index", Computed: true, }, /*END ATTRIBUTE*/ @@ -560,8 +560,8 @@ func indexDataSource(ctx context.Context) (datasource.DataSource, error) { "facetable": "Facetable", "freshness": "Freshness", "group_attribute_field": "GroupAttributeField", - "id": "Id", "importance": "Importance", + "index_id": "Id", "issuer": "Issuer", "json_token_type_configuration": "JsonTokenTypeConfiguration", "jwt_token_type_configuration": "JwtTokenTypeConfiguration", diff --git a/internal/aws/kendraranking/execution_plan_resource_gen.go b/internal/aws/kendraranking/execution_plan_resource_gen.go index 997b200fc..baa08cff2 100644 --- a/internal/aws/kendraranking/execution_plan_resource_gen.go +++ b/internal/aws/kendraranking/execution_plan_resource_gen.go @@ -105,7 +105,7 @@ func executionPlanResource(ctx context.Context) (resource.Resource, error) { // "minLength": 36, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "execution_plan_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of rescore execution plan", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -194,6 +194,15 @@ func executionPlanResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "A KendraRanking Rescore execution plan", Version: 1, @@ -204,12 +213,11 @@ func executionPlanResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KendraRanking::ExecutionPlan").WithTerraformTypeName("awscc_kendraranking_execution_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "capacity_units": "CapacityUnits", "description": "Description", - "id": "Id", + "execution_plan_id": "Id", "key": "Key", "name": "Name", "rescore_capacity_units": "RescoreCapacityUnits", diff --git a/internal/aws/kendraranking/execution_plan_singular_data_source_gen.go b/internal/aws/kendraranking/execution_plan_singular_data_source_gen.go index b3181f671..2357287c3 100644 --- a/internal/aws/kendraranking/execution_plan_singular_data_source_gen.go +++ b/internal/aws/kendraranking/execution_plan_singular_data_source_gen.go @@ -80,7 +80,7 @@ func executionPlanDataSource(ctx context.Context) (datasource.DataSource, error) // "minLength": 36, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "execution_plan_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of rescore execution plan", Computed: true, }, /*END ATTRIBUTE*/ @@ -167,7 +167,7 @@ func executionPlanDataSource(ctx context.Context) (datasource.DataSource, error) "arn": "Arn", "capacity_units": "CapacityUnits", "description": "Description", - "id": "Id", + "execution_plan_id": "Id", "key": "Key", "name": "Name", "rescore_capacity_units": "RescoreCapacityUnits", diff --git a/internal/aws/kinesis/stream_resource_gen.go b/internal/aws/kinesis/stream_resource_gen.go index 964988a43..5aaee41a1 100644 --- a/internal/aws/kinesis/stream_resource_gen.go +++ b/internal/aws/kinesis/stream_resource_gen.go @@ -275,6 +275,7 @@ func streamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -293,7 +294,6 @@ func streamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Kinesis::Stream").WithTerraformTypeName("awscc_kinesis_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "encryption_type": "EncryptionType", diff --git a/internal/aws/kinesisanalyticsv2/application_resource_gen.go b/internal/aws/kinesisanalyticsv2/application_resource_gen.go index d2a66c3de..2a187f9e5 100644 --- a/internal/aws/kinesisanalyticsv2/application_resource_gen.go +++ b/internal/aws/kinesisanalyticsv2/application_resource_gen.go @@ -1905,6 +1905,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1923,7 +1924,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KinesisAnalyticsV2::Application").WithTerraformTypeName("awscc_kinesisanalyticsv2_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_non_restored_state": "AllowNonRestoredState", "application_code_configuration": "ApplicationCodeConfiguration", diff --git a/internal/aws/kinesisfirehose/delivery_stream_resource_gen.go b/internal/aws/kinesisfirehose/delivery_stream_resource_gen.go index efddbf957..77e4978a1 100644 --- a/internal/aws/kinesisfirehose/delivery_stream_resource_gen.go +++ b/internal/aws/kinesisfirehose/delivery_stream_resource_gen.go @@ -6891,6 +6891,7 @@ func deliveryStreamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -6909,7 +6910,6 @@ func deliveryStreamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KinesisFirehose::DeliveryStream").WithTerraformTypeName("awscc_kinesisfirehose_delivery_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_key": "AccessKey", "account_url": "AccountUrl", diff --git a/internal/aws/kinesisvideo/signaling_channel_resource_gen.go b/internal/aws/kinesisvideo/signaling_channel_resource_gen.go index 5bfd01168..76305e8a4 100644 --- a/internal/aws/kinesisvideo/signaling_channel_resource_gen.go +++ b/internal/aws/kinesisvideo/signaling_channel_resource_gen.go @@ -179,6 +179,7 @@ func signalingChannelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -197,7 +198,6 @@ func signalingChannelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KinesisVideo::SignalingChannel").WithTerraformTypeName("awscc_kinesisvideo_signaling_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/kinesisvideo/stream_resource_gen.go b/internal/aws/kinesisvideo/stream_resource_gen.go index 48899378d..b721fc151 100644 --- a/internal/aws/kinesisvideo/stream_resource_gen.go +++ b/internal/aws/kinesisvideo/stream_resource_gen.go @@ -222,6 +222,7 @@ func streamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -240,7 +241,6 @@ func streamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KinesisVideo::Stream").WithTerraformTypeName("awscc_kinesisvideo_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "data_retention_in_hours": "DataRetentionInHours", diff --git a/internal/aws/kms/alias_resource_gen.go b/internal/aws/kms/alias_resource_gen.go index 67cae6837..dafd0aa2b 100644 --- a/internal/aws/kms/alias_resource_gen.go +++ b/internal/aws/kms/alias_resource_gen.go @@ -66,6 +66,7 @@ func aliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -84,7 +85,6 @@ func aliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KMS::Alias").WithTerraformTypeName("awscc_kms_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias_name": "AliasName", "target_key_id": "TargetKeyId", diff --git a/internal/aws/kms/key_resource_gen.go b/internal/aws/kms/key_resource_gen.go index 1be1968a4..39307985c 100644 --- a/internal/aws/kms/key_resource_gen.go +++ b/internal/aws/kms/key_resource_gen.go @@ -348,6 +348,7 @@ func keyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -366,7 +367,6 @@ func keyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KMS::Key").WithTerraformTypeName("awscc_kms_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bypass_policy_lockout_safety_check": "BypassPolicyLockoutSafetyCheck", diff --git a/internal/aws/kms/replica_key_resource_gen.go b/internal/aws/kms/replica_key_resource_gen.go index b6dd91c35..d5eedc8cc 100644 --- a/internal/aws/kms/replica_key_resource_gen.go +++ b/internal/aws/kms/replica_key_resource_gen.go @@ -202,6 +202,7 @@ func replicaKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -220,7 +221,6 @@ func replicaKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::KMS::ReplicaKey").WithTerraformTypeName("awscc_kms_replica_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/lakeformation/data_cells_filter_resource_gen.go b/internal/aws/lakeformation/data_cells_filter_resource_gen.go index 0def825f6..aae6606e6 100644 --- a/internal/aws/lakeformation/data_cells_filter_resource_gen.go +++ b/internal/aws/lakeformation/data_cells_filter_resource_gen.go @@ -236,6 +236,7 @@ func dataCellsFilterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -254,7 +255,6 @@ func dataCellsFilterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LakeFormation::DataCellsFilter").WithTerraformTypeName("awscc_lakeformation_data_cells_filter") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "all_rows_wildcard": "AllRowsWildcard", "column_names": "ColumnNames", diff --git a/internal/aws/lakeformation/principal_permissions_resource_gen.go b/internal/aws/lakeformation/principal_permissions_resource_gen.go index 2b7a0ab25..cf6d846e2 100644 --- a/internal/aws/lakeformation/principal_permissions_resource_gen.go +++ b/internal/aws/lakeformation/principal_permissions_resource_gen.go @@ -860,6 +860,7 @@ func principalPermissionsResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -878,7 +879,6 @@ func principalPermissionsResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::LakeFormation::PrincipalPermissions").WithTerraformTypeName("awscc_lakeformation_principal_permissions") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "catalog": "Catalog", "catalog_id": "CatalogId", diff --git a/internal/aws/lakeformation/tag_association_resource_gen.go b/internal/aws/lakeformation/tag_association_resource_gen.go index 30fcbea04..9fa2860dd 100644 --- a/internal/aws/lakeformation/tag_association_resource_gen.go +++ b/internal/aws/lakeformation/tag_association_resource_gen.go @@ -370,6 +370,7 @@ func tagAssociationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -388,7 +389,6 @@ func tagAssociationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LakeFormation::TagAssociation").WithTerraformTypeName("awscc_lakeformation_tag_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "catalog": "Catalog", "catalog_id": "CatalogId", diff --git a/internal/aws/lakeformation/tag_resource_gen.go b/internal/aws/lakeformation/tag_resource_gen.go index 3699db136..736cc1cab 100644 --- a/internal/aws/lakeformation/tag_resource_gen.go +++ b/internal/aws/lakeformation/tag_resource_gen.go @@ -104,6 +104,7 @@ func tagResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -122,7 +123,6 @@ func tagResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LakeFormation::Tag").WithTerraformTypeName("awscc_lakeformation_tag") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "catalog_id": "CatalogId", "tag_key": "TagKey", diff --git a/internal/aws/lambda/code_signing_config_resource_gen.go b/internal/aws/lambda/code_signing_config_resource_gen.go index b9928a4d8..26a2b0828 100644 --- a/internal/aws/lambda/code_signing_config_resource_gen.go +++ b/internal/aws/lambda/code_signing_config_resource_gen.go @@ -174,6 +174,7 @@ func codeSigningConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func codeSigningConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lambda::CodeSigningConfig").WithTerraformTypeName("awscc_lambda_code_signing_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_publishers": "AllowedPublishers", "code_signing_config_arn": "CodeSigningConfigArn", diff --git a/internal/aws/lambda/event_invoke_config_resource_gen.go b/internal/aws/lambda/event_invoke_config_resource_gen.go index a3bb8755d..944716c24 100644 --- a/internal/aws/lambda/event_invoke_config_resource_gen.go +++ b/internal/aws/lambda/event_invoke_config_resource_gen.go @@ -202,6 +202,7 @@ func eventInvokeConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -220,7 +221,6 @@ func eventInvokeConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lambda::EventInvokeConfig").WithTerraformTypeName("awscc_lambda_event_invoke_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "destination": "Destination", "destination_config": "DestinationConfig", diff --git a/internal/aws/lambda/event_source_mapping_resource_gen.go b/internal/aws/lambda/event_source_mapping_resource_gen.go index 47aaf2238..6158bdc87 100644 --- a/internal/aws/lambda/event_source_mapping_resource_gen.go +++ b/internal/aws/lambda/event_source_mapping_resource_gen.go @@ -418,7 +418,7 @@ func eventSourceMappingResource(ctx context.Context) (resource.Resource, error) // "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "event_source_mapping_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Event Source Mapping Identifier UUID.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -870,6 +870,15 @@ func eventSourceMappingResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::Lambda::EventSourceMapping", Version: 1, @@ -880,7 +889,6 @@ func eventSourceMappingResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Lambda::EventSourceMapping").WithTerraformTypeName("awscc_lambda_event_source_mapping") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "amazon_managed_kafka_event_source_config": "AmazonManagedKafkaEventSourceConfig", "batch_size": "BatchSize", @@ -894,12 +902,12 @@ func eventSourceMappingResource(ctx context.Context) (resource.Resource, error) "enabled": "Enabled", "endpoints": "Endpoints", "event_source_arn": "EventSourceArn", + "event_source_mapping_id": "Id", "filter_criteria": "FilterCriteria", "filters": "Filters", "full_document": "FullDocument", "function_name": "FunctionName", "function_response_types": "FunctionResponseTypes", - "id": "Id", "kafka_bootstrap_servers": "KafkaBootstrapServers", "maximum_batching_window_in_seconds": "MaximumBatchingWindowInSeconds", "maximum_concurrency": "MaximumConcurrency", diff --git a/internal/aws/lambda/event_source_mapping_singular_data_source_gen.go b/internal/aws/lambda/event_source_mapping_singular_data_source_gen.go index c0af7f465..4f763b6d3 100644 --- a/internal/aws/lambda/event_source_mapping_singular_data_source_gen.go +++ b/internal/aws/lambda/event_source_mapping_singular_data_source_gen.go @@ -289,7 +289,7 @@ func eventSourceMappingDataSource(ctx context.Context) (datasource.DataSource, e // "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "event_source_mapping_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Event Source Mapping Identifier UUID.", Computed: true, }, /*END ATTRIBUTE*/ @@ -615,12 +615,12 @@ func eventSourceMappingDataSource(ctx context.Context) (datasource.DataSource, e "enabled": "Enabled", "endpoints": "Endpoints", "event_source_arn": "EventSourceArn", + "event_source_mapping_id": "Id", "filter_criteria": "FilterCriteria", "filters": "Filters", "full_document": "FullDocument", "function_name": "FunctionName", "function_response_types": "FunctionResponseTypes", - "id": "Id", "kafka_bootstrap_servers": "KafkaBootstrapServers", "maximum_batching_window_in_seconds": "MaximumBatchingWindowInSeconds", "maximum_concurrency": "MaximumConcurrency", diff --git a/internal/aws/lambda/function_resource_gen.go b/internal/aws/lambda/function_resource_gen.go index 5fde9d159..c392ae6ef 100644 --- a/internal/aws/lambda/function_resource_gen.go +++ b/internal/aws/lambda/function_resource_gen.go @@ -1123,6 +1123,7 @@ func functionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1141,7 +1142,6 @@ func functionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lambda::Function").WithTerraformTypeName("awscc_lambda_function") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_log_level": "ApplicationLogLevel", "apply_on": "ApplyOn", diff --git a/internal/aws/lambda/layer_version_permission_resource_gen.go b/internal/aws/lambda/layer_version_permission_resource_gen.go index 9194e89d7..dc6ce1310 100644 --- a/internal/aws/lambda/layer_version_permission_resource_gen.go +++ b/internal/aws/lambda/layer_version_permission_resource_gen.go @@ -45,7 +45,7 @@ func layerVersionPermissionResource(ctx context.Context) (resource.Resource, err // "description": "ID generated by service", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "layer_version_permission_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ID generated by service", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -98,6 +98,15 @@ func layerVersionPermissionResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Schema for Lambda LayerVersionPermission", Version: 1, @@ -108,13 +117,12 @@ func layerVersionPermissionResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::Lambda::LayerVersionPermission").WithTerraformTypeName("awscc_lambda_layer_version_permission") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "action": "Action", - "id": "Id", - "layer_version_arn": "LayerVersionArn", - "organization_id": "OrganizationId", - "principal": "Principal", + "action": "Action", + "layer_version_arn": "LayerVersionArn", + "layer_version_permission_id": "Id", + "organization_id": "OrganizationId", + "principal": "Principal", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/lambda/layer_version_permission_singular_data_source_gen.go b/internal/aws/lambda/layer_version_permission_singular_data_source_gen.go index f053420ad..1a1cd36fb 100644 --- a/internal/aws/lambda/layer_version_permission_singular_data_source_gen.go +++ b/internal/aws/lambda/layer_version_permission_singular_data_source_gen.go @@ -40,7 +40,7 @@ func layerVersionPermissionDataSource(ctx context.Context) (datasource.DataSourc // "description": "ID generated by service", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "layer_version_permission_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ID generated by service", Computed: true, }, /*END ATTRIBUTE*/ @@ -94,11 +94,11 @@ func layerVersionPermissionDataSource(ctx context.Context) (datasource.DataSourc opts = opts.WithCloudFormationTypeName("AWS::Lambda::LayerVersionPermission").WithTerraformTypeName("awscc_lambda_layer_version_permission") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "action": "Action", - "id": "Id", - "layer_version_arn": "LayerVersionArn", - "organization_id": "OrganizationId", - "principal": "Principal", + "action": "Action", + "layer_version_arn": "LayerVersionArn", + "layer_version_permission_id": "Id", + "organization_id": "OrganizationId", + "principal": "Principal", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/lambda/permission_resource_gen.go b/internal/aws/lambda/permission_resource_gen.go index b4beab028..00ff34530 100644 --- a/internal/aws/lambda/permission_resource_gen.go +++ b/internal/aws/lambda/permission_resource_gen.go @@ -128,7 +128,7 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^.*$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "permission_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -227,6 +227,15 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The ``AWS::Lambda::Permission`` resource grants an AWS service or another account permission to use a function. You can apply the policy at the function level, or specify a qualifier to restrict access to a single version or alias. If you use a qualifier, the invoker must use the full Amazon Resource Name (ARN) of that version or alias to invoke the function.\n To grant permission to another account, specify the account ID as the ``Principal``. To grant permission to an organization defined in AOlong, specify the organization ID as the ``PrincipalOrgID``. For AWS services, the principal is a domain-style identifier defined by the service, like ``s3.amazonaws.com`` or ``sns.amazonaws.com``. For AWS services, you can also specify the ARN of the associated resource as the ``SourceArn``. If you grant permission to a service principal without specifying the source, other accounts could potentially configure resources in their account to invoke your Lambda function.\n If your function has a fu", Version: 1, @@ -237,13 +246,12 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lambda::Permission").WithTerraformTypeName("awscc_lambda_permission") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "event_source_token": "EventSourceToken", "function_name": "FunctionName", "function_url_auth_type": "FunctionUrlAuthType", - "id": "Id", + "permission_id": "Id", "principal": "Principal", "principal_org_id": "PrincipalOrgID", "source_account": "SourceAccount", diff --git a/internal/aws/lambda/permission_singular_data_source_gen.go b/internal/aws/lambda/permission_singular_data_source_gen.go index 87faa607c..836b416da 100644 --- a/internal/aws/lambda/permission_singular_data_source_gen.go +++ b/internal/aws/lambda/permission_singular_data_source_gen.go @@ -89,7 +89,7 @@ func permissionDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^.*$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "permission_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -170,7 +170,7 @@ func permissionDataSource(ctx context.Context) (datasource.DataSource, error) { "event_source_token": "EventSourceToken", "function_name": "FunctionName", "function_url_auth_type": "FunctionUrlAuthType", - "id": "Id", + "permission_id": "Id", "principal": "Principal", "principal_org_id": "PrincipalOrgID", "source_account": "SourceAccount", diff --git a/internal/aws/lambda/url_resource_gen.go b/internal/aws/lambda/url_resource_gen.go index bbc4b0029..61483c6a5 100644 --- a/internal/aws/lambda/url_resource_gen.go +++ b/internal/aws/lambda/url_resource_gen.go @@ -321,6 +321,7 @@ func urlResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -339,7 +340,6 @@ func urlResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lambda::Url").WithTerraformTypeName("awscc_lambda_url") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_credentials": "AllowCredentials", "allow_headers": "AllowHeaders", diff --git a/internal/aws/lambda/version_resource_gen.go b/internal/aws/lambda/version_resource_gen.go index 22217432a..d7f62fa78 100644 --- a/internal/aws/lambda/version_resource_gen.go +++ b/internal/aws/lambda/version_resource_gen.go @@ -202,6 +202,7 @@ func versionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -220,7 +221,6 @@ func versionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lambda::Version").WithTerraformTypeName("awscc_lambda_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "code_sha_256": "CodeSha256", "description": "Description", diff --git a/internal/aws/lex/bot_alias_resource_gen.go b/internal/aws/lex/bot_alias_resource_gen.go index c05e7f048..67357ad2b 100644 --- a/internal/aws/lex/bot_alias_resource_gen.go +++ b/internal/aws/lex/bot_alias_resource_gen.go @@ -652,6 +652,7 @@ func botAliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -670,7 +671,6 @@ func botAliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lex::BotAlias").WithTerraformTypeName("awscc_lex_bot_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "audio_log_settings": "AudioLogSettings", diff --git a/internal/aws/lex/bot_resource_gen.go b/internal/aws/lex/bot_resource_gen.go index 7d36d38b6..d15b96163 100644 --- a/internal/aws/lex/bot_resource_gen.go +++ b/internal/aws/lex/bot_resource_gen.go @@ -9466,7 +9466,7 @@ func botResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[0-9a-zA-Z]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "bot_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of resource", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -10050,6 +10050,15 @@ func botResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Amazon Lex conversational bot performing automated tasks such as ordering a pizza, booking a hotel, and so on.", Version: 1, @@ -10060,7 +10069,6 @@ func botResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lex::Bot").WithTerraformTypeName("awscc_lex_bot") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "active": "Active", "advanced_recognition_setting": "AdvancedRecognitionSetting", @@ -10078,6 +10086,7 @@ func botResource(ctx context.Context) (resource.Resource, error) { "bot_alias_locale_setting": "BotAliasLocaleSetting", "bot_alias_locale_settings": "BotAliasLocaleSettings", "bot_file_s3_location": "BotFileS3Location", + "bot_id": "Id", "bot_locales": "BotLocales", "bot_tags": "BotTags", "buttons": "Buttons", @@ -10114,7 +10123,6 @@ func botResource(ctx context.Context) (resource.Resource, error) { "fulfillment_code_hook": "FulfillmentCodeHook", "fulfillment_updates_specification": "FulfillmentUpdatesSpecification", "grammar_slot_type_setting": "GrammarSlotTypeSetting", - "id": "Id", "idle_session_ttl_in_seconds": "IdleSessionTTLInSeconds", "image_response_card": "ImageResponseCard", "image_url": "ImageUrl", diff --git a/internal/aws/lex/bot_singular_data_source_gen.go b/internal/aws/lex/bot_singular_data_source_gen.go index af26e41ce..d82f9406b 100644 --- a/internal/aws/lex/bot_singular_data_source_gen.go +++ b/internal/aws/lex/bot_singular_data_source_gen.go @@ -7329,7 +7329,7 @@ func botDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[0-9a-zA-Z]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "bot_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique ID of resource", Computed: true, }, /*END ATTRIBUTE*/ @@ -7842,6 +7842,7 @@ func botDataSource(ctx context.Context) (datasource.DataSource, error) { "bot_alias_locale_setting": "BotAliasLocaleSetting", "bot_alias_locale_settings": "BotAliasLocaleSettings", "bot_file_s3_location": "BotFileS3Location", + "bot_id": "Id", "bot_locales": "BotLocales", "bot_tags": "BotTags", "buttons": "Buttons", @@ -7878,7 +7879,6 @@ func botDataSource(ctx context.Context) (datasource.DataSource, error) { "fulfillment_code_hook": "FulfillmentCodeHook", "fulfillment_updates_specification": "FulfillmentUpdatesSpecification", "grammar_slot_type_setting": "GrammarSlotTypeSetting", - "id": "Id", "idle_session_ttl_in_seconds": "IdleSessionTTLInSeconds", "image_response_card": "ImageResponseCard", "image_url": "ImageUrl", diff --git a/internal/aws/lex/bot_version_resource_gen.go b/internal/aws/lex/bot_version_resource_gen.go index 3032bf085..adc51c447 100644 --- a/internal/aws/lex/bot_version_resource_gen.go +++ b/internal/aws/lex/bot_version_resource_gen.go @@ -163,6 +163,7 @@ func botVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -181,7 +182,6 @@ func botVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lex::BotVersion").WithTerraformTypeName("awscc_lex_bot_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bot_id": "BotId", "bot_version": "BotVersion", diff --git a/internal/aws/lex/resource_policy_resource_gen.go b/internal/aws/lex/resource_policy_resource_gen.go index 25157a1d6..847a60ac0 100644 --- a/internal/aws/lex/resource_policy_resource_gen.go +++ b/internal/aws/lex/resource_policy_resource_gen.go @@ -34,7 +34,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { // "description": "The Physical ID of the resource policy.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resource_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Physical ID of the resource policy.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -88,6 +88,15 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "A resource policy with specified policy statements that attaches to a Lex bot or bot alias.", Version: 1, @@ -98,12 +107,11 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lex::ResourcePolicy").WithTerraformTypeName("awscc_lex_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "policy": "Policy", - "resource_arn": "ResourceArn", - "revision_id": "RevisionId", + "policy": "Policy", + "resource_arn": "ResourceArn", + "resource_policy_id": "Id", + "revision_id": "RevisionId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/lex/resource_policy_singular_data_source_gen.go b/internal/aws/lex/resource_policy_singular_data_source_gen.go index f0d691efc..53d04b3d5 100644 --- a/internal/aws/lex/resource_policy_singular_data_source_gen.go +++ b/internal/aws/lex/resource_policy_singular_data_source_gen.go @@ -30,7 +30,7 @@ func resourcePolicyDataSource(ctx context.Context) (datasource.DataSource, error // "description": "The Physical ID of the resource policy.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resource_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The Physical ID of the resource policy.", Computed: true, }, /*END ATTRIBUTE*/ @@ -90,10 +90,10 @@ func resourcePolicyDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::Lex::ResourcePolicy").WithTerraformTypeName("awscc_lex_resource_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "policy": "Policy", - "resource_arn": "ResourceArn", - "revision_id": "RevisionId", + "policy": "Policy", + "resource_arn": "ResourceArn", + "resource_policy_id": "Id", + "revision_id": "RevisionId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/licensemanager/grant_resource_gen.go b/internal/aws/licensemanager/grant_resource_gen.go index c48112715..7d765db4c 100644 --- a/internal/aws/licensemanager/grant_resource_gen.go +++ b/internal/aws/licensemanager/grant_resource_gen.go @@ -171,6 +171,7 @@ func grantResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -189,7 +190,6 @@ func grantResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LicenseManager::Grant").WithTerraformTypeName("awscc_licensemanager_grant") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_operations": "AllowedOperations", "grant_arn": "GrantArn", diff --git a/internal/aws/licensemanager/license_resource_gen.go b/internal/aws/licensemanager/license_resource_gen.go index 609137ccb..c759de2bc 100644 --- a/internal/aws/licensemanager/license_resource_gen.go +++ b/internal/aws/licensemanager/license_resource_gen.go @@ -435,6 +435,7 @@ func licenseResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -453,7 +454,6 @@ func licenseResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LicenseManager::License").WithTerraformTypeName("awscc_licensemanager_license") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_check_in": "AllowCheckIn", "allow_early_check_in": "AllowEarlyCheckIn", diff --git a/internal/aws/lightsail/alarm_resource_gen.go b/internal/aws/lightsail/alarm_resource_gen.go index beca73ca6..611a6a03b 100644 --- a/internal/aws/lightsail/alarm_resource_gen.go +++ b/internal/aws/lightsail/alarm_resource_gen.go @@ -225,6 +225,7 @@ func alarmResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -243,7 +244,6 @@ func alarmResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Alarm").WithTerraformTypeName("awscc_lightsail_alarm") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarm_arn": "AlarmArn", "alarm_name": "AlarmName", diff --git a/internal/aws/lightsail/bucket_resource_gen.go b/internal/aws/lightsail/bucket_resource_gen.go index d04c37be9..185cb9dda 100644 --- a/internal/aws/lightsail/bucket_resource_gen.go +++ b/internal/aws/lightsail/bucket_resource_gen.go @@ -271,6 +271,7 @@ func bucketResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -289,7 +290,6 @@ func bucketResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Bucket").WithTerraformTypeName("awscc_lightsail_bucket") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "able_to_update_bundle": "AbleToUpdateBundle", "access_rules": "AccessRules", diff --git a/internal/aws/lightsail/certificate_resource_gen.go b/internal/aws/lightsail/certificate_resource_gen.go index 51935a07f..92209830a 100644 --- a/internal/aws/lightsail/certificate_resource_gen.go +++ b/internal/aws/lightsail/certificate_resource_gen.go @@ -169,6 +169,7 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -187,7 +188,6 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Certificate").WithTerraformTypeName("awscc_lightsail_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_arn": "CertificateArn", "certificate_name": "CertificateName", diff --git a/internal/aws/lightsail/container_resource_gen.go b/internal/aws/lightsail/container_resource_gen.go index 4327d9086..6e35c8040 100644 --- a/internal/aws/lightsail/container_resource_gen.go +++ b/internal/aws/lightsail/container_resource_gen.go @@ -647,6 +647,7 @@ func containerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -665,7 +666,6 @@ func containerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Container").WithTerraformTypeName("awscc_lightsail_container") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_name": "CertificateName", "command": "Command", diff --git a/internal/aws/lightsail/database_resource_gen.go b/internal/aws/lightsail/database_resource_gen.go index 8738ccc26..765f90d7f 100644 --- a/internal/aws/lightsail/database_resource_gen.go +++ b/internal/aws/lightsail/database_resource_gen.go @@ -469,6 +469,7 @@ func databaseResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -487,7 +488,6 @@ func databaseResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Database").WithTerraformTypeName("awscc_lightsail_database") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_values": "AllowedValues", "apply_method": "ApplyMethod", diff --git a/internal/aws/lightsail/disk_resource_gen.go b/internal/aws/lightsail/disk_resource_gen.go index f53a0d10f..dda9cd611 100644 --- a/internal/aws/lightsail/disk_resource_gen.go +++ b/internal/aws/lightsail/disk_resource_gen.go @@ -434,6 +434,7 @@ func diskResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -452,7 +453,6 @@ func diskResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Disk").WithTerraformTypeName("awscc_lightsail_disk") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "add_on_type": "AddOnType", "add_ons": "AddOns", diff --git a/internal/aws/lightsail/distribution_resource_gen.go b/internal/aws/lightsail/distribution_resource_gen.go index 397b791ab..3fe3f8982 100644 --- a/internal/aws/lightsail/distribution_resource_gen.go +++ b/internal/aws/lightsail/distribution_resource_gen.go @@ -588,6 +588,7 @@ func distributionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -606,7 +607,6 @@ func distributionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Distribution").WithTerraformTypeName("awscc_lightsail_distribution") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "able_to_update_bundle": "AbleToUpdateBundle", "allowed_http_methods": "AllowedHTTPMethods", diff --git a/internal/aws/lightsail/instance_resource_gen.go b/internal/aws/lightsail/instance_resource_gen.go index 1e81d28fd..145675b41 100644 --- a/internal/aws/lightsail/instance_resource_gen.go +++ b/internal/aws/lightsail/instance_resource_gen.go @@ -907,6 +907,7 @@ func instanceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -925,7 +926,6 @@ func instanceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::Instance").WithTerraformTypeName("awscc_lightsail_instance") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_direction": "AccessDirection", "access_from": "AccessFrom", diff --git a/internal/aws/lightsail/load_balancer_resource_gen.go b/internal/aws/lightsail/load_balancer_resource_gen.go index 73d1c889a..828d71f09 100644 --- a/internal/aws/lightsail/load_balancer_resource_gen.go +++ b/internal/aws/lightsail/load_balancer_resource_gen.go @@ -237,6 +237,7 @@ func loadBalancerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -255,7 +256,6 @@ func loadBalancerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::LoadBalancer").WithTerraformTypeName("awscc_lightsail_load_balancer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attached_instances": "AttachedInstances", "health_check_path": "HealthCheckPath", diff --git a/internal/aws/lightsail/load_balancer_tls_certificate_resource_gen.go b/internal/aws/lightsail/load_balancer_tls_certificate_resource_gen.go index 23009fd82..8f7d2d44e 100644 --- a/internal/aws/lightsail/load_balancer_tls_certificate_resource_gen.go +++ b/internal/aws/lightsail/load_balancer_tls_certificate_resource_gen.go @@ -156,6 +156,7 @@ func loadBalancerTlsCertificateResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -174,7 +175,6 @@ func loadBalancerTlsCertificateResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::Lightsail::LoadBalancerTlsCertificate").WithTerraformTypeName("awscc_lightsail_load_balancer_tls_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_alternative_names": "CertificateAlternativeNames", "certificate_domain_name": "CertificateDomainName", diff --git a/internal/aws/lightsail/static_ip_resource_gen.go b/internal/aws/lightsail/static_ip_resource_gen.go index 32187da74..58e5ac7cd 100644 --- a/internal/aws/lightsail/static_ip_resource_gen.go +++ b/internal/aws/lightsail/static_ip_resource_gen.go @@ -96,6 +96,7 @@ func staticIpResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -114,7 +115,6 @@ func staticIpResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Lightsail::StaticIp").WithTerraformTypeName("awscc_lightsail_static_ip") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attached_to": "AttachedTo", "ip_address": "IpAddress", diff --git a/internal/aws/location/api_key_resource_gen.go b/internal/aws/location/api_key_resource_gen.go index 1a6bcce3b..b3c166c2a 100644 --- a/internal/aws/location/api_key_resource_gen.go +++ b/internal/aws/location/api_key_resource_gen.go @@ -359,6 +359,7 @@ func aPIKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -377,7 +378,6 @@ func aPIKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Location::APIKey").WithTerraformTypeName("awscc_location_api_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_actions": "AllowActions", "allow_referers": "AllowReferers", diff --git a/internal/aws/location/geofence_collection_resource_gen.go b/internal/aws/location/geofence_collection_resource_gen.go index 19819d364..5ef7c32ce 100644 --- a/internal/aws/location/geofence_collection_resource_gen.go +++ b/internal/aws/location/geofence_collection_resource_gen.go @@ -248,6 +248,7 @@ func geofenceCollectionResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -266,7 +267,6 @@ func geofenceCollectionResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Location::GeofenceCollection").WithTerraformTypeName("awscc_location_geofence_collection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "collection_arn": "CollectionArn", diff --git a/internal/aws/location/map_resource_gen.go b/internal/aws/location/map_resource_gen.go index a7a7f3785..4a2fa0037 100644 --- a/internal/aws/location/map_resource_gen.go +++ b/internal/aws/location/map_resource_gen.go @@ -298,6 +298,7 @@ func mapResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -316,7 +317,6 @@ func mapResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Location::Map").WithTerraformTypeName("awscc_location_map") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "configuration": "Configuration", diff --git a/internal/aws/location/place_index_resource_gen.go b/internal/aws/location/place_index_resource_gen.go index 4bd22ed00..0a77485f5 100644 --- a/internal/aws/location/place_index_resource_gen.go +++ b/internal/aws/location/place_index_resource_gen.go @@ -268,6 +268,7 @@ func placeIndexResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -286,7 +287,6 @@ func placeIndexResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Location::PlaceIndex").WithTerraformTypeName("awscc_location_place_index") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "create_time": "CreateTime", diff --git a/internal/aws/location/route_calculator_resource_gen.go b/internal/aws/location/route_calculator_resource_gen.go index e14bc8d78..22910a87b 100644 --- a/internal/aws/location/route_calculator_resource_gen.go +++ b/internal/aws/location/route_calculator_resource_gen.go @@ -228,6 +228,7 @@ func routeCalculatorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -246,7 +247,6 @@ func routeCalculatorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Location::RouteCalculator").WithTerraformTypeName("awscc_location_route_calculator") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "calculator_arn": "CalculatorArn", diff --git a/internal/aws/location/tracker_consumer_resource_gen.go b/internal/aws/location/tracker_consumer_resource_gen.go index 033d24bd7..7838aad8d 100644 --- a/internal/aws/location/tracker_consumer_resource_gen.go +++ b/internal/aws/location/tracker_consumer_resource_gen.go @@ -66,6 +66,7 @@ func trackerConsumerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -84,7 +85,6 @@ func trackerConsumerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Location::TrackerConsumer").WithTerraformTypeName("awscc_location_tracker_consumer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "consumer_arn": "ConsumerArn", "tracker_name": "TrackerName", diff --git a/internal/aws/location/tracker_resource_gen.go b/internal/aws/location/tracker_resource_gen.go index 758b94c57..58d28c5ad 100644 --- a/internal/aws/location/tracker_resource_gen.go +++ b/internal/aws/location/tracker_resource_gen.go @@ -300,6 +300,7 @@ func trackerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -318,7 +319,6 @@ func trackerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Location::Tracker").WithTerraformTypeName("awscc_location_tracker") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "create_time": "CreateTime", diff --git a/internal/aws/logs/account_policy_resource_gen.go b/internal/aws/logs/account_policy_resource_gen.go index 8410b7e2e..b546ed3e1 100644 --- a/internal/aws/logs/account_policy_resource_gen.go +++ b/internal/aws/logs/account_policy_resource_gen.go @@ -143,6 +143,7 @@ func accountPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -161,7 +162,6 @@ func accountPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::AccountPolicy").WithTerraformTypeName("awscc_logs_account_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "policy_document": "PolicyDocument", diff --git a/internal/aws/logs/delivery_destination_resource_gen.go b/internal/aws/logs/delivery_destination_resource_gen.go index f9e8a28bf..8af62a16e 100644 --- a/internal/aws/logs/delivery_destination_resource_gen.go +++ b/internal/aws/logs/delivery_destination_resource_gen.go @@ -187,6 +187,7 @@ func deliveryDestinationResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -205,7 +206,6 @@ func deliveryDestinationResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Logs::DeliveryDestination").WithTerraformTypeName("awscc_logs_delivery_destination") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "delivery_destination_policy": "DeliveryDestinationPolicy", diff --git a/internal/aws/logs/delivery_resource_gen.go b/internal/aws/logs/delivery_resource_gen.go index 37e65a498..bc3f90749 100644 --- a/internal/aws/logs/delivery_resource_gen.go +++ b/internal/aws/logs/delivery_resource_gen.go @@ -182,6 +182,7 @@ func deliveryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -200,7 +201,6 @@ func deliveryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::Delivery").WithTerraformTypeName("awscc_logs_delivery") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "delivery_destination_arn": "DeliveryDestinationArn", diff --git a/internal/aws/logs/delivery_source_resource_gen.go b/internal/aws/logs/delivery_source_resource_gen.go index f5e987447..4fadcf55f 100644 --- a/internal/aws/logs/delivery_source_resource_gen.go +++ b/internal/aws/logs/delivery_source_resource_gen.go @@ -214,6 +214,7 @@ func deliverySourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -232,7 +233,6 @@ func deliverySourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::DeliverySource").WithTerraformTypeName("awscc_logs_delivery_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/logs/destination_resource_gen.go b/internal/aws/logs/destination_resource_gen.go index d58ad33a3..f13c880bb 100644 --- a/internal/aws/logs/destination_resource_gen.go +++ b/internal/aws/logs/destination_resource_gen.go @@ -111,6 +111,7 @@ func destinationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -129,7 +130,6 @@ func destinationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::Destination").WithTerraformTypeName("awscc_logs_destination") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "destination_name": "DestinationName", diff --git a/internal/aws/logs/log_anomaly_detector_resource_gen.go b/internal/aws/logs/log_anomaly_detector_resource_gen.go index 0af5df30c..cbd8a4714 100644 --- a/internal/aws/logs/log_anomaly_detector_resource_gen.go +++ b/internal/aws/logs/log_anomaly_detector_resource_gen.go @@ -228,6 +228,7 @@ func logAnomalyDetectorResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -246,7 +247,6 @@ func logAnomalyDetectorResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Logs::LogAnomalyDetector").WithTerraformTypeName("awscc_logs_log_anomaly_detector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "anomaly_detector_arn": "AnomalyDetectorArn", diff --git a/internal/aws/logs/log_group_resource_gen.go b/internal/aws/logs/log_group_resource_gen.go index 4077c841d..04b251d4e 100644 --- a/internal/aws/logs/log_group_resource_gen.go +++ b/internal/aws/logs/log_group_resource_gen.go @@ -256,6 +256,7 @@ func logGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -274,7 +275,6 @@ func logGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::LogGroup").WithTerraformTypeName("awscc_logs_log_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "data_protection_policy": "DataProtectionPolicy", diff --git a/internal/aws/logs/log_stream_resource_gen.go b/internal/aws/logs/log_stream_resource_gen.go index 14c66d41a..a9e4d647e 100644 --- a/internal/aws/logs/log_stream_resource_gen.go +++ b/internal/aws/logs/log_stream_resource_gen.go @@ -56,6 +56,7 @@ func logStreamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -74,7 +75,6 @@ func logStreamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::LogStream").WithTerraformTypeName("awscc_logs_log_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "log_group_name": "LogGroupName", "log_stream_name": "LogStreamName", diff --git a/internal/aws/logs/metric_filter_resource_gen.go b/internal/aws/logs/metric_filter_resource_gen.go index 1bf2af9fb..861464a17 100644 --- a/internal/aws/logs/metric_filter_resource_gen.go +++ b/internal/aws/logs/metric_filter_resource_gen.go @@ -325,6 +325,7 @@ func metricFilterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -343,7 +344,6 @@ func metricFilterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::MetricFilter").WithTerraformTypeName("awscc_logs_metric_filter") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "default_value": "DefaultValue", "dimensions": "Dimensions", diff --git a/internal/aws/logs/query_definition_resource_gen.go b/internal/aws/logs/query_definition_resource_gen.go index ea761ffa9..1361d8a55 100644 --- a/internal/aws/logs/query_definition_resource_gen.go +++ b/internal/aws/logs/query_definition_resource_gen.go @@ -111,6 +111,7 @@ func queryDefinitionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -129,7 +130,6 @@ func queryDefinitionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::QueryDefinition").WithTerraformTypeName("awscc_logs_query_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "log_group_names": "LogGroupNames", "name": "Name", diff --git a/internal/aws/logs/resource_policy_resource_gen.go b/internal/aws/logs/resource_policy_resource_gen.go index f1110aeaa..25c3e1fbb 100644 --- a/internal/aws/logs/resource_policy_resource_gen.go +++ b/internal/aws/logs/resource_policy_resource_gen.go @@ -67,6 +67,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -85,7 +86,6 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Logs::ResourcePolicy").WithTerraformTypeName("awscc_logs_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy_document": "PolicyDocument", "policy_name": "PolicyName", diff --git a/internal/aws/lookoutequipment/inference_scheduler_resource_gen.go b/internal/aws/lookoutequipment/inference_scheduler_resource_gen.go index ff8d875f6..353a9de77 100644 --- a/internal/aws/lookoutequipment/inference_scheduler_resource_gen.go +++ b/internal/aws/lookoutequipment/inference_scheduler_resource_gen.go @@ -472,6 +472,7 @@ func inferenceSchedulerResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -490,7 +491,6 @@ func inferenceSchedulerResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::LookoutEquipment::InferenceScheduler").WithTerraformTypeName("awscc_lookoutequipment_inference_scheduler") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "component_timestamp_delimiter": "ComponentTimestampDelimiter", diff --git a/internal/aws/lookoutmetrics/alert_resource_gen.go b/internal/aws/lookoutmetrics/alert_resource_gen.go index b8eb91cf3..5f1ba5570 100644 --- a/internal/aws/lookoutmetrics/alert_resource_gen.go +++ b/internal/aws/lookoutmetrics/alert_resource_gen.go @@ -255,6 +255,7 @@ func alertResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -273,7 +274,6 @@ func alertResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LookoutMetrics::Alert").WithTerraformTypeName("awscc_lookoutmetrics_alert") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "alert_description": "AlertDescription", diff --git a/internal/aws/lookoutmetrics/anomaly_detector_resource_gen.go b/internal/aws/lookoutmetrics/anomaly_detector_resource_gen.go index 4d03d5ee2..d637ecbed 100644 --- a/internal/aws/lookoutmetrics/anomaly_detector_resource_gen.go +++ b/internal/aws/lookoutmetrics/anomaly_detector_resource_gen.go @@ -1169,6 +1169,7 @@ func anomalyDetectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1187,7 +1188,6 @@ func anomalyDetectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LookoutMetrics::AnomalyDetector").WithTerraformTypeName("awscc_lookoutmetrics_anomaly_detector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation_function": "AggregationFunction", "anomaly_detector_config": "AnomalyDetectorConfig", diff --git a/internal/aws/lookoutvision/project_resource_gen.go b/internal/aws/lookoutvision/project_resource_gen.go index 91f703358..da5bc16cb 100644 --- a/internal/aws/lookoutvision/project_resource_gen.go +++ b/internal/aws/lookoutvision/project_resource_gen.go @@ -63,6 +63,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -81,7 +82,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::LookoutVision::Project").WithTerraformTypeName("awscc_lookoutvision_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "project_name": "ProjectName", diff --git a/internal/aws/m2/application_resource_gen.go b/internal/aws/m2/application_resource_gen.go index 4d1cfecc3..f08812061 100644 --- a/internal/aws/m2/application_resource_gen.go +++ b/internal/aws/m2/application_resource_gen.go @@ -213,6 +213,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -231,7 +232,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::M2::Application").WithTerraformTypeName("awscc_m2_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_arn": "ApplicationArn", "application_id": "ApplicationId", diff --git a/internal/aws/m2/environment_resource_gen.go b/internal/aws/m2/environment_resource_gen.go index 7a848d99a..2608af68b 100644 --- a/internal/aws/m2/environment_resource_gen.go +++ b/internal/aws/m2/environment_resource_gen.go @@ -458,6 +458,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -476,7 +477,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::M2::Environment").WithTerraformTypeName("awscc_m2_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "desired_capacity": "DesiredCapacity", diff --git a/internal/aws/macie/allow_list_resource_gen.go b/internal/aws/macie/allow_list_resource_gen.go index 98e27dcfa..7bf4926fd 100644 --- a/internal/aws/macie/allow_list_resource_gen.go +++ b/internal/aws/macie/allow_list_resource_gen.go @@ -126,7 +126,7 @@ func allowListResource(ctx context.Context) (resource.Resource, error) { // "description": "AllowList ID.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "allow_list_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "AllowList ID.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -220,6 +220,15 @@ func allowListResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Macie AllowList resource schema", Version: 1, @@ -230,13 +239,12 @@ func allowListResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Macie::AllowList").WithTerraformTypeName("awscc_macie_allow_list") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ + "allow_list_id": "Id", "arn": "Arn", "bucket_name": "BucketName", "criteria": "Criteria", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", "object_key": "ObjectKey", diff --git a/internal/aws/macie/allow_list_singular_data_source_gen.go b/internal/aws/macie/allow_list_singular_data_source_gen.go index dc103a91d..d35fa70e0 100644 --- a/internal/aws/macie/allow_list_singular_data_source_gen.go +++ b/internal/aws/macie/allow_list_singular_data_source_gen.go @@ -107,7 +107,7 @@ func allowListDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "AllowList ID.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "allow_list_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "AllowList ID.", Computed: true, }, /*END ATTRIBUTE*/ @@ -205,11 +205,11 @@ func allowListDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::Macie::AllowList").WithTerraformTypeName("awscc_macie_allow_list") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ + "allow_list_id": "Id", "arn": "Arn", "bucket_name": "BucketName", "criteria": "Criteria", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", "object_key": "ObjectKey", diff --git a/internal/aws/macie/custom_data_identifier_resource_gen.go b/internal/aws/macie/custom_data_identifier_resource_gen.go index 0115456fa..7f9395ba7 100644 --- a/internal/aws/macie/custom_data_identifier_resource_gen.go +++ b/internal/aws/macie/custom_data_identifier_resource_gen.go @@ -64,7 +64,7 @@ func customDataIdentifierResource(ctx context.Context) (resource.Resource, error // "description": "Custom data identifier ID.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "custom_data_identifier_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Custom data identifier ID.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -207,6 +207,15 @@ func customDataIdentifierResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Macie CustomDataIdentifier resource schema", Version: 1, @@ -217,19 +226,18 @@ func customDataIdentifierResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::Macie::CustomDataIdentifier").WithTerraformTypeName("awscc_macie_custom_data_identifier") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "description": "Description", - "id": "Id", - "ignore_words": "IgnoreWords", - "key": "Key", - "keywords": "Keywords", - "maximum_match_distance": "MaximumMatchDistance", - "name": "Name", - "regex": "Regex", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "custom_data_identifier_id": "Id", + "description": "Description", + "ignore_words": "IgnoreWords", + "key": "Key", + "keywords": "Keywords", + "maximum_match_distance": "MaximumMatchDistance", + "name": "Name", + "regex": "Regex", + "tags": "Tags", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/macie/custom_data_identifier_singular_data_source_gen.go b/internal/aws/macie/custom_data_identifier_singular_data_source_gen.go index 04bf912ac..6ed085bf2 100644 --- a/internal/aws/macie/custom_data_identifier_singular_data_source_gen.go +++ b/internal/aws/macie/custom_data_identifier_singular_data_source_gen.go @@ -52,7 +52,7 @@ func customDataIdentifierDataSource(ctx context.Context) (datasource.DataSource, // "description": "Custom data identifier ID.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "custom_data_identifier_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Custom data identifier ID.", Computed: true, }, /*END ATTRIBUTE*/ @@ -181,17 +181,17 @@ func customDataIdentifierDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithCloudFormationTypeName("AWS::Macie::CustomDataIdentifier").WithTerraformTypeName("awscc_macie_custom_data_identifier") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "description": "Description", - "id": "Id", - "ignore_words": "IgnoreWords", - "key": "Key", - "keywords": "Keywords", - "maximum_match_distance": "MaximumMatchDistance", - "name": "Name", - "regex": "Regex", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "custom_data_identifier_id": "Id", + "description": "Description", + "ignore_words": "IgnoreWords", + "key": "Key", + "keywords": "Keywords", + "maximum_match_distance": "MaximumMatchDistance", + "name": "Name", + "regex": "Regex", + "tags": "Tags", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/macie/findings_filter_resource_gen.go b/internal/aws/macie/findings_filter_resource_gen.go index d741c4774..77ca1a202 100644 --- a/internal/aws/macie/findings_filter_resource_gen.go +++ b/internal/aws/macie/findings_filter_resource_gen.go @@ -212,7 +212,7 @@ func findingsFilterResource(ctx context.Context) (resource.Resource, error) { // "description": "Findings filter ID.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "findings_filter_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Findings filter ID.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -297,6 +297,15 @@ func findingsFilterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Macie FindingsFilter resource schema.", Version: 1, @@ -307,25 +316,24 @@ func findingsFilterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Macie::FindingsFilter").WithTerraformTypeName("awscc_macie_findings_filter") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "action": "Action", - "arn": "Arn", - "criterion": "Criterion", - "description": "Description", - "eq": "eq", - "finding_criteria": "FindingCriteria", - "gt": "gt", - "gte": "gte", - "id": "Id", - "key": "Key", - "lt": "lt", - "lte": "lte", - "name": "Name", - "neq": "neq", - "position": "Position", - "tags": "Tags", - "value": "Value", + "action": "Action", + "arn": "Arn", + "criterion": "Criterion", + "description": "Description", + "eq": "eq", + "finding_criteria": "FindingCriteria", + "findings_filter_id": "Id", + "gt": "gt", + "gte": "gte", + "key": "Key", + "lt": "lt", + "lte": "lte", + "name": "Name", + "neq": "neq", + "position": "Position", + "tags": "Tags", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/macie/findings_filter_singular_data_source_gen.go b/internal/aws/macie/findings_filter_singular_data_source_gen.go index 62cba572a..eb1cb9a83 100644 --- a/internal/aws/macie/findings_filter_singular_data_source_gen.go +++ b/internal/aws/macie/findings_filter_singular_data_source_gen.go @@ -160,7 +160,7 @@ func findingsFilterDataSource(ctx context.Context) (datasource.DataSource, error // "description": "Findings filter ID.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "findings_filter_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Findings filter ID.", Computed: true, }, /*END ATTRIBUTE*/ @@ -248,23 +248,23 @@ func findingsFilterDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::Macie::FindingsFilter").WithTerraformTypeName("awscc_macie_findings_filter") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "action": "Action", - "arn": "Arn", - "criterion": "Criterion", - "description": "Description", - "eq": "eq", - "finding_criteria": "FindingCriteria", - "gt": "gt", - "gte": "gte", - "id": "Id", - "key": "Key", - "lt": "lt", - "lte": "lte", - "name": "Name", - "neq": "neq", - "position": "Position", - "tags": "Tags", - "value": "Value", + "action": "Action", + "arn": "Arn", + "criterion": "Criterion", + "description": "Description", + "eq": "eq", + "finding_criteria": "FindingCriteria", + "findings_filter_id": "Id", + "gt": "gt", + "gte": "gte", + "key": "Key", + "lt": "lt", + "lte": "lte", + "name": "Name", + "neq": "neq", + "position": "Position", + "tags": "Tags", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/macie/session_resource_gen.go b/internal/aws/macie/session_resource_gen.go index 3aec92ca9..b06b3a102 100644 --- a/internal/aws/macie/session_resource_gen.go +++ b/internal/aws/macie/session_resource_gen.go @@ -112,6 +112,7 @@ func sessionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -130,7 +131,6 @@ func sessionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Macie::Session").WithTerraformTypeName("awscc_macie_session") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aws_account_id": "AwsAccountId", "finding_publishing_frequency": "FindingPublishingFrequency", diff --git a/internal/aws/managedblockchain/accessor_resource_gen.go b/internal/aws/managedblockchain/accessor_resource_gen.go index ec56ff3dd..023844ba1 100644 --- a/internal/aws/managedblockchain/accessor_resource_gen.go +++ b/internal/aws/managedblockchain/accessor_resource_gen.go @@ -97,7 +97,7 @@ func accessorResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "accessor_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -217,6 +217,15 @@ func accessorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Definition of AWS::ManagedBlockchain::com.amazonaws.taiga.webservice.api#Accessor Resource Type", Version: 1, @@ -227,13 +236,12 @@ func accessorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ManagedBlockchain::Accessor").WithTerraformTypeName("awscc_managedblockchain_accessor") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ + "accessor_id": "Id", "accessor_type": "AccessorType", "arn": "Arn", "billing_token": "BillingToken", "creation_date": "CreationDate", - "id": "Id", "key": "Key", "network_type": "NetworkType", "status": "Status", diff --git a/internal/aws/managedblockchain/accessor_singular_data_source_gen.go b/internal/aws/managedblockchain/accessor_singular_data_source_gen.go index 0e5cc9311..427b659f4 100644 --- a/internal/aws/managedblockchain/accessor_singular_data_source_gen.go +++ b/internal/aws/managedblockchain/accessor_singular_data_source_gen.go @@ -74,7 +74,7 @@ func accessorDataSource(ctx context.Context) (datasource.DataSource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "accessor_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: NetworkType @@ -175,11 +175,11 @@ func accessorDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::ManagedBlockchain::Accessor").WithTerraformTypeName("awscc_managedblockchain_accessor") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ + "accessor_id": "Id", "accessor_type": "AccessorType", "arn": "Arn", "billing_token": "BillingToken", "creation_date": "CreationDate", - "id": "Id", "key": "Key", "network_type": "NetworkType", "status": "Status", diff --git a/internal/aws/mediaconnect/bridge_output_resource_gen.go b/internal/aws/mediaconnect/bridge_output_resource_gen.go index 06c43a8a1..a9d8738db 100644 --- a/internal/aws/mediaconnect/bridge_output_resource_gen.go +++ b/internal/aws/mediaconnect/bridge_output_resource_gen.go @@ -136,6 +136,7 @@ func bridgeOutputResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -154,7 +155,6 @@ func bridgeOutputResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::BridgeOutput").WithTerraformTypeName("awscc_mediaconnect_bridge_output") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bridge_arn": "BridgeArn", "ip_address": "IpAddress", diff --git a/internal/aws/mediaconnect/bridge_resource_gen.go b/internal/aws/mediaconnect/bridge_resource_gen.go index 696ca4c78..71d02fba1 100644 --- a/internal/aws/mediaconnect/bridge_resource_gen.go +++ b/internal/aws/mediaconnect/bridge_resource_gen.go @@ -559,6 +559,7 @@ func bridgeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -577,7 +578,6 @@ func bridgeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::Bridge").WithTerraformTypeName("awscc_mediaconnect_bridge") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bridge_arn": "BridgeArn", "bridge_state": "BridgeState", diff --git a/internal/aws/mediaconnect/bridge_source_resource_gen.go b/internal/aws/mediaconnect/bridge_source_resource_gen.go index af36c0b9f..55f2b39b0 100644 --- a/internal/aws/mediaconnect/bridge_source_resource_gen.go +++ b/internal/aws/mediaconnect/bridge_source_resource_gen.go @@ -194,6 +194,7 @@ func bridgeSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -212,7 +213,6 @@ func bridgeSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::BridgeSource").WithTerraformTypeName("awscc_mediaconnect_bridge_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bridge_arn": "BridgeArn", "flow_arn": "FlowArn", diff --git a/internal/aws/mediaconnect/flow_entitlement_resource_gen.go b/internal/aws/mediaconnect/flow_entitlement_resource_gen.go index e98289bdd..3b17884b6 100644 --- a/internal/aws/mediaconnect/flow_entitlement_resource_gen.go +++ b/internal/aws/mediaconnect/flow_entitlement_resource_gen.go @@ -296,6 +296,7 @@ func flowEntitlementResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -314,7 +315,6 @@ func flowEntitlementResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::FlowEntitlement").WithTerraformTypeName("awscc_mediaconnect_flow_entitlement") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm": "Algorithm", "constant_initialization_vector": "ConstantInitializationVector", diff --git a/internal/aws/mediaconnect/flow_output_resource_gen.go b/internal/aws/mediaconnect/flow_output_resource_gen.go index 057ffb71e..f92e9dfba 100644 --- a/internal/aws/mediaconnect/flow_output_resource_gen.go +++ b/internal/aws/mediaconnect/flow_output_resource_gen.go @@ -370,6 +370,7 @@ func flowOutputResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -388,7 +389,6 @@ func flowOutputResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::FlowOutput").WithTerraformTypeName("awscc_mediaconnect_flow_output") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm": "Algorithm", "cidr_allow_list": "CidrAllowList", diff --git a/internal/aws/mediaconnect/flow_resource_gen.go b/internal/aws/mediaconnect/flow_resource_gen.go index 49fede492..715261b37 100644 --- a/internal/aws/mediaconnect/flow_resource_gen.go +++ b/internal/aws/mediaconnect/flow_resource_gen.go @@ -688,6 +688,7 @@ func flowResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -706,7 +707,6 @@ func flowResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::Flow").WithTerraformTypeName("awscc_mediaconnect_flow") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm": "Algorithm", "availability_zone": "AvailabilityZone", diff --git a/internal/aws/mediaconnect/flow_source_resource_gen.go b/internal/aws/mediaconnect/flow_source_resource_gen.go index 1224e02ca..28e627c13 100644 --- a/internal/aws/mediaconnect/flow_source_resource_gen.go +++ b/internal/aws/mediaconnect/flow_source_resource_gen.go @@ -554,6 +554,7 @@ func flowSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -572,7 +573,6 @@ func flowSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::FlowSource").WithTerraformTypeName("awscc_mediaconnect_flow_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm": "Algorithm", "bridge_arn": "BridgeArn", diff --git a/internal/aws/mediaconnect/flow_vpc_interface_resource_gen.go b/internal/aws/mediaconnect/flow_vpc_interface_resource_gen.go index 5783dd3f4..d4b4df82b 100644 --- a/internal/aws/mediaconnect/flow_vpc_interface_resource_gen.go +++ b/internal/aws/mediaconnect/flow_vpc_interface_resource_gen.go @@ -111,6 +111,7 @@ func flowVpcInterfaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -129,7 +130,6 @@ func flowVpcInterfaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::FlowVpcInterface").WithTerraformTypeName("awscc_mediaconnect_flow_vpc_interface") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "flow_arn": "FlowArn", "name": "Name", diff --git a/internal/aws/mediaconnect/gateway_resource_gen.go b/internal/aws/mediaconnect/gateway_resource_gen.go index a20094953..6fdb24e09 100644 --- a/internal/aws/mediaconnect/gateway_resource_gen.go +++ b/internal/aws/mediaconnect/gateway_resource_gen.go @@ -152,6 +152,7 @@ func gatewayResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -170,7 +171,6 @@ func gatewayResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaConnect::Gateway").WithTerraformTypeName("awscc_mediaconnect_gateway") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cidr_block": "CidrBlock", "egress_cidr_blocks": "EgressCidrBlocks", diff --git a/internal/aws/medialive/multiplex_resource_gen.go b/internal/aws/medialive/multiplex_resource_gen.go index 224222054..7a904e314 100644 --- a/internal/aws/medialive/multiplex_resource_gen.go +++ b/internal/aws/medialive/multiplex_resource_gen.go @@ -134,7 +134,7 @@ func multiplexResource(ctx context.Context) (resource.Resource, error) { // "description": "The unique id of the multiplex.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "multiplex_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique id of the multiplex.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -339,6 +339,15 @@ func multiplexResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::MediaLive::Multiplex", Version: 1, @@ -349,26 +358,25 @@ func multiplexResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaLive::Multiplex").WithTerraformTypeName("awscc_medialive_multiplex") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "availability_zones": "AvailabilityZones", "destinations": "Destinations", "entitlement_arn": "EntitlementArn", - "id": "Id", "key": "Key", - "maximum_video_buffer_delay_milliseconds": "MaximumVideoBufferDelayMilliseconds", + "maximum_video_buffer_delay_milliseconds": "MaximumVideoBufferDelayMilliseconds", + "multiplex_id": "Id", "multiplex_media_connect_output_destination_settings": "MultiplexMediaConnectOutputDestinationSettings", - "multiplex_settings": "MultiplexSettings", - "name": "Name", - "pipelines_running_count": "PipelinesRunningCount", - "program_count": "ProgramCount", - "state": "State", - "tags": "Tags", - "transport_stream_bitrate": "TransportStreamBitrate", - "transport_stream_id": "TransportStreamId", - "transport_stream_reserved_bitrate": "TransportStreamReservedBitrate", - "value": "Value", + "multiplex_settings": "MultiplexSettings", + "name": "Name", + "pipelines_running_count": "PipelinesRunningCount", + "program_count": "ProgramCount", + "state": "State", + "tags": "Tags", + "transport_stream_bitrate": "TransportStreamBitrate", + "transport_stream_id": "TransportStreamId", + "transport_stream_reserved_bitrate": "TransportStreamReservedBitrate", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/medialive/multiplex_singular_data_source_gen.go b/internal/aws/medialive/multiplex_singular_data_source_gen.go index 7c5d8f2b9..662c0718c 100644 --- a/internal/aws/medialive/multiplex_singular_data_source_gen.go +++ b/internal/aws/medialive/multiplex_singular_data_source_gen.go @@ -103,7 +103,7 @@ func multiplexDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "The unique id of the multiplex.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "multiplex_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique id of the multiplex.", Computed: true, }, /*END ATTRIBUTE*/ @@ -282,20 +282,20 @@ func multiplexDataSource(ctx context.Context) (datasource.DataSource, error) { "availability_zones": "AvailabilityZones", "destinations": "Destinations", "entitlement_arn": "EntitlementArn", - "id": "Id", "key": "Key", - "maximum_video_buffer_delay_milliseconds": "MaximumVideoBufferDelayMilliseconds", + "maximum_video_buffer_delay_milliseconds": "MaximumVideoBufferDelayMilliseconds", + "multiplex_id": "Id", "multiplex_media_connect_output_destination_settings": "MultiplexMediaConnectOutputDestinationSettings", - "multiplex_settings": "MultiplexSettings", - "name": "Name", - "pipelines_running_count": "PipelinesRunningCount", - "program_count": "ProgramCount", - "state": "State", - "tags": "Tags", - "transport_stream_bitrate": "TransportStreamBitrate", - "transport_stream_id": "TransportStreamId", - "transport_stream_reserved_bitrate": "TransportStreamReservedBitrate", - "value": "Value", + "multiplex_settings": "MultiplexSettings", + "name": "Name", + "pipelines_running_count": "PipelinesRunningCount", + "program_count": "ProgramCount", + "state": "State", + "tags": "Tags", + "transport_stream_bitrate": "TransportStreamBitrate", + "transport_stream_id": "TransportStreamId", + "transport_stream_reserved_bitrate": "TransportStreamReservedBitrate", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/medialive/multiplexprogram_resource_gen.go b/internal/aws/medialive/multiplexprogram_resource_gen.go index e17b0534b..149b5572d 100644 --- a/internal/aws/medialive/multiplexprogram_resource_gen.go +++ b/internal/aws/medialive/multiplexprogram_resource_gen.go @@ -563,6 +563,7 @@ func multiplexprogramResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -581,7 +582,6 @@ func multiplexprogramResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaLive::Multiplexprogram").WithTerraformTypeName("awscc_medialive_multiplexprogram") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "active_channel_pipeline": "ActiveChannelPipeline", "audio_pids": "AudioPids", diff --git a/internal/aws/mediapackage/asset_resource_gen.go b/internal/aws/mediapackage/asset_resource_gen.go index 0dde0be5a..f0c7e81f9 100644 --- a/internal/aws/mediapackage/asset_resource_gen.go +++ b/internal/aws/mediapackage/asset_resource_gen.go @@ -110,7 +110,7 @@ func assetResource(ctx context.Context) (resource.Resource, error) { // "description": "The unique identifier for the Asset.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "asset_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier for the Asset.", Required: true, }, /*END ATTRIBUTE*/ @@ -211,6 +211,15 @@ func assetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::MediaPackage::Asset", Version: 1, @@ -221,12 +230,11 @@ func assetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackage::Asset").WithTerraformTypeName("awscc_mediapackage_asset") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", + "asset_id": "Id", "created_at": "CreatedAt", "egress_endpoints": "EgressEndpoints", - "id": "Id", "key": "Key", "packaging_configuration_id": "PackagingConfigurationId", "packaging_group_id": "PackagingGroupId", diff --git a/internal/aws/mediapackage/asset_singular_data_source_gen.go b/internal/aws/mediapackage/asset_singular_data_source_gen.go index 412fe2944..fceb260c6 100644 --- a/internal/aws/mediapackage/asset_singular_data_source_gen.go +++ b/internal/aws/mediapackage/asset_singular_data_source_gen.go @@ -95,7 +95,7 @@ func assetDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "The unique identifier for the Asset.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "asset_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier for the Asset.", Computed: true, }, /*END ATTRIBUTE*/ @@ -201,9 +201,9 @@ func assetDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", + "asset_id": "Id", "created_at": "CreatedAt", "egress_endpoints": "EgressEndpoints", - "id": "Id", "key": "Key", "packaging_configuration_id": "PackagingConfigurationId", "packaging_group_id": "PackagingGroupId", diff --git a/internal/aws/mediapackage/channel_resource_gen.go b/internal/aws/mediapackage/channel_resource_gen.go index b7eee9fd6..94650d68c 100644 --- a/internal/aws/mediapackage/channel_resource_gen.go +++ b/internal/aws/mediapackage/channel_resource_gen.go @@ -193,7 +193,7 @@ func channelResource(ctx context.Context) (resource.Resource, error) { // "pattern": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "channel_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the Channel.", Required: true, Validators: []validator.String{ /*START VALIDATORS*/ @@ -292,6 +292,15 @@ func channelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::MediaPackage::Channel", Version: 1, @@ -302,9 +311,9 @@ func channelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackage::Channel").WithTerraformTypeName("awscc_mediapackage_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", + "channel_id": "Id", "description": "Description", "egress_access_logs": "EgressAccessLogs", "hls_ingest": "HlsIngest", diff --git a/internal/aws/mediapackage/channel_singular_data_source_gen.go b/internal/aws/mediapackage/channel_singular_data_source_gen.go index 28a8a42f5..08e082f44 100644 --- a/internal/aws/mediapackage/channel_singular_data_source_gen.go +++ b/internal/aws/mediapackage/channel_singular_data_source_gen.go @@ -160,7 +160,7 @@ func channelDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "channel_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the Channel.", Computed: true, }, /*END ATTRIBUTE*/ @@ -250,6 +250,7 @@ func channelDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", + "channel_id": "Id", "description": "Description", "egress_access_logs": "EgressAccessLogs", "hls_ingest": "HlsIngest", diff --git a/internal/aws/mediapackage/origin_endpoint_resource_gen.go b/internal/aws/mediapackage/origin_endpoint_resource_gen.go index e973596cc..9c707661a 100644 --- a/internal/aws/mediapackage/origin_endpoint_resource_gen.go +++ b/internal/aws/mediapackage/origin_endpoint_resource_gen.go @@ -1784,7 +1784,7 @@ func originEndpointResource(ctx context.Context) (resource.Resource, error) { // "pattern": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "origin_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the OriginEndpoint.", Required: true, Validators: []validator.String{ /*START VALIDATORS*/ @@ -2237,6 +2237,15 @@ func originEndpointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::MediaPackage::OriginEndpoint", Version: 1, @@ -2247,7 +2256,6 @@ func originEndpointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackage::OriginEndpoint").WithTerraformTypeName("awscc_mediapackage_origin_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "ad_markers": "AdMarkers", "ad_triggers": "AdTriggers", @@ -2279,6 +2287,7 @@ func originEndpointResource(ctx context.Context) (resource.Resource, error) { "min_update_period_seconds": "MinUpdatePeriodSeconds", "min_video_bits_per_second": "MinVideoBitsPerSecond", "mss_package": "MssPackage", + "origin_endpoint_id": "Id", "origination": "Origination", "period_triggers": "PeriodTriggers", "playlist_type": "PlaylistType", diff --git a/internal/aws/mediapackage/origin_endpoint_singular_data_source_gen.go b/internal/aws/mediapackage/origin_endpoint_singular_data_source_gen.go index dab3fd45a..2659e3222 100644 --- a/internal/aws/mediapackage/origin_endpoint_singular_data_source_gen.go +++ b/internal/aws/mediapackage/origin_endpoint_singular_data_source_gen.go @@ -1254,7 +1254,7 @@ func originEndpointDataSource(ctx context.Context) (datasource.DataSource, error // "pattern": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "origin_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the OriginEndpoint.", Computed: true, }, /*END ATTRIBUTE*/ @@ -1640,6 +1640,7 @@ func originEndpointDataSource(ctx context.Context) (datasource.DataSource, error "min_update_period_seconds": "MinUpdatePeriodSeconds", "min_video_bits_per_second": "MinVideoBitsPerSecond", "mss_package": "MssPackage", + "origin_endpoint_id": "Id", "origination": "Origination", "period_triggers": "PeriodTriggers", "playlist_type": "PlaylistType", diff --git a/internal/aws/mediapackage/packaging_configuration_resource_gen.go b/internal/aws/mediapackage/packaging_configuration_resource_gen.go index 43dbe8307..0d933ff8d 100644 --- a/internal/aws/mediapackage/packaging_configuration_resource_gen.go +++ b/internal/aws/mediapackage/packaging_configuration_resource_gen.go @@ -1289,7 +1289,7 @@ func packagingConfigurationResource(ctx context.Context) (resource.Resource, err // "description": "The ID of the PackagingConfiguration.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "packaging_configuration_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the PackagingConfiguration.", Required: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -1647,6 +1647,15 @@ func packagingConfigurationResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::MediaPackage::PackagingConfiguration", Version: 1, @@ -1657,7 +1666,6 @@ func packagingConfigurationResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::MediaPackage::PackagingConfiguration").WithTerraformTypeName("awscc_mediapackage_packaging_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "ad_markers": "AdMarkers", "arn": "Arn", @@ -1670,7 +1678,6 @@ func packagingConfigurationResource(ctx context.Context) (resource.Resource, err "encryption_method": "EncryptionMethod", "hls_manifests": "HlsManifests", "hls_package": "HlsPackage", - "id": "Id", "include_dvb_subtitles": "IncludeDvbSubtitles", "include_encoder_configuration_in_segments": "IncludeEncoderConfigurationInSegments", "include_iframe_only_stream": "IncludeIframeOnlyStream", @@ -1682,6 +1689,7 @@ func packagingConfigurationResource(ctx context.Context) (resource.Resource, err "min_video_bits_per_second": "MinVideoBitsPerSecond", "mss_manifests": "MssManifests", "mss_package": "MssPackage", + "packaging_configuration_id": "Id", "packaging_group_id": "PackagingGroupId", "period_triggers": "PeriodTriggers", "preset_speke_20_audio": "PresetSpeke20Audio", diff --git a/internal/aws/mediapackage/packaging_configuration_singular_data_source_gen.go b/internal/aws/mediapackage/packaging_configuration_singular_data_source_gen.go index bf92b7b82..d861db04d 100644 --- a/internal/aws/mediapackage/packaging_configuration_singular_data_source_gen.go +++ b/internal/aws/mediapackage/packaging_configuration_singular_data_source_gen.go @@ -943,7 +943,7 @@ func packagingConfigurationDataSource(ctx context.Context) (datasource.DataSourc // "description": "The ID of the PackagingConfiguration.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "packaging_configuration_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the PackagingConfiguration.", Computed: true, }, /*END ATTRIBUTE*/ @@ -1251,7 +1251,6 @@ func packagingConfigurationDataSource(ctx context.Context) (datasource.DataSourc "encryption_method": "EncryptionMethod", "hls_manifests": "HlsManifests", "hls_package": "HlsPackage", - "id": "Id", "include_dvb_subtitles": "IncludeDvbSubtitles", "include_encoder_configuration_in_segments": "IncludeEncoderConfigurationInSegments", "include_iframe_only_stream": "IncludeIframeOnlyStream", @@ -1263,6 +1262,7 @@ func packagingConfigurationDataSource(ctx context.Context) (datasource.DataSourc "min_video_bits_per_second": "MinVideoBitsPerSecond", "mss_manifests": "MssManifests", "mss_package": "MssPackage", + "packaging_configuration_id": "Id", "packaging_group_id": "PackagingGroupId", "period_triggers": "PeriodTriggers", "preset_speke_20_audio": "PresetSpeke20Audio", diff --git a/internal/aws/mediapackage/packaging_group_resource_gen.go b/internal/aws/mediapackage/packaging_group_resource_gen.go index f6785a969..dd524b1db 100644 --- a/internal/aws/mediapackage/packaging_group_resource_gen.go +++ b/internal/aws/mediapackage/packaging_group_resource_gen.go @@ -148,7 +148,7 @@ func packagingGroupResource(ctx context.Context) (resource.Resource, error) { // "pattern": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "packaging_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the PackagingGroup.", Required: true, Validators: []validator.String{ /*START VALIDATORS*/ @@ -208,6 +208,15 @@ func packagingGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::MediaPackage::PackagingGroup", Version: 1, @@ -218,16 +227,15 @@ func packagingGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackage::PackagingGroup").WithTerraformTypeName("awscc_mediapackage_packaging_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "authorization": "Authorization", "cdn_identifier_secret": "CdnIdentifierSecret", "domain_name": "DomainName", "egress_access_logs": "EgressAccessLogs", - "id": "Id", "key": "Key", "log_group_name": "LogGroupName", + "packaging_group_id": "Id", "secrets_role_arn": "SecretsRoleArn", "tags": "Tags", "value": "Value", diff --git a/internal/aws/mediapackage/packaging_group_singular_data_source_gen.go b/internal/aws/mediapackage/packaging_group_singular_data_source_gen.go index 71d1ace60..ca12ae59f 100644 --- a/internal/aws/mediapackage/packaging_group_singular_data_source_gen.go +++ b/internal/aws/mediapackage/packaging_group_singular_data_source_gen.go @@ -120,7 +120,7 @@ func packagingGroupDataSource(ctx context.Context) (datasource.DataSource, error // "pattern": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "packaging_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the PackagingGroup.", Computed: true, }, /*END ATTRIBUTE*/ @@ -186,9 +186,9 @@ func packagingGroupDataSource(ctx context.Context) (datasource.DataSource, error "cdn_identifier_secret": "CdnIdentifierSecret", "domain_name": "DomainName", "egress_access_logs": "EgressAccessLogs", - "id": "Id", "key": "Key", "log_group_name": "LogGroupName", + "packaging_group_id": "Id", "secrets_role_arn": "SecretsRoleArn", "tags": "Tags", "value": "Value", diff --git a/internal/aws/mediapackagev2/channel_group_resource_gen.go b/internal/aws/mediapackagev2/channel_group_resource_gen.go index 3271cfdad..7ade3dc2d 100644 --- a/internal/aws/mediapackagev2/channel_group_resource_gen.go +++ b/internal/aws/mediapackagev2/channel_group_resource_gen.go @@ -177,6 +177,7 @@ func channelGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -195,7 +196,6 @@ func channelGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackageV2::ChannelGroup").WithTerraformTypeName("awscc_mediapackagev2_channel_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "channel_group_name": "ChannelGroupName", diff --git a/internal/aws/mediapackagev2/channel_policy_resource_gen.go b/internal/aws/mediapackagev2/channel_policy_resource_gen.go index d06094ae9..a41b5d959 100644 --- a/internal/aws/mediapackagev2/channel_policy_resource_gen.go +++ b/internal/aws/mediapackagev2/channel_policy_resource_gen.go @@ -76,6 +76,7 @@ func channelPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -94,7 +95,6 @@ func channelPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackageV2::ChannelPolicy").WithTerraformTypeName("awscc_mediapackagev2_channel_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "channel_group_name": "ChannelGroupName", "channel_name": "ChannelName", diff --git a/internal/aws/mediapackagev2/channel_resource_gen.go b/internal/aws/mediapackagev2/channel_resource_gen.go index 89701c2ab..e4d794fd2 100644 --- a/internal/aws/mediapackagev2/channel_resource_gen.go +++ b/internal/aws/mediapackagev2/channel_resource_gen.go @@ -225,6 +225,7 @@ func channelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -243,7 +244,6 @@ func channelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackageV2::Channel").WithTerraformTypeName("awscc_mediapackagev2_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "channel_group_name": "ChannelGroupName", diff --git a/internal/aws/mediapackagev2/origin_endpoint_policy_resource_gen.go b/internal/aws/mediapackagev2/origin_endpoint_policy_resource_gen.go index 4a15b56a3..6a179d187 100644 --- a/internal/aws/mediapackagev2/origin_endpoint_policy_resource_gen.go +++ b/internal/aws/mediapackagev2/origin_endpoint_policy_resource_gen.go @@ -95,6 +95,7 @@ func originEndpointPolicyResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -113,7 +114,6 @@ func originEndpointPolicyResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::MediaPackageV2::OriginEndpointPolicy").WithTerraformTypeName("awscc_mediapackagev2_origin_endpoint_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "channel_group_name": "ChannelGroupName", "channel_name": "ChannelName", diff --git a/internal/aws/mediapackagev2/origin_endpoint_resource_gen.go b/internal/aws/mediapackagev2/origin_endpoint_resource_gen.go index c85bc1750..65c00c7a7 100644 --- a/internal/aws/mediapackagev2/origin_endpoint_resource_gen.go +++ b/internal/aws/mediapackagev2/origin_endpoint_resource_gen.go @@ -1148,6 +1148,7 @@ func originEndpointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1166,7 +1167,6 @@ func originEndpointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaPackageV2::OriginEndpoint").WithTerraformTypeName("awscc_mediapackagev2_origin_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "ad_marker_hls": "AdMarkerHls", "arn": "Arn", diff --git a/internal/aws/mediatailor/channel_policy_resource_gen.go b/internal/aws/mediatailor/channel_policy_resource_gen.go index 8e837a7e7..db42c6615 100644 --- a/internal/aws/mediatailor/channel_policy_resource_gen.go +++ b/internal/aws/mediatailor/channel_policy_resource_gen.go @@ -49,6 +49,7 @@ func channelPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -67,7 +68,6 @@ func channelPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaTailor::ChannelPolicy").WithTerraformTypeName("awscc_mediatailor_channel_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "channel_name": "ChannelName", "policy": "Policy", diff --git a/internal/aws/mediatailor/channel_resource_gen.go b/internal/aws/mediatailor/channel_resource_gen.go index 34ec03974..4ccc95572 100644 --- a/internal/aws/mediatailor/channel_resource_gen.go +++ b/internal/aws/mediatailor/channel_resource_gen.go @@ -454,6 +454,7 @@ func channelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -472,7 +473,6 @@ func channelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaTailor::Channel").WithTerraformTypeName("awscc_mediatailor_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "ad_markup_type": "AdMarkupType", "arn": "Arn", diff --git a/internal/aws/mediatailor/live_source_resource_gen.go b/internal/aws/mediatailor/live_source_resource_gen.go index e22a19e35..2ce5d2c80 100644 --- a/internal/aws/mediatailor/live_source_resource_gen.go +++ b/internal/aws/mediatailor/live_source_resource_gen.go @@ -174,6 +174,7 @@ func liveSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func liveSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaTailor::LiveSource").WithTerraformTypeName("awscc_mediatailor_live_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "http_package_configurations": "HttpPackageConfigurations", diff --git a/internal/aws/mediatailor/vod_source_resource_gen.go b/internal/aws/mediatailor/vod_source_resource_gen.go index ac9829dbc..624a98b00 100644 --- a/internal/aws/mediatailor/vod_source_resource_gen.go +++ b/internal/aws/mediatailor/vod_source_resource_gen.go @@ -174,6 +174,7 @@ func vodSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -192,7 +193,6 @@ func vodSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MediaTailor::VodSource").WithTerraformTypeName("awscc_mediatailor_vod_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "http_package_configurations": "HttpPackageConfigurations", diff --git a/internal/aws/memorydb/acl_resource_gen.go b/internal/aws/memorydb/acl_resource_gen.go index 6e5a74678..37380c115 100644 --- a/internal/aws/memorydb/acl_resource_gen.go +++ b/internal/aws/memorydb/acl_resource_gen.go @@ -175,6 +175,7 @@ func aCLResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -193,7 +194,6 @@ func aCLResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MemoryDB::ACL").WithTerraformTypeName("awscc_memorydb_acl") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acl_name": "ACLName", "arn": "Arn", diff --git a/internal/aws/memorydb/cluster_resource_gen.go b/internal/aws/memorydb/cluster_resource_gen.go index 6af8cc20c..f896f1020 100644 --- a/internal/aws/memorydb/cluster_resource_gen.go +++ b/internal/aws/memorydb/cluster_resource_gen.go @@ -566,6 +566,7 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -584,7 +585,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MemoryDB::Cluster").WithTerraformTypeName("awscc_memorydb_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acl_name": "ACLName", "address": "Address", diff --git a/internal/aws/memorydb/parameter_group_resource_gen.go b/internal/aws/memorydb/parameter_group_resource_gen.go index 861ef48ed..877709a84 100644 --- a/internal/aws/memorydb/parameter_group_resource_gen.go +++ b/internal/aws/memorydb/parameter_group_resource_gen.go @@ -172,6 +172,7 @@ func parameterGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -190,7 +191,6 @@ func parameterGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MemoryDB::ParameterGroup").WithTerraformTypeName("awscc_memorydb_parameter_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "ARN", "description": "Description", diff --git a/internal/aws/memorydb/subnet_group_resource_gen.go b/internal/aws/memorydb/subnet_group_resource_gen.go index 36a377b85..82829ad18 100644 --- a/internal/aws/memorydb/subnet_group_resource_gen.go +++ b/internal/aws/memorydb/subnet_group_resource_gen.go @@ -162,6 +162,7 @@ func subnetGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -180,7 +181,6 @@ func subnetGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MemoryDB::SubnetGroup").WithTerraformTypeName("awscc_memorydb_subnet_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "ARN", "description": "Description", diff --git a/internal/aws/memorydb/user_resource_gen.go b/internal/aws/memorydb/user_resource_gen.go index 8cabb3907..a161a1daf 100644 --- a/internal/aws/memorydb/user_resource_gen.go +++ b/internal/aws/memorydb/user_resource_gen.go @@ -235,6 +235,7 @@ func userResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -253,7 +254,6 @@ func userResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MemoryDB::User").WithTerraformTypeName("awscc_memorydb_user") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_string": "AccessString", "arn": "Arn", diff --git a/internal/aws/msk/batch_scram_secret_resource_gen.go b/internal/aws/msk/batch_scram_secret_resource_gen.go index 3a1512169..09fcb3381 100644 --- a/internal/aws/msk/batch_scram_secret_resource_gen.go +++ b/internal/aws/msk/batch_scram_secret_resource_gen.go @@ -59,6 +59,7 @@ func batchScramSecretResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -77,7 +78,6 @@ func batchScramSecretResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::BatchScramSecret").WithTerraformTypeName("awscc_msk_batch_scram_secret") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster_arn": "ClusterArn", "secret_arn_list": "SecretArnList", diff --git a/internal/aws/msk/cluster_policy_resource_gen.go b/internal/aws/msk/cluster_policy_resource_gen.go index 2360676d2..9a42e87a9 100644 --- a/internal/aws/msk/cluster_policy_resource_gen.go +++ b/internal/aws/msk/cluster_policy_resource_gen.go @@ -69,6 +69,7 @@ func clusterPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -87,7 +88,6 @@ func clusterPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::ClusterPolicy").WithTerraformTypeName("awscc_msk_cluster_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster_arn": "ClusterArn", "current_version": "CurrentVersion", diff --git a/internal/aws/msk/cluster_resource_gen.go b/internal/aws/msk/cluster_resource_gen.go index d6114af1e..3c809b9c7 100644 --- a/internal/aws/msk/cluster_resource_gen.go +++ b/internal/aws/msk/cluster_resource_gen.go @@ -1053,6 +1053,7 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1071,7 +1072,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::Cluster").WithTerraformTypeName("awscc_msk_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "broker_az_distribution": "BrokerAZDistribution", diff --git a/internal/aws/msk/configuration_resource_gen.go b/internal/aws/msk/configuration_resource_gen.go index e3a9f1854..4d2970429 100644 --- a/internal/aws/msk/configuration_resource_gen.go +++ b/internal/aws/msk/configuration_resource_gen.go @@ -145,6 +145,7 @@ func configurationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -163,7 +164,6 @@ func configurationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::Configuration").WithTerraformTypeName("awscc_msk_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", diff --git a/internal/aws/msk/replicator_resource_gen.go b/internal/aws/msk/replicator_resource_gen.go index 77312c8ff..0263e7202 100644 --- a/internal/aws/msk/replicator_resource_gen.go +++ b/internal/aws/msk/replicator_resource_gen.go @@ -635,6 +635,7 @@ func replicatorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -653,7 +654,6 @@ func replicatorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::Replicator").WithTerraformTypeName("awscc_msk_replicator") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "amazon_msk_cluster": "AmazonMskCluster", "consumer_group_replication": "ConsumerGroupReplication", diff --git a/internal/aws/msk/serverless_cluster_resource_gen.go b/internal/aws/msk/serverless_cluster_resource_gen.go index 88541b84c..c68bd4ce9 100644 --- a/internal/aws/msk/serverless_cluster_resource_gen.go +++ b/internal/aws/msk/serverless_cluster_resource_gen.go @@ -199,6 +199,7 @@ func serverlessClusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -217,7 +218,6 @@ func serverlessClusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::ServerlessCluster").WithTerraformTypeName("awscc_msk_serverless_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "client_authentication": "ClientAuthentication", diff --git a/internal/aws/msk/vpc_connection_resource_gen.go b/internal/aws/msk/vpc_connection_resource_gen.go index dac79d33e..4bc0d02e3 100644 --- a/internal/aws/msk/vpc_connection_resource_gen.go +++ b/internal/aws/msk/vpc_connection_resource_gen.go @@ -163,6 +163,7 @@ func vpcConnectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -181,7 +182,6 @@ func vpcConnectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MSK::VpcConnection").WithTerraformTypeName("awscc_msk_vpc_connection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "authentication": "Authentication", diff --git a/internal/aws/mwaa/environment_resource_gen.go b/internal/aws/mwaa/environment_resource_gen.go index c8d3c5077..e9ca44eb7 100644 --- a/internal/aws/mwaa/environment_resource_gen.go +++ b/internal/aws/mwaa/environment_resource_gen.go @@ -1017,6 +1017,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1035,7 +1036,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::MWAA::Environment").WithTerraformTypeName("awscc_mwaa_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "airflow_configuration_options": "AirflowConfigurationOptions", "airflow_version": "AirflowVersion", diff --git a/internal/aws/neptune/db_cluster_resource_gen.go b/internal/aws/neptune/db_cluster_resource_gen.go index 656a4d7da..9159b378a 100644 --- a/internal/aws/neptune/db_cluster_resource_gen.go +++ b/internal/aws/neptune/db_cluster_resource_gen.go @@ -658,6 +658,7 @@ func dBClusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -676,7 +677,6 @@ func dBClusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Neptune::DBCluster").WithTerraformTypeName("awscc_neptune_db_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "associated_roles": "AssociatedRoles", "availability_zones": "AvailabilityZones", diff --git a/internal/aws/neptunegraph/graph_resource_gen.go b/internal/aws/neptunegraph/graph_resource_gen.go index 6ddda63f2..5592f3c8d 100644 --- a/internal/aws/neptunegraph/graph_resource_gen.go +++ b/internal/aws/neptunegraph/graph_resource_gen.go @@ -256,6 +256,7 @@ func graphResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -274,7 +275,6 @@ func graphResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NeptuneGraph::Graph").WithTerraformTypeName("awscc_neptunegraph_graph") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "deletion_protection": "DeletionProtection", "endpoint": "Endpoint", diff --git a/internal/aws/neptunegraph/private_graph_endpoint_resource_gen.go b/internal/aws/neptunegraph/private_graph_endpoint_resource_gen.go index 518c08848..3f86342ae 100644 --- a/internal/aws/neptunegraph/private_graph_endpoint_resource_gen.go +++ b/internal/aws/neptunegraph/private_graph_endpoint_resource_gen.go @@ -130,6 +130,7 @@ func privateGraphEndpointResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -148,7 +149,6 @@ func privateGraphEndpointResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::NeptuneGraph::PrivateGraphEndpoint").WithTerraformTypeName("awscc_neptunegraph_private_graph_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "graph_identifier": "GraphIdentifier", "private_graph_endpoint_identifier": "PrivateGraphEndpointIdentifier", diff --git a/internal/aws/networkfirewall/firewall_policy_resource_gen.go b/internal/aws/networkfirewall/firewall_policy_resource_gen.go index 73240bcc0..c0120c168 100644 --- a/internal/aws/networkfirewall/firewall_policy_resource_gen.go +++ b/internal/aws/networkfirewall/firewall_policy_resource_gen.go @@ -628,6 +628,7 @@ func firewallPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -646,7 +647,6 @@ func firewallPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::FirewallPolicy").WithTerraformTypeName("awscc_networkfirewall_firewall_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "action_definition": "ActionDefinition", diff --git a/internal/aws/networkfirewall/firewall_resource_gen.go b/internal/aws/networkfirewall/firewall_resource_gen.go index 6c4630d12..3e8abd636 100644 --- a/internal/aws/networkfirewall/firewall_resource_gen.go +++ b/internal/aws/networkfirewall/firewall_resource_gen.go @@ -302,6 +302,7 @@ func firewallResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -320,7 +321,6 @@ func firewallResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::Firewall").WithTerraformTypeName("awscc_networkfirewall_firewall") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "delete_protection": "DeleteProtection", "description": "Description", diff --git a/internal/aws/networkfirewall/logging_configuration_resource_gen.go b/internal/aws/networkfirewall/logging_configuration_resource_gen.go index c0010e082..c37e29567 100644 --- a/internal/aws/networkfirewall/logging_configuration_resource_gen.go +++ b/internal/aws/networkfirewall/logging_configuration_resource_gen.go @@ -175,6 +175,7 @@ func loggingConfigurationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -193,7 +194,6 @@ func loggingConfigurationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::LoggingConfiguration").WithTerraformTypeName("awscc_networkfirewall_logging_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "firewall_arn": "FirewallArn", "firewall_name": "FirewallName", diff --git a/internal/aws/networkfirewall/rule_group_resource_gen.go b/internal/aws/networkfirewall/rule_group_resource_gen.go index 13bf67a83..ee4d32e98 100644 --- a/internal/aws/networkfirewall/rule_group_resource_gen.go +++ b/internal/aws/networkfirewall/rule_group_resource_gen.go @@ -1306,6 +1306,7 @@ func ruleGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1324,7 +1325,6 @@ func ruleGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::RuleGroup").WithTerraformTypeName("awscc_networkfirewall_rule_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "action_definition": "ActionDefinition", diff --git a/internal/aws/networkfirewall/tls_inspection_configuration_resource_gen.go b/internal/aws/networkfirewall/tls_inspection_configuration_resource_gen.go index 6b375d04f..c1f877d79 100644 --- a/internal/aws/networkfirewall/tls_inspection_configuration_resource_gen.go +++ b/internal/aws/networkfirewall/tls_inspection_configuration_resource_gen.go @@ -554,6 +554,7 @@ func tLSInspectionConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -572,7 +573,6 @@ func tLSInspectionConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::NetworkFirewall::TLSInspectionConfiguration").WithTerraformTypeName("awscc_networkfirewall_tls_inspection_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address_definition": "AddressDefinition", "certificate_authority_arn": "CertificateAuthorityArn", diff --git a/internal/aws/networkmanager/connect_attachment_resource_gen.go b/internal/aws/networkmanager/connect_attachment_resource_gen.go index 359120eaa..3633ffc15 100644 --- a/internal/aws/networkmanager/connect_attachment_resource_gen.go +++ b/internal/aws/networkmanager/connect_attachment_resource_gen.go @@ -387,6 +387,7 @@ func connectAttachmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -405,7 +406,6 @@ func connectAttachmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::ConnectAttachment").WithTerraformTypeName("awscc_networkmanager_connect_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_id": "AttachmentId", "attachment_policy_rule_number": "AttachmentPolicyRuleNumber", diff --git a/internal/aws/networkmanager/connect_peer_resource_gen.go b/internal/aws/networkmanager/connect_peer_resource_gen.go index e78663892..44c628f41 100644 --- a/internal/aws/networkmanager/connect_peer_resource_gen.go +++ b/internal/aws/networkmanager/connect_peer_resource_gen.go @@ -389,6 +389,7 @@ func connectPeerResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -407,7 +408,6 @@ func connectPeerResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::ConnectPeer").WithTerraformTypeName("awscc_networkmanager_connect_peer") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bgp_configurations": "BgpConfigurations", "bgp_options": "BgpOptions", diff --git a/internal/aws/networkmanager/core_network_resource_gen.go b/internal/aws/networkmanager/core_network_resource_gen.go index 52d319920..004f3de67 100644 --- a/internal/aws/networkmanager/core_network_resource_gen.go +++ b/internal/aws/networkmanager/core_network_resource_gen.go @@ -322,6 +322,7 @@ func coreNetworkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -340,7 +341,6 @@ func coreNetworkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::CoreNetwork").WithTerraformTypeName("awscc_networkmanager_core_network") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "asn": "Asn", "core_network_arn": "CoreNetworkArn", diff --git a/internal/aws/networkmanager/customer_gateway_association_resource_gen.go b/internal/aws/networkmanager/customer_gateway_association_resource_gen.go index 4874488fd..2612904fe 100644 --- a/internal/aws/networkmanager/customer_gateway_association_resource_gen.go +++ b/internal/aws/networkmanager/customer_gateway_association_resource_gen.go @@ -84,6 +84,7 @@ func customerGatewayAssociationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -102,7 +103,6 @@ func customerGatewayAssociationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::CustomerGatewayAssociation").WithTerraformTypeName("awscc_networkmanager_customer_gateway_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "customer_gateway_arn": "CustomerGatewayArn", "device_id": "DeviceId", diff --git a/internal/aws/networkmanager/device_resource_gen.go b/internal/aws/networkmanager/device_resource_gen.go index 8c251db7c..d45a64e65 100644 --- a/internal/aws/networkmanager/device_resource_gen.go +++ b/internal/aws/networkmanager/device_resource_gen.go @@ -343,6 +343,7 @@ func deviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -361,7 +362,6 @@ func deviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::Device").WithTerraformTypeName("awscc_networkmanager_device") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "aws_location": "AWSLocation", diff --git a/internal/aws/networkmanager/global_network_resource_gen.go b/internal/aws/networkmanager/global_network_resource_gen.go index 0fa4a1bfe..8acdb2013 100644 --- a/internal/aws/networkmanager/global_network_resource_gen.go +++ b/internal/aws/networkmanager/global_network_resource_gen.go @@ -76,7 +76,7 @@ func globalNetworkResource(ctx context.Context) (resource.Resource, error) { // "description": "The ID of the global network.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "global_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the global network.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -150,6 +150,15 @@ func globalNetworkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The AWS::NetworkManager::GlobalNetwork type specifies a global network of the user's account", Version: 1, @@ -160,16 +169,15 @@ func globalNetworkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::GlobalNetwork").WithTerraformTypeName("awscc_networkmanager_global_network") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "created_at": "CreatedAt", - "description": "Description", - "id": "Id", - "key": "Key", - "state": "State", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "created_at": "CreatedAt", + "description": "Description", + "global_network_id": "Id", + "key": "Key", + "state": "State", + "tags": "Tags", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/networkmanager/global_network_singular_data_source_gen.go b/internal/aws/networkmanager/global_network_singular_data_source_gen.go index fdec9de15..7003095b5 100644 --- a/internal/aws/networkmanager/global_network_singular_data_source_gen.go +++ b/internal/aws/networkmanager/global_network_singular_data_source_gen.go @@ -62,7 +62,7 @@ func globalNetworkDataSource(ctx context.Context) (datasource.DataSource, error) // "description": "The ID of the global network.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "global_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the global network.", Computed: true, }, /*END ATTRIBUTE*/ @@ -140,14 +140,14 @@ func globalNetworkDataSource(ctx context.Context) (datasource.DataSource, error) opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::GlobalNetwork").WithTerraformTypeName("awscc_networkmanager_global_network") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "created_at": "CreatedAt", - "description": "Description", - "id": "Id", - "key": "Key", - "state": "State", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "created_at": "CreatedAt", + "description": "Description", + "global_network_id": "Id", + "key": "Key", + "state": "State", + "tags": "Tags", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/networkmanager/link_association_resource_gen.go b/internal/aws/networkmanager/link_association_resource_gen.go index 66855ee08..2b03580d6 100644 --- a/internal/aws/networkmanager/link_association_resource_gen.go +++ b/internal/aws/networkmanager/link_association_resource_gen.go @@ -68,6 +68,7 @@ func linkAssociationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -86,7 +87,6 @@ func linkAssociationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::LinkAssociation").WithTerraformTypeName("awscc_networkmanager_link_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "device_id": "DeviceId", "global_network_id": "GlobalNetworkId", diff --git a/internal/aws/networkmanager/site_resource_gen.go b/internal/aws/networkmanager/site_resource_gen.go index 7b77452f1..1a9e9757f 100644 --- a/internal/aws/networkmanager/site_resource_gen.go +++ b/internal/aws/networkmanager/site_resource_gen.go @@ -222,6 +222,7 @@ func siteResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -240,7 +241,6 @@ func siteResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::Site").WithTerraformTypeName("awscc_networkmanager_site") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "created_at": "CreatedAt", diff --git a/internal/aws/networkmanager/site_to_site_vpn_attachment_resource_gen.go b/internal/aws/networkmanager/site_to_site_vpn_attachment_resource_gen.go index d941cdfaa..9bb3876cf 100644 --- a/internal/aws/networkmanager/site_to_site_vpn_attachment_resource_gen.go +++ b/internal/aws/networkmanager/site_to_site_vpn_attachment_resource_gen.go @@ -355,6 +355,7 @@ func siteToSiteVpnAttachmentResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -373,7 +374,6 @@ func siteToSiteVpnAttachmentResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::SiteToSiteVpnAttachment").WithTerraformTypeName("awscc_networkmanager_site_to_site_vpn_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_id": "AttachmentId", "attachment_policy_rule_number": "AttachmentPolicyRuleNumber", diff --git a/internal/aws/networkmanager/transit_gateway_peering_resource_gen.go b/internal/aws/networkmanager/transit_gateway_peering_resource_gen.go index 4d3fa434c..333d82419 100644 --- a/internal/aws/networkmanager/transit_gateway_peering_resource_gen.go +++ b/internal/aws/networkmanager/transit_gateway_peering_resource_gen.go @@ -243,6 +243,7 @@ func transitGatewayPeeringResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -261,7 +262,6 @@ func transitGatewayPeeringResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::TransitGatewayPeering").WithTerraformTypeName("awscc_networkmanager_transit_gateway_peering") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "core_network_arn": "CoreNetworkArn", "core_network_id": "CoreNetworkId", diff --git a/internal/aws/networkmanager/transit_gateway_registration_resource_gen.go b/internal/aws/networkmanager/transit_gateway_registration_resource_gen.go index 3fe2faa9b..97211d67f 100644 --- a/internal/aws/networkmanager/transit_gateway_registration_resource_gen.go +++ b/internal/aws/networkmanager/transit_gateway_registration_resource_gen.go @@ -54,6 +54,7 @@ func transitGatewayRegistrationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -72,7 +73,6 @@ func transitGatewayRegistrationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::TransitGatewayRegistration").WithTerraformTypeName("awscc_networkmanager_transit_gateway_registration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "global_network_id": "GlobalNetworkId", "transit_gateway_arn": "TransitGatewayArn", diff --git a/internal/aws/networkmanager/transit_gateway_route_table_attachment_resource_gen.go b/internal/aws/networkmanager/transit_gateway_route_table_attachment_resource_gen.go index 86c02f6a9..a1311ddf6 100644 --- a/internal/aws/networkmanager/transit_gateway_route_table_attachment_resource_gen.go +++ b/internal/aws/networkmanager/transit_gateway_route_table_attachment_resource_gen.go @@ -371,6 +371,7 @@ func transitGatewayRouteTableAttachmentResource(ctx context.Context) (resource.R }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -389,7 +390,6 @@ func transitGatewayRouteTableAttachmentResource(ctx context.Context) (resource.R opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::TransitGatewayRouteTableAttachment").WithTerraformTypeName("awscc_networkmanager_transit_gateway_route_table_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachment_id": "AttachmentId", "attachment_policy_rule_number": "AttachmentPolicyRuleNumber", diff --git a/internal/aws/networkmanager/vpc_attachment_resource_gen.go b/internal/aws/networkmanager/vpc_attachment_resource_gen.go index 2b5fd3307..189b61d3e 100644 --- a/internal/aws/networkmanager/vpc_attachment_resource_gen.go +++ b/internal/aws/networkmanager/vpc_attachment_resource_gen.go @@ -426,6 +426,7 @@ func vpcAttachmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -444,7 +445,6 @@ func vpcAttachmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NetworkManager::VpcAttachment").WithTerraformTypeName("awscc_networkmanager_vpc_attachment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "appliance_mode_support": "ApplianceModeSupport", "attachment_id": "AttachmentId", diff --git a/internal/aws/nimblestudio/launch_profile_resource_gen.go b/internal/aws/nimblestudio/launch_profile_resource_gen.go index 696c9c4a1..87e74350b 100644 --- a/internal/aws/nimblestudio/launch_profile_resource_gen.go +++ b/internal/aws/nimblestudio/launch_profile_resource_gen.go @@ -624,6 +624,7 @@ func launchProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -642,7 +643,6 @@ func launchProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NimbleStudio::LaunchProfile").WithTerraformTypeName("awscc_nimblestudio_launch_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "automatic_termination_mode": "AutomaticTerminationMode", "clipboard_mode": "ClipboardMode", diff --git a/internal/aws/nimblestudio/streaming_image_resource_gen.go b/internal/aws/nimblestudio/streaming_image_resource_gen.go index 42dc14e23..951a47a7d 100644 --- a/internal/aws/nimblestudio/streaming_image_resource_gen.go +++ b/internal/aws/nimblestudio/streaming_image_resource_gen.go @@ -229,6 +229,7 @@ func streamingImageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -247,7 +248,6 @@ func streamingImageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NimbleStudio::StreamingImage").WithTerraformTypeName("awscc_nimblestudio_streaming_image") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "ec_2_image_id": "Ec2ImageId", diff --git a/internal/aws/nimblestudio/studio_component_resource_gen.go b/internal/aws/nimblestudio/studio_component_resource_gen.go index d97bc2042..4e9773029 100644 --- a/internal/aws/nimblestudio/studio_component_resource_gen.go +++ b/internal/aws/nimblestudio/studio_component_resource_gen.go @@ -708,6 +708,7 @@ func studioComponentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -726,7 +727,6 @@ func studioComponentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NimbleStudio::StudioComponent").WithTerraformTypeName("awscc_nimblestudio_studio_component") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "active_directory_configuration": "ActiveDirectoryConfiguration", "active_directory_user": "ActiveDirectoryUser", diff --git a/internal/aws/nimblestudio/studio_resource_gen.go b/internal/aws/nimblestudio/studio_resource_gen.go index 6785e9059..b3001f984 100644 --- a/internal/aws/nimblestudio/studio_resource_gen.go +++ b/internal/aws/nimblestudio/studio_resource_gen.go @@ -233,6 +233,7 @@ func studioResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -251,7 +252,6 @@ func studioResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::NimbleStudio::Studio").WithTerraformTypeName("awscc_nimblestudio_studio") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "admin_role_arn": "AdminRoleArn", "display_name": "DisplayName", diff --git a/internal/aws/oam/link_resource_gen.go b/internal/aws/oam/link_resource_gen.go index d66fcd49d..8660d3d95 100644 --- a/internal/aws/oam/link_resource_gen.go +++ b/internal/aws/oam/link_resource_gen.go @@ -156,6 +156,7 @@ func linkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -174,7 +175,6 @@ func linkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Oam::Link").WithTerraformTypeName("awscc_oam_link") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "label": "Label", diff --git a/internal/aws/oam/sink_resource_gen.go b/internal/aws/oam/sink_resource_gen.go index 7f9bb8ae9..52b2d0ff5 100644 --- a/internal/aws/oam/sink_resource_gen.go +++ b/internal/aws/oam/sink_resource_gen.go @@ -111,6 +111,7 @@ func sinkResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -129,7 +130,6 @@ func sinkResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Oam::Sink").WithTerraformTypeName("awscc_oam_sink") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "name": "Name", diff --git a/internal/aws/omics/reference_store_resource_gen.go b/internal/aws/omics/reference_store_resource_gen.go index a3e98dd60..daa2e7fe9 100644 --- a/internal/aws/omics/reference_store_resource_gen.go +++ b/internal/aws/omics/reference_store_resource_gen.go @@ -209,6 +209,7 @@ func referenceStoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -227,7 +228,6 @@ func referenceStoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Omics::ReferenceStore").WithTerraformTypeName("awscc_omics_reference_store") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", diff --git a/internal/aws/omics/run_group_resource_gen.go b/internal/aws/omics/run_group_resource_gen.go index f32e6de06..fece6f753 100644 --- a/internal/aws/omics/run_group_resource_gen.go +++ b/internal/aws/omics/run_group_resource_gen.go @@ -70,7 +70,7 @@ func runGroupResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[0-9]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "run_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -196,6 +196,15 @@ func runGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Definition of AWS::Omics::RunGroup Resource Type", Version: 1, @@ -206,16 +215,15 @@ func runGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Omics::RunGroup").WithTerraformTypeName("awscc_omics_run_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", - "id": "Id", "max_cpus": "MaxCpus", "max_duration": "MaxDuration", "max_gpus": "MaxGpus", "max_runs": "MaxRuns", "name": "Name", + "run_group_id": "Id", "tags": "Tags", }) diff --git a/internal/aws/omics/run_group_singular_data_source_gen.go b/internal/aws/omics/run_group_singular_data_source_gen.go index d71382047..5ddd20b16 100644 --- a/internal/aws/omics/run_group_singular_data_source_gen.go +++ b/internal/aws/omics/run_group_singular_data_source_gen.go @@ -56,7 +56,7 @@ func runGroupDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[0-9]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "run_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: MaxCpus @@ -156,12 +156,12 @@ func runGroupDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", - "id": "Id", "max_cpus": "MaxCpus", "max_duration": "MaxDuration", "max_gpus": "MaxGpus", "max_runs": "MaxRuns", "name": "Name", + "run_group_id": "Id", "tags": "Tags", }) diff --git a/internal/aws/omics/sequence_store_resource_gen.go b/internal/aws/omics/sequence_store_resource_gen.go index ed0e8da76..65b010a2f 100644 --- a/internal/aws/omics/sequence_store_resource_gen.go +++ b/internal/aws/omics/sequence_store_resource_gen.go @@ -230,6 +230,7 @@ func sequenceStoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -248,7 +249,6 @@ func sequenceStoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Omics::SequenceStore").WithTerraformTypeName("awscc_omics_sequence_store") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_time": "CreationTime", diff --git a/internal/aws/omics/variant_store_plural_data_source_gen.go b/internal/aws/omics/variant_store_plural_data_source_gen.go new file mode 100644 index 000000000..d1fa3e495 --- /dev/null +++ b/internal/aws/omics/variant_store_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package omics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_omics_variant_stores", variantStoresDataSource) +} + +// variantStoresDataSource returns the Terraform awscc_omics_variant_stores data source. +// This Terraform data source corresponds to the CloudFormation AWS::Omics::VariantStore resource. +func variantStoresDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::Omics::VariantStore", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Omics::VariantStore").WithTerraformTypeName("awscc_omics_variant_stores") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/omics/variant_store_plural_data_source_gen_test.go b/internal/aws/omics/variant_store_plural_data_source_gen_test.go new file mode 100644 index 000000000..f4dc0749c --- /dev/null +++ b/internal/aws/omics/variant_store_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package omics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOmicsVariantStoresDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Omics::VariantStore", "awscc_omics_variant_stores", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/omics/variant_store_resource_gen.go b/internal/aws/omics/variant_store_resource_gen.go new file mode 100644 index 000000000..cae0d7157 --- /dev/null +++ b/internal/aws/omics/variant_store_resource_gen.go @@ -0,0 +1,333 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package omics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/float64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_omics_variant_store", variantStoreResource) +} + +// variantStoreResource returns the Terraform awscc_omics_variant_store resource. +// This Terraform resource corresponds to the CloudFormation AWS::Omics::VariantStore resource. +func variantStoreResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CreationTime + // CloudFormation resource type schema: + // + // { + // "format": "date-time", + // "type": "string" + // } + "creation_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: timetypes.RFC3339Type{}, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Description + // CloudFormation resource type schema: + // + // { + // "maxLength": 500, + // "minLength": 0, + // "type": "string" + // } + "description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 500), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "pattern": "^[a-f0-9]{12}$", + // "type": "string" + // } + "variant_store_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "pattern": "^([a-z]){1}([a-z0-9_]){2,254}", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^([a-z]){1}([a-z0-9_]){2,254}"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Reference + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "ReferenceArn": { + // "maxLength": 127, + // "minLength": 1, + // "pattern": "^arn:.+$", + // "type": "string" + // } + // }, + // "required": [ + // "ReferenceArn" + // ], + // "type": "object" + // } + "reference": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ReferenceArn + "reference_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 127), + stringvalidator.RegexMatches(regexp.MustCompile("^arn:.+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SseConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "KeyArn": { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "arn:([^:\n]*):([^:\n]*):([^:\n]*):([0-9]{12}):([^:\n]*)", + // "type": "string" + // }, + // "Type": { + // "enum": [ + // "KMS" + // ], + // "type": "string" + // } + // }, + // "required": [ + // "Type" + // ], + // "type": "object" + // } + "sse_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: KeyArn + "key_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("arn:([^:\n]*):([^:\n]*):([^:\n]*):([0-9]{12}):([^:\n]*)"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Type + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "KMS", + ), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + objectplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATING", + // "UPDATING", + // "DELETING", + // "ACTIVE", + // "FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: StatusMessage + // CloudFormation resource type schema: + // + // { + // "maxLength": 1000, + // "minLength": 0, + // "type": "string" + // } + "status_message": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: StoreArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:([^:\n]*):([^:\n]*):([^:\n]*):([0-9]{12}):([^:\n]*)$", + // "type": "string" + // } + "store_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: StoreSizeBytes + // CloudFormation resource type schema: + // + // { + // "type": "number" + // } + "store_size_bytes": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.Float64{ /*START PLAN MODIFIERS*/ + float64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "type": "object" + // } + "tags": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + mapplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: UpdateTime + // CloudFormation resource type schema: + // + // { + // "format": "date-time", + // "type": "string" + // } + "update_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: timetypes.RFC3339Type{}, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Definition of AWS::Omics::VariantStore Resource Type", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Omics::VariantStore").WithTerraformTypeName("awscc_omics_variant_store") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "creation_time": "CreationTime", + "description": "Description", + "key_arn": "KeyArn", + "name": "Name", + "reference": "Reference", + "reference_arn": "ReferenceArn", + "sse_config": "SseConfig", + "status": "Status", + "status_message": "StatusMessage", + "store_arn": "StoreArn", + "store_size_bytes": "StoreSizeBytes", + "tags": "Tags", + "type": "Type", + "update_time": "UpdateTime", + "variant_store_id": "Id", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/omics/variant_store_resource_gen_test.go b/internal/aws/omics/variant_store_resource_gen_test.go new file mode 100644 index 000000000..0676b52da --- /dev/null +++ b/internal/aws/omics/variant_store_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package omics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOmicsVariantStore_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Omics::VariantStore", "awscc_omics_variant_store", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/omics/variant_store_singular_data_source_gen.go b/internal/aws/omics/variant_store_singular_data_source_gen.go new file mode 100644 index 000000000..4c560f6db --- /dev/null +++ b/internal/aws/omics/variant_store_singular_data_source_gen.go @@ -0,0 +1,252 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package omics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-timetypes/timetypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_omics_variant_store", variantStoreDataSource) +} + +// variantStoreDataSource returns the Terraform awscc_omics_variant_store data source. +// This Terraform data source corresponds to the CloudFormation AWS::Omics::VariantStore resource. +func variantStoreDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CreationTime + // CloudFormation resource type schema: + // + // { + // "format": "date-time", + // "type": "string" + // } + "creation_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: timetypes.RFC3339Type{}, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Description + // CloudFormation resource type schema: + // + // { + // "maxLength": 500, + // "minLength": 0, + // "type": "string" + // } + "description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "pattern": "^[a-f0-9]{12}$", + // "type": "string" + // } + "variant_store_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "pattern": "^([a-z]){1}([a-z0-9_]){2,254}", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Reference + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "ReferenceArn": { + // "maxLength": 127, + // "minLength": 1, + // "pattern": "^arn:.+$", + // "type": "string" + // } + // }, + // "required": [ + // "ReferenceArn" + // ], + // "type": "object" + // } + "reference": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ReferenceArn + "reference_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SseConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "KeyArn": { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "arn:([^:\n]*):([^:\n]*):([^:\n]*):([0-9]{12}):([^:\n]*)", + // "type": "string" + // }, + // "Type": { + // "enum": [ + // "KMS" + // ], + // "type": "string" + // } + // }, + // "required": [ + // "Type" + // ], + // "type": "object" + // } + "sse_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: KeyArn + "key_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Type + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATING", + // "UPDATING", + // "DELETING", + // "ACTIVE", + // "FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: StatusMessage + // CloudFormation resource type schema: + // + // { + // "maxLength": 1000, + // "minLength": 0, + // "type": "string" + // } + "status_message": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: StoreArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:([^:\n]*):([^:\n]*):([^:\n]*):([0-9]{12}):([^:\n]*)$", + // "type": "string" + // } + "store_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: StoreSizeBytes + // CloudFormation resource type schema: + // + // { + // "type": "number" + // } + "store_size_bytes": schema.Float64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "type": "object" + // } + "tags": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UpdateTime + // CloudFormation resource type schema: + // + // { + // "format": "date-time", + // "type": "string" + // } + "update_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: timetypes.RFC3339Type{}, + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::Omics::VariantStore", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Omics::VariantStore").WithTerraformTypeName("awscc_omics_variant_store") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "creation_time": "CreationTime", + "description": "Description", + "key_arn": "KeyArn", + "name": "Name", + "reference": "Reference", + "reference_arn": "ReferenceArn", + "sse_config": "SseConfig", + "status": "Status", + "status_message": "StatusMessage", + "store_arn": "StoreArn", + "store_size_bytes": "StoreSizeBytes", + "tags": "Tags", + "type": "Type", + "update_time": "UpdateTime", + "variant_store_id": "Id", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/omics/variant_store_singular_data_source_gen_test.go b/internal/aws/omics/variant_store_singular_data_source_gen_test.go new file mode 100644 index 000000000..4f83bf33e --- /dev/null +++ b/internal/aws/omics/variant_store_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package omics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOmicsVariantStoreDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Omics::VariantStore", "awscc_omics_variant_store", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSOmicsVariantStoreDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Omics::VariantStore", "awscc_omics_variant_store", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/omics/workflow_resource_gen.go b/internal/aws/omics/workflow_resource_gen.go index 52e636f61..ea14fb138 100644 --- a/internal/aws/omics/workflow_resource_gen.go +++ b/internal/aws/omics/workflow_resource_gen.go @@ -167,7 +167,7 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[0-9]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "workflow_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -356,6 +356,15 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Definition of AWS::Omics::Workflow Resource Type", Version: 1, @@ -366,7 +375,6 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Omics::Workflow").WithTerraformTypeName("awscc_omics_workflow") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "accelerators": "Accelerators", "arn": "Arn", @@ -374,7 +382,6 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { "definition_uri": "DefinitionUri", "description": "Description", "engine": "Engine", - "id": "Id", "main": "Main", "name": "Name", "optional": "Optional", @@ -383,6 +390,7 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { "storage_capacity": "StorageCapacity", "tags": "Tags", "type": "Type", + "workflow_id": "Id", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/omics/workflow_singular_data_source_gen.go b/internal/aws/omics/workflow_singular_data_source_gen.go index 17013118c..495a39166 100644 --- a/internal/aws/omics/workflow_singular_data_source_gen.go +++ b/internal/aws/omics/workflow_singular_data_source_gen.go @@ -110,7 +110,7 @@ func workflowDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[0-9]+$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "workflow_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Main @@ -265,7 +265,6 @@ func workflowDataSource(ctx context.Context) (datasource.DataSource, error) { "definition_uri": "DefinitionUri", "description": "Description", "engine": "Engine", - "id": "Id", "main": "Main", "name": "Name", "optional": "Optional", @@ -274,6 +273,7 @@ func workflowDataSource(ctx context.Context) (datasource.DataSource, error) { "storage_capacity": "StorageCapacity", "tags": "Tags", "type": "Type", + "workflow_id": "Id", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/opensearchserverless/access_policy_resource_gen.go b/internal/aws/opensearchserverless/access_policy_resource_gen.go index 8d1cee41a..ade4cde3b 100644 --- a/internal/aws/opensearchserverless/access_policy_resource_gen.go +++ b/internal/aws/opensearchserverless/access_policy_resource_gen.go @@ -109,6 +109,7 @@ func accessPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -127,7 +128,6 @@ func accessPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::AccessPolicy").WithTerraformTypeName("awscc_opensearchserverless_access_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "name": "Name", diff --git a/internal/aws/opensearchserverless/collection_resource_gen.go b/internal/aws/opensearchserverless/collection_resource_gen.go index 796cd1be1..5b0869909 100644 --- a/internal/aws/opensearchserverless/collection_resource_gen.go +++ b/internal/aws/opensearchserverless/collection_resource_gen.go @@ -99,7 +99,7 @@ func collectionResource(ctx context.Context) (resource.Resource, error) { // "minLength": 3, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "collection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The identifier of the collection", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -249,6 +249,15 @@ func collectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Amazon OpenSearchServerless collection resource", Version: 1, @@ -259,13 +268,12 @@ func collectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::Collection").WithTerraformTypeName("awscc_opensearchserverless_collection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "collection_endpoint": "CollectionEndpoint", + "collection_id": "Id", "dashboard_endpoint": "DashboardEndpoint", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", "standby_replicas": "StandbyReplicas", diff --git a/internal/aws/opensearchserverless/collection_singular_data_source_gen.go b/internal/aws/opensearchserverless/collection_singular_data_source_gen.go index 0dd6fb115..ed922376b 100644 --- a/internal/aws/opensearchserverless/collection_singular_data_source_gen.go +++ b/internal/aws/opensearchserverless/collection_singular_data_source_gen.go @@ -76,7 +76,7 @@ func collectionDataSource(ctx context.Context) (datasource.DataSource, error) { // "minLength": 3, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "collection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The identifier of the collection", Computed: true, }, /*END ATTRIBUTE*/ @@ -195,9 +195,9 @@ func collectionDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "collection_endpoint": "CollectionEndpoint", + "collection_id": "Id", "dashboard_endpoint": "DashboardEndpoint", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", "standby_replicas": "StandbyReplicas", diff --git a/internal/aws/opensearchserverless/lifecycle_policy_resource_gen.go b/internal/aws/opensearchserverless/lifecycle_policy_resource_gen.go index cbfc1749a..f3d14b818 100644 --- a/internal/aws/opensearchserverless/lifecycle_policy_resource_gen.go +++ b/internal/aws/opensearchserverless/lifecycle_policy_resource_gen.go @@ -109,6 +109,7 @@ func lifecyclePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -127,7 +128,6 @@ func lifecyclePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::LifecyclePolicy").WithTerraformTypeName("awscc_opensearchserverless_lifecycle_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "name": "Name", diff --git a/internal/aws/opensearchserverless/security_config_resource_gen.go b/internal/aws/opensearchserverless/security_config_resource_gen.go index 167ff9180..0db085254 100644 --- a/internal/aws/opensearchserverless/security_config_resource_gen.go +++ b/internal/aws/opensearchserverless/security_config_resource_gen.go @@ -58,7 +58,7 @@ func securityConfigResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The identifier of the security config", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -206,6 +206,15 @@ func securityConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Amazon OpenSearchServerless security config resource", Version: 1, @@ -216,17 +225,16 @@ func securityConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::SecurityConfig").WithTerraformTypeName("awscc_opensearchserverless_security_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "description": "Description", - "group_attribute": "GroupAttribute", - "id": "Id", - "metadata": "Metadata", - "name": "Name", - "saml_options": "SamlOptions", - "session_timeout": "SessionTimeout", - "type": "Type", - "user_attribute": "UserAttribute", + "description": "Description", + "group_attribute": "GroupAttribute", + "metadata": "Metadata", + "name": "Name", + "saml_options": "SamlOptions", + "security_config_id": "Id", + "session_timeout": "SessionTimeout", + "type": "Type", + "user_attribute": "UserAttribute", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/opensearchserverless/security_config_singular_data_source_gen.go b/internal/aws/opensearchserverless/security_config_singular_data_source_gen.go index aee9f903a..de701163f 100644 --- a/internal/aws/opensearchserverless/security_config_singular_data_source_gen.go +++ b/internal/aws/opensearchserverless/security_config_singular_data_source_gen.go @@ -44,7 +44,7 @@ func securityConfigDataSource(ctx context.Context) (datasource.DataSource, error // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "security_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The identifier of the security config", Computed: true, }, /*END ATTRIBUTE*/ @@ -157,15 +157,15 @@ func securityConfigDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::SecurityConfig").WithTerraformTypeName("awscc_opensearchserverless_security_config") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "description": "Description", - "group_attribute": "GroupAttribute", - "id": "Id", - "metadata": "Metadata", - "name": "Name", - "saml_options": "SamlOptions", - "session_timeout": "SessionTimeout", - "type": "Type", - "user_attribute": "UserAttribute", + "description": "Description", + "group_attribute": "GroupAttribute", + "metadata": "Metadata", + "name": "Name", + "saml_options": "SamlOptions", + "security_config_id": "Id", + "session_timeout": "SessionTimeout", + "type": "Type", + "user_attribute": "UserAttribute", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/opensearchserverless/security_policy_resource_gen.go b/internal/aws/opensearchserverless/security_policy_resource_gen.go index 27e02516f..24c9166f4 100644 --- a/internal/aws/opensearchserverless/security_policy_resource_gen.go +++ b/internal/aws/opensearchserverless/security_policy_resource_gen.go @@ -111,6 +111,7 @@ func securityPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -129,7 +130,6 @@ func securityPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::SecurityPolicy").WithTerraformTypeName("awscc_opensearchserverless_security_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "name": "Name", diff --git a/internal/aws/opensearchserverless/vpc_endpoint_resource_gen.go b/internal/aws/opensearchserverless/vpc_endpoint_resource_gen.go index a4cd0c341..3b9b8088e 100644 --- a/internal/aws/opensearchserverless/vpc_endpoint_resource_gen.go +++ b/internal/aws/opensearchserverless/vpc_endpoint_resource_gen.go @@ -40,7 +40,7 @@ func vpcEndpointResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^vpce-[0-9a-z]*$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The identifier of the VPC Endpoint", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -155,6 +155,15 @@ func vpcEndpointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Amazon OpenSearchServerless vpc endpoint resource", Version: 1, @@ -165,12 +174,11 @@ func vpcEndpointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::VpcEndpoint").WithTerraformTypeName("awscc_opensearchserverless_vpc_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", "name": "Name", "security_group_ids": "SecurityGroupIds", "subnet_ids": "SubnetIds", + "vpc_endpoint_id": "Id", "vpc_id": "VpcId", }) diff --git a/internal/aws/opensearchserverless/vpc_endpoint_singular_data_source_gen.go b/internal/aws/opensearchserverless/vpc_endpoint_singular_data_source_gen.go index 8403a72fd..ba3b2948a 100644 --- a/internal/aws/opensearchserverless/vpc_endpoint_singular_data_source_gen.go +++ b/internal/aws/opensearchserverless/vpc_endpoint_singular_data_source_gen.go @@ -33,7 +33,7 @@ func vpcEndpointDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^vpce-[0-9a-z]*$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "vpc_endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The identifier of the VPC Endpoint", Computed: true, }, /*END ATTRIBUTE*/ @@ -124,10 +124,10 @@ func vpcEndpointDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::OpenSearchServerless::VpcEndpoint").WithTerraformTypeName("awscc_opensearchserverless_vpc_endpoint") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", "name": "Name", "security_group_ids": "SecurityGroupIds", "subnet_ids": "SubnetIds", + "vpc_endpoint_id": "Id", "vpc_id": "VpcId", }) diff --git a/internal/aws/opensearchservice/domain_plural_data_source_gen.go b/internal/aws/opensearchservice/domain_plural_data_source_gen.go new file mode 100644 index 000000000..4b5af0730 --- /dev/null +++ b/internal/aws/opensearchservice/domain_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package opensearchservice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_opensearchservice_domains", domainsDataSource) +} + +// domainsDataSource returns the Terraform awscc_opensearchservice_domains data source. +// This Terraform data source corresponds to the CloudFormation AWS::OpenSearchService::Domain resource. +func domainsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::OpenSearchService::Domain", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::OpenSearchService::Domain").WithTerraformTypeName("awscc_opensearchservice_domains") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/opensearchservice/domain_plural_data_source_gen_test.go b/internal/aws/opensearchservice/domain_plural_data_source_gen_test.go new file mode 100644 index 000000000..ea267b82e --- /dev/null +++ b/internal/aws/opensearchservice/domain_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package opensearchservice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOpenSearchServiceDomainsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpenSearchService::Domain", "awscc_opensearchservice_domains", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/opensearchservice/domain_resource_gen.go b/internal/aws/opensearchservice/domain_resource_gen.go new file mode 100644 index 000000000..f0598c0d2 --- /dev/null +++ b/internal/aws/opensearchservice/domain_resource_gen.go @@ -0,0 +1,1399 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package opensearchservice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_opensearchservice_domain", domainResource) +} + +// domainResource returns the Terraform awscc_opensearchservice_domain resource. +// This Terraform resource corresponds to the CloudFormation AWS::OpenSearchService::Domain resource. +func domainResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessPolicies + // CloudFormation resource type schema: + // + // { + // "type": "object" + // } + "access_policies": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AdvancedOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "advanced_options": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AdvancedSecurityOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AnonymousAuthDisableDate": { + // "type": "string" + // }, + // "AnonymousAuthEnabled": { + // "type": "boolean" + // }, + // "Enabled": { + // "type": "boolean" + // }, + // "InternalUserDatabaseEnabled": { + // "type": "boolean" + // }, + // "MasterUserOptions": { + // "additionalProperties": false, + // "properties": { + // "MasterUserARN": { + // "type": "string" + // }, + // "MasterUserName": { + // "type": "string" + // }, + // "MasterUserPassword": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "SAMLOptions": { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "Idp": { + // "additionalProperties": false, + // "properties": { + // "EntityId": { + // "type": "string" + // }, + // "MetadataContent": { + // "maxLength": 1048576, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "MetadataContent", + // "EntityId" + // ], + // "type": "object" + // }, + // "MasterBackendRole": { + // "type": "string" + // }, + // "MasterUserName": { + // "type": "string" + // }, + // "RolesKey": { + // "type": "string" + // }, + // "SessionTimeoutMinutes": { + // "type": "integer" + // }, + // "SubjectKey": { + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "advanced_security_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AnonymousAuthDisableDate + "anonymous_auth_disable_date": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AnonymousAuthEnabled + "anonymous_auth_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InternalUserDatabaseEnabled + "internal_user_database_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterUserOptions + "master_user_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: MasterUserARN + "master_user_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterUserName + "master_user_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterUserPassword + "master_user_password": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // MasterUserOptions is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: SAMLOptions + "saml_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Idp + "idp": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EntityId + "entity_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: MetadataContent + "metadata_content": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 1048576), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterBackendRole + "master_backend_role": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // MasterBackendRole is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: MasterUserName + "master_user_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // MasterUserName is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: RolesKey + "roles_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SessionTimeoutMinutes + "session_timeout_minutes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SubjectKey + "subject_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ClusterConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "ColdStorageOptions": { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // }, + // "DedicatedMasterCount": { + // "type": "integer" + // }, + // "DedicatedMasterEnabled": { + // "type": "boolean" + // }, + // "DedicatedMasterType": { + // "type": "string" + // }, + // "InstanceCount": { + // "type": "integer" + // }, + // "InstanceType": { + // "type": "string" + // }, + // "MultiAZWithStandbyEnabled": { + // "type": "boolean" + // }, + // "WarmCount": { + // "type": "integer" + // }, + // "WarmEnabled": { + // "type": "boolean" + // }, + // "WarmType": { + // "type": "string" + // }, + // "ZoneAwarenessConfig": { + // "additionalProperties": false, + // "properties": { + // "AvailabilityZoneCount": { + // "type": "integer" + // } + // }, + // "type": "object" + // }, + // "ZoneAwarenessEnabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "cluster_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ColdStorageOptions + "cold_storage_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DedicatedMasterCount + "dedicated_master_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DedicatedMasterEnabled + "dedicated_master_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DedicatedMasterType + "dedicated_master_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InstanceCount + "instance_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InstanceType + "instance_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MultiAZWithStandbyEnabled + "multi_az_with_standby_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: WarmCount + "warm_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: WarmEnabled + "warm_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: WarmType + "warm_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ZoneAwarenessConfig + "zone_awareness_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AvailabilityZoneCount + "availability_zone_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ZoneAwarenessEnabled + "zone_awareness_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CognitoOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "IdentityPoolId": { + // "type": "string" + // }, + // "RoleArn": { + // "type": "string" + // }, + // "UserPoolId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "cognito_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: IdentityPoolId + "identity_pool_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: UserPoolId + "user_pool_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainArn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainEndpoint + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainEndpointOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "CustomEndpoint": { + // "type": "string" + // }, + // "CustomEndpointCertificateArn": { + // "type": "string" + // }, + // "CustomEndpointEnabled": { + // "type": "boolean" + // }, + // "EnforceHTTPS": { + // "type": "boolean" + // }, + // "TLSSecurityPolicy": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "domain_endpoint_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomEndpoint + "custom_endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CustomEndpointCertificateArn + "custom_endpoint_certificate_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CustomEndpointEnabled + "custom_endpoint_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EnforceHTTPS + "enforce_https": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TLSSecurityPolicy + "tls_security_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainEndpointV2 + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_endpoint_v2": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainEndpoints + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "domain_endpoints": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DomainName + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EBSOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "EBSEnabled": { + // "type": "boolean" + // }, + // "Iops": { + // "type": "integer" + // }, + // "Throughput": { + // "type": "integer" + // }, + // "VolumeSize": { + // "type": "integer" + // }, + // "VolumeType": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "ebs_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EBSEnabled + "ebs_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Iops + "iops": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Throughput + "throughput": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VolumeSize + "volume_size": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VolumeType + "volume_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EncryptionAtRestOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "KmsKeyId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "encryption_at_rest_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: KmsKeyId + "kms_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EngineVersion + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "engine_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: IPAddressType + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "ip_address_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LogPublishingOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "additionalProperties": false, + // "properties": { + // "CloudWatchLogsLogGroupArn": { + // "type": "string" + // }, + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "log_publishing_options": // Pattern: "" + schema.MapNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CloudWatchLogsLogGroupArn + "cloudwatch_logs_log_group_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: NodeToNodeEncryptionOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "node_to_node_encryption_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: OffPeakWindowOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "OffPeakWindow": { + // "additionalProperties": false, + // "properties": { + // "WindowStartTime": { + // "additionalProperties": false, + // "properties": { + // "Hours": { + // "maximum": 23, + // "minimum": 0, + // "type": "integer" + // }, + // "Minutes": { + // "maximum": 59, + // "minimum": 0, + // "type": "integer" + // } + // }, + // "required": [ + // "Hours", + // "Minutes" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "off_peak_window_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: OffPeakWindow + "off_peak_window": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: WindowStartTime + "window_start_time": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Hours + "hours": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(0, 23), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Minutes + "minutes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(0, 59), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceSoftwareOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AutomatedUpdateDate": { + // "type": "string" + // }, + // "Cancellable": { + // "type": "boolean" + // }, + // "CurrentVersion": { + // "type": "string" + // }, + // "Description": { + // "type": "string" + // }, + // "NewVersion": { + // "type": "string" + // }, + // "OptionalDeployment": { + // "type": "boolean" + // }, + // "UpdateAvailable": { + // "type": "boolean" + // }, + // "UpdateStatus": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "service_software_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutomatedUpdateDate + "automated_update_date": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Cancellable + "cancellable": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CurrentVersion + "current_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Description + "description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NewVersion + "new_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OptionalDeployment + "optional_deployment": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UpdateAvailable + "update_available": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UpdateStatus + "update_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SnapshotOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AutomatedSnapshotStartHour": { + // "type": "integer" + // } + // }, + // "type": "object" + // } + "snapshot_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutomatedSnapshotStartHour + "automated_snapshot_start_hour": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SoftwareUpdateOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AutoSoftwareUpdateEnabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "software_update_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutoSoftwareUpdateEnabled + "auto_software_update_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An arbitrary set of tags (key-value pairs) for this Domain.", + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "description": "The value of the tag.", + // "maxLength": 128, + // "minLength": 0, + // "type": "string" + // }, + // "Value": { + // "description": "The key of the tag.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value of the tag.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key of the tag.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An arbitrary set of tags (key-value pairs) for this Domain.", + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.UniqueValues(), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VPCOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "SecurityGroupIds": { + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": true + // }, + // "SubnetIds": { + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": true + // } + // }, + // "type": "object" + // } + "vpc_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SecurityGroupIds + "security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.UniqueValues(), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SubnetIds + "subnet_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.UniqueValues(), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "An example resource schema demonstrating some basic constructs and validation rules.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::OpenSearchService::Domain").WithTerraformTypeName("awscc_opensearchservice_domain") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_policies": "AccessPolicies", + "advanced_options": "AdvancedOptions", + "advanced_security_options": "AdvancedSecurityOptions", + "anonymous_auth_disable_date": "AnonymousAuthDisableDate", + "anonymous_auth_enabled": "AnonymousAuthEnabled", + "arn": "Arn", + "auto_software_update_enabled": "AutoSoftwareUpdateEnabled", + "automated_snapshot_start_hour": "AutomatedSnapshotStartHour", + "automated_update_date": "AutomatedUpdateDate", + "availability_zone_count": "AvailabilityZoneCount", + "cancellable": "Cancellable", + "cloudwatch_logs_log_group_arn": "CloudWatchLogsLogGroupArn", + "cluster_config": "ClusterConfig", + "cognito_options": "CognitoOptions", + "cold_storage_options": "ColdStorageOptions", + "current_version": "CurrentVersion", + "custom_endpoint": "CustomEndpoint", + "custom_endpoint_certificate_arn": "CustomEndpointCertificateArn", + "custom_endpoint_enabled": "CustomEndpointEnabled", + "dedicated_master_count": "DedicatedMasterCount", + "dedicated_master_enabled": "DedicatedMasterEnabled", + "dedicated_master_type": "DedicatedMasterType", + "description": "Description", + "domain_arn": "DomainArn", + "domain_endpoint": "DomainEndpoint", + "domain_endpoint_options": "DomainEndpointOptions", + "domain_endpoint_v2": "DomainEndpointV2", + "domain_endpoints": "DomainEndpoints", + "domain_id": "Id", + "domain_name": "DomainName", + "ebs_enabled": "EBSEnabled", + "ebs_options": "EBSOptions", + "enabled": "Enabled", + "encryption_at_rest_options": "EncryptionAtRestOptions", + "enforce_https": "EnforceHTTPS", + "engine_version": "EngineVersion", + "entity_id": "EntityId", + "hours": "Hours", + "identity_pool_id": "IdentityPoolId", + "idp": "Idp", + "instance_count": "InstanceCount", + "instance_type": "InstanceType", + "internal_user_database_enabled": "InternalUserDatabaseEnabled", + "iops": "Iops", + "ip_address_type": "IPAddressType", + "key": "Key", + "kms_key_id": "KmsKeyId", + "log_publishing_options": "LogPublishingOptions", + "master_backend_role": "MasterBackendRole", + "master_user_arn": "MasterUserARN", + "master_user_name": "MasterUserName", + "master_user_options": "MasterUserOptions", + "master_user_password": "MasterUserPassword", + "metadata_content": "MetadataContent", + "minutes": "Minutes", + "multi_az_with_standby_enabled": "MultiAZWithStandbyEnabled", + "new_version": "NewVersion", + "node_to_node_encryption_options": "NodeToNodeEncryptionOptions", + "off_peak_window": "OffPeakWindow", + "off_peak_window_options": "OffPeakWindowOptions", + "optional_deployment": "OptionalDeployment", + "role_arn": "RoleArn", + "roles_key": "RolesKey", + "saml_options": "SAMLOptions", + "security_group_ids": "SecurityGroupIds", + "service_software_options": "ServiceSoftwareOptions", + "session_timeout_minutes": "SessionTimeoutMinutes", + "snapshot_options": "SnapshotOptions", + "software_update_options": "SoftwareUpdateOptions", + "subject_key": "SubjectKey", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "throughput": "Throughput", + "tls_security_policy": "TLSSecurityPolicy", + "update_available": "UpdateAvailable", + "update_status": "UpdateStatus", + "user_pool_id": "UserPoolId", + "value": "Value", + "volume_size": "VolumeSize", + "volume_type": "VolumeType", + "vpc_options": "VPCOptions", + "warm_count": "WarmCount", + "warm_enabled": "WarmEnabled", + "warm_type": "WarmType", + "window_start_time": "WindowStartTime", + "zone_awareness_config": "ZoneAwarenessConfig", + "zone_awareness_enabled": "ZoneAwarenessEnabled", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/AdvancedSecurityOptions/MasterUserOptions", + "/properties/AdvancedSecurityOptions/SAMLOptions/MasterUserName", + "/properties/AdvancedSecurityOptions/SAMLOptions/MasterBackendRole", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(780) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/opensearchservice/domain_resource_gen_test.go b/internal/aws/opensearchservice/domain_resource_gen_test.go new file mode 100644 index 000000000..39574f71f --- /dev/null +++ b/internal/aws/opensearchservice/domain_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package opensearchservice_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOpenSearchServiceDomain_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpenSearchService::Domain", "awscc_opensearchservice_domain", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSOpenSearchServiceDomain_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpenSearchService::Domain", "awscc_opensearchservice_domain", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/opensearchservice/domain_singular_data_source_gen.go b/internal/aws/opensearchservice/domain_singular_data_source_gen.go new file mode 100644 index 000000000..e103c634c --- /dev/null +++ b/internal/aws/opensearchservice/domain_singular_data_source_gen.go @@ -0,0 +1,1030 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package opensearchservice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_opensearchservice_domain", domainDataSource) +} + +// domainDataSource returns the Terraform awscc_opensearchservice_domain data source. +// This Terraform data source corresponds to the CloudFormation AWS::OpenSearchService::Domain resource. +func domainDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessPolicies + // CloudFormation resource type schema: + // + // { + // "type": "object" + // } + "access_policies": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AdvancedOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "advanced_options": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AdvancedSecurityOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AnonymousAuthDisableDate": { + // "type": "string" + // }, + // "AnonymousAuthEnabled": { + // "type": "boolean" + // }, + // "Enabled": { + // "type": "boolean" + // }, + // "InternalUserDatabaseEnabled": { + // "type": "boolean" + // }, + // "MasterUserOptions": { + // "additionalProperties": false, + // "properties": { + // "MasterUserARN": { + // "type": "string" + // }, + // "MasterUserName": { + // "type": "string" + // }, + // "MasterUserPassword": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "SAMLOptions": { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "Idp": { + // "additionalProperties": false, + // "properties": { + // "EntityId": { + // "type": "string" + // }, + // "MetadataContent": { + // "maxLength": 1048576, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "MetadataContent", + // "EntityId" + // ], + // "type": "object" + // }, + // "MasterBackendRole": { + // "type": "string" + // }, + // "MasterUserName": { + // "type": "string" + // }, + // "RolesKey": { + // "type": "string" + // }, + // "SessionTimeoutMinutes": { + // "type": "integer" + // }, + // "SubjectKey": { + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "advanced_security_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AnonymousAuthDisableDate + "anonymous_auth_disable_date": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AnonymousAuthEnabled + "anonymous_auth_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InternalUserDatabaseEnabled + "internal_user_database_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterUserOptions + "master_user_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: MasterUserARN + "master_user_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterUserName + "master_user_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterUserPassword + "master_user_password": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SAMLOptions + "saml_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Idp + "idp": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EntityId + "entity_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MetadataContent + "metadata_content": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterBackendRole + "master_backend_role": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterUserName + "master_user_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RolesKey + "roles_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SessionTimeoutMinutes + "session_timeout_minutes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SubjectKey + "subject_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "ColdStorageOptions": { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // }, + // "DedicatedMasterCount": { + // "type": "integer" + // }, + // "DedicatedMasterEnabled": { + // "type": "boolean" + // }, + // "DedicatedMasterType": { + // "type": "string" + // }, + // "InstanceCount": { + // "type": "integer" + // }, + // "InstanceType": { + // "type": "string" + // }, + // "MultiAZWithStandbyEnabled": { + // "type": "boolean" + // }, + // "WarmCount": { + // "type": "integer" + // }, + // "WarmEnabled": { + // "type": "boolean" + // }, + // "WarmType": { + // "type": "string" + // }, + // "ZoneAwarenessConfig": { + // "additionalProperties": false, + // "properties": { + // "AvailabilityZoneCount": { + // "type": "integer" + // } + // }, + // "type": "object" + // }, + // "ZoneAwarenessEnabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "cluster_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ColdStorageOptions + "cold_storage_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DedicatedMasterCount + "dedicated_master_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DedicatedMasterEnabled + "dedicated_master_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DedicatedMasterType + "dedicated_master_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InstanceCount + "instance_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InstanceType + "instance_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MultiAZWithStandbyEnabled + "multi_az_with_standby_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: WarmCount + "warm_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: WarmEnabled + "warm_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: WarmType + "warm_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ZoneAwarenessConfig + "zone_awareness_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AvailabilityZoneCount + "availability_zone_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ZoneAwarenessEnabled + "zone_awareness_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CognitoOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "IdentityPoolId": { + // "type": "string" + // }, + // "RoleArn": { + // "type": "string" + // }, + // "UserPoolId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "cognito_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: IdentityPoolId + "identity_pool_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UserPoolId + "user_pool_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainArn + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainEndpoint + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainEndpointOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "CustomEndpoint": { + // "type": "string" + // }, + // "CustomEndpointCertificateArn": { + // "type": "string" + // }, + // "CustomEndpointEnabled": { + // "type": "boolean" + // }, + // "EnforceHTTPS": { + // "type": "boolean" + // }, + // "TLSSecurityPolicy": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "domain_endpoint_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CustomEndpoint + "custom_endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomEndpointCertificateArn + "custom_endpoint_certificate_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomEndpointEnabled + "custom_endpoint_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EnforceHTTPS + "enforce_https": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TLSSecurityPolicy + "tls_security_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainEndpointV2 + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_endpoint_v2": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainEndpoints + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "domain_endpoints": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DomainName + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EBSOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "EBSEnabled": { + // "type": "boolean" + // }, + // "Iops": { + // "type": "integer" + // }, + // "Throughput": { + // "type": "integer" + // }, + // "VolumeSize": { + // "type": "integer" + // }, + // "VolumeType": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "ebs_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EBSEnabled + "ebs_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Iops + "iops": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Throughput + "throughput": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VolumeSize + "volume_size": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VolumeType + "volume_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EncryptionAtRestOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "KmsKeyId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "encryption_at_rest_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KmsKeyId + "kms_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EngineVersion + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "engine_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: IPAddressType + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "ip_address_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "domain_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LogPublishingOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "patternProperties": { + // "": { + // "additionalProperties": false, + // "properties": { + // "CloudWatchLogsLogGroupArn": { + // "type": "string" + // }, + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "log_publishing_options": // Pattern: "" + schema.MapNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CloudWatchLogsLogGroupArn + "cloudwatch_logs_log_group_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NodeToNodeEncryptionOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "node_to_node_encryption_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OffPeakWindowOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "OffPeakWindow": { + // "additionalProperties": false, + // "properties": { + // "WindowStartTime": { + // "additionalProperties": false, + // "properties": { + // "Hours": { + // "maximum": 23, + // "minimum": 0, + // "type": "integer" + // }, + // "Minutes": { + // "maximum": 59, + // "minimum": 0, + // "type": "integer" + // } + // }, + // "required": [ + // "Hours", + // "Minutes" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "off_peak_window_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OffPeakWindow + "off_peak_window": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: WindowStartTime + "window_start_time": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Hours + "hours": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Minutes + "minutes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceSoftwareOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AutomatedUpdateDate": { + // "type": "string" + // }, + // "Cancellable": { + // "type": "boolean" + // }, + // "CurrentVersion": { + // "type": "string" + // }, + // "Description": { + // "type": "string" + // }, + // "NewVersion": { + // "type": "string" + // }, + // "OptionalDeployment": { + // "type": "boolean" + // }, + // "UpdateAvailable": { + // "type": "boolean" + // }, + // "UpdateStatus": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "service_software_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutomatedUpdateDate + "automated_update_date": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Cancellable + "cancellable": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CurrentVersion + "current_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Description + "description": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NewVersion + "new_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OptionalDeployment + "optional_deployment": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UpdateAvailable + "update_available": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UpdateStatus + "update_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SnapshotOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AutomatedSnapshotStartHour": { + // "type": "integer" + // } + // }, + // "type": "object" + // } + "snapshot_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutomatedSnapshotStartHour + "automated_snapshot_start_hour": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SoftwareUpdateOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "AutoSoftwareUpdateEnabled": { + // "type": "boolean" + // } + // }, + // "type": "object" + // } + "software_update_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AutoSoftwareUpdateEnabled + "auto_software_update_enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "An arbitrary set of tags (key-value pairs) for this Domain.", + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "description": "The value of the tag.", + // "maxLength": 128, + // "minLength": 0, + // "type": "string" + // }, + // "Value": { + // "description": "The key of the tag.", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value of the tag.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key of the tag.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "An arbitrary set of tags (key-value pairs) for this Domain.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VPCOptions + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "SecurityGroupIds": { + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": true + // }, + // "SubnetIds": { + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": true + // } + // }, + // "type": "object" + // } + "vpc_options": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SecurityGroupIds + "security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SubnetIds + "subnet_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::OpenSearchService::Domain", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::OpenSearchService::Domain").WithTerraformTypeName("awscc_opensearchservice_domain") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_policies": "AccessPolicies", + "advanced_options": "AdvancedOptions", + "advanced_security_options": "AdvancedSecurityOptions", + "anonymous_auth_disable_date": "AnonymousAuthDisableDate", + "anonymous_auth_enabled": "AnonymousAuthEnabled", + "arn": "Arn", + "auto_software_update_enabled": "AutoSoftwareUpdateEnabled", + "automated_snapshot_start_hour": "AutomatedSnapshotStartHour", + "automated_update_date": "AutomatedUpdateDate", + "availability_zone_count": "AvailabilityZoneCount", + "cancellable": "Cancellable", + "cloudwatch_logs_log_group_arn": "CloudWatchLogsLogGroupArn", + "cluster_config": "ClusterConfig", + "cognito_options": "CognitoOptions", + "cold_storage_options": "ColdStorageOptions", + "current_version": "CurrentVersion", + "custom_endpoint": "CustomEndpoint", + "custom_endpoint_certificate_arn": "CustomEndpointCertificateArn", + "custom_endpoint_enabled": "CustomEndpointEnabled", + "dedicated_master_count": "DedicatedMasterCount", + "dedicated_master_enabled": "DedicatedMasterEnabled", + "dedicated_master_type": "DedicatedMasterType", + "description": "Description", + "domain_arn": "DomainArn", + "domain_endpoint": "DomainEndpoint", + "domain_endpoint_options": "DomainEndpointOptions", + "domain_endpoint_v2": "DomainEndpointV2", + "domain_endpoints": "DomainEndpoints", + "domain_id": "Id", + "domain_name": "DomainName", + "ebs_enabled": "EBSEnabled", + "ebs_options": "EBSOptions", + "enabled": "Enabled", + "encryption_at_rest_options": "EncryptionAtRestOptions", + "enforce_https": "EnforceHTTPS", + "engine_version": "EngineVersion", + "entity_id": "EntityId", + "hours": "Hours", + "identity_pool_id": "IdentityPoolId", + "idp": "Idp", + "instance_count": "InstanceCount", + "instance_type": "InstanceType", + "internal_user_database_enabled": "InternalUserDatabaseEnabled", + "iops": "Iops", + "ip_address_type": "IPAddressType", + "key": "Key", + "kms_key_id": "KmsKeyId", + "log_publishing_options": "LogPublishingOptions", + "master_backend_role": "MasterBackendRole", + "master_user_arn": "MasterUserARN", + "master_user_name": "MasterUserName", + "master_user_options": "MasterUserOptions", + "master_user_password": "MasterUserPassword", + "metadata_content": "MetadataContent", + "minutes": "Minutes", + "multi_az_with_standby_enabled": "MultiAZWithStandbyEnabled", + "new_version": "NewVersion", + "node_to_node_encryption_options": "NodeToNodeEncryptionOptions", + "off_peak_window": "OffPeakWindow", + "off_peak_window_options": "OffPeakWindowOptions", + "optional_deployment": "OptionalDeployment", + "role_arn": "RoleArn", + "roles_key": "RolesKey", + "saml_options": "SAMLOptions", + "security_group_ids": "SecurityGroupIds", + "service_software_options": "ServiceSoftwareOptions", + "session_timeout_minutes": "SessionTimeoutMinutes", + "snapshot_options": "SnapshotOptions", + "software_update_options": "SoftwareUpdateOptions", + "subject_key": "SubjectKey", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "throughput": "Throughput", + "tls_security_policy": "TLSSecurityPolicy", + "update_available": "UpdateAvailable", + "update_status": "UpdateStatus", + "user_pool_id": "UserPoolId", + "value": "Value", + "volume_size": "VolumeSize", + "volume_type": "VolumeType", + "vpc_options": "VPCOptions", + "warm_count": "WarmCount", + "warm_enabled": "WarmEnabled", + "warm_type": "WarmType", + "window_start_time": "WindowStartTime", + "zone_awareness_config": "ZoneAwarenessConfig", + "zone_awareness_enabled": "ZoneAwarenessEnabled", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/opensearchservice/domain_singular_data_source_gen_test.go b/internal/aws/opensearchservice/domain_singular_data_source_gen_test.go new file mode 100644 index 000000000..7d2ea774a --- /dev/null +++ b/internal/aws/opensearchservice/domain_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package opensearchservice_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOpenSearchServiceDomainDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpenSearchService::Domain", "awscc_opensearchservice_domain", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSOpenSearchServiceDomainDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpenSearchService::Domain", "awscc_opensearchservice_domain", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/opsworkscm/server_plural_data_source_gen.go b/internal/aws/opsworkscm/server_plural_data_source_gen.go new file mode 100644 index 000000000..5ab31bcea --- /dev/null +++ b/internal/aws/opsworkscm/server_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package opsworkscm + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_opsworkscm_servers", serversDataSource) +} + +// serversDataSource returns the Terraform awscc_opsworkscm_servers data source. +// This Terraform data source corresponds to the CloudFormation AWS::OpsWorksCM::Server resource. +func serversDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::OpsWorksCM::Server", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::OpsWorksCM::Server").WithTerraformTypeName("awscc_opsworkscm_servers") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/opsworkscm/server_plural_data_source_gen_test.go b/internal/aws/opsworkscm/server_plural_data_source_gen_test.go new file mode 100644 index 000000000..73ae8b277 --- /dev/null +++ b/internal/aws/opsworkscm/server_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package opsworkscm_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOpsWorksCMServersDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpsWorksCM::Server", "awscc_opsworkscm_servers", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/opsworkscm/server_resource_gen.go b/internal/aws/opsworkscm/server_resource_gen.go new file mode 100644 index 000000000..0bb364358 --- /dev/null +++ b/internal/aws/opsworkscm/server_resource_gen.go @@ -0,0 +1,604 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package opsworkscm + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_opsworkscm_server", serverResource) +} + +// serverResource returns the Terraform awscc_opsworkscm_server resource. +// This Terraform resource corresponds to the CloudFormation AWS::OpsWorksCM::Server resource. +func serverResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AssociatePublicIpAddress + // CloudFormation resource type schema: + // + // { + // "type": "boolean" + // } + "associate_public_ip_address": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + boolplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: BackupId + // CloudFormation resource type schema: + // + // { + // "maxLength": 79, + // "pattern": "[a-zA-Z][a-zA-Z0-9\\-\\.\\:]*", + // "type": "string" + // } + "backup_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(79), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z][a-zA-Z0-9\\-\\.\\:]*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // BackupId is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: BackupRetentionCount + // CloudFormation resource type schema: + // + // { + // "minLength": 1, + // "type": "integer" + // } + "backup_retention_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CustomCertificate + // CloudFormation resource type schema: + // + // { + // "maxLength": 2097152, + // "pattern": "(?s)\\s*-----BEGIN CERTIFICATE-----.+-----END CERTIFICATE-----\\s*", + // "type": "string" + // } + "custom_certificate": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(2097152), + stringvalidator.RegexMatches(regexp.MustCompile("(?s)\\s*-----BEGIN CERTIFICATE-----.+-----END CERTIFICATE-----\\s*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // CustomCertificate is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: CustomDomain + // CloudFormation resource type schema: + // + // { + // "maxLength": 253, + // "pattern": "", + // "type": "string" + // } + "custom_domain": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(253), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // CustomDomain is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: CustomPrivateKey + // CloudFormation resource type schema: + // + // { + // "maxLength": 4096, + // "pattern": "(?ms)\\s*^-----BEGIN (?-s:.*)PRIVATE KEY-----$.*?^-----END (?-s:.*)PRIVATE KEY-----$\\s*", + // "type": "string" + // } + "custom_private_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(4096), + stringvalidator.RegexMatches(regexp.MustCompile("(?ms)\\s*^-----BEGIN (?-s:.*)PRIVATE KEY-----$.*?^-----END (?-s:.*)PRIVATE KEY-----$\\s*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // CustomPrivateKey is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: DisableAutomatedBackup + // CloudFormation resource type schema: + // + // { + // "type": "boolean" + // } + "disable_automated_backup": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Endpoint + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Engine + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "engine": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EngineAttributes + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "properties": { + // "Name": { + // "maxLength": 10000, + // "pattern": "(?s).*", + // "type": "string" + // }, + // "Value": { + // "maxLength": 10000, + // "pattern": "(?s).*", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "engine_attributes": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile("(?s).*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile("(?s).*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // EngineAttributes is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: EngineModel + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "engine_model": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EngineVersion + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "engine_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // EngineVersion is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: InstanceProfileArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "arn:aws:iam::[0-9]{12}:instance-profile/.*", + // "type": "string" + // } + "instance_profile_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile("arn:aws:iam::[0-9]{12}:instance-profile/.*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: InstanceType + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "instance_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: KeyPair + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": ".*", + // "type": "string" + // } + "key_pair": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile(".*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // KeyPair is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: PreferredBackupWindow + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$", + // "type": "string" + // } + "preferred_backup_window": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile("^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: PreferredMaintenanceWindow + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$", + // "type": "string" + // } + "preferred_maintenance_window": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile("^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SecurityGroupIds + // CloudFormation resource type schema: + // + // { + // "items": { + // "maxLength": 10000, + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.ValueStringsAre( + stringvalidator.LengthAtMost(10000), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + listplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServerName + // CloudFormation resource type schema: + // + // { + // "maxLength": 40, + // "minLength": 1, + // "pattern": "[a-zA-Z][a-zA-Z0-9\\-]*", + // "type": "string" + // } + "server_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceRoleArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "arn:aws:iam::[0-9]{12}:role/.*", + // "type": "string" + // } + "service_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(10000), + stringvalidator.RegexMatches(regexp.MustCompile("arn:aws:iam::[0-9]{12}:role/.*"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SubnetIds + // CloudFormation resource type schema: + // + // { + // "items": { + // "maxLength": 10000, + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "subnet_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.ValueStringsAre( + stringvalidator.LengthAtMost(10000), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + listplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 0, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + stringvalidator.RegexMatches(regexp.MustCompile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // Tags is a write-only property. + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::OpsWorksCM::Server", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::OpsWorksCM::Server").WithTerraformTypeName("awscc_opsworkscm_server") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "associate_public_ip_address": "AssociatePublicIpAddress", + "backup_id": "BackupId", + "backup_retention_count": "BackupRetentionCount", + "custom_certificate": "CustomCertificate", + "custom_domain": "CustomDomain", + "custom_private_key": "CustomPrivateKey", + "disable_automated_backup": "DisableAutomatedBackup", + "endpoint": "Endpoint", + "engine": "Engine", + "engine_attributes": "EngineAttributes", + "engine_model": "EngineModel", + "engine_version": "EngineVersion", + "instance_profile_arn": "InstanceProfileArn", + "instance_type": "InstanceType", + "key": "Key", + "key_pair": "KeyPair", + "name": "Name", + "preferred_backup_window": "PreferredBackupWindow", + "preferred_maintenance_window": "PreferredMaintenanceWindow", + "security_group_ids": "SecurityGroupIds", + "server_name": "ServerName", + "service_role_arn": "ServiceRoleArn", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/BackupId", + "/properties/CustomCertificate", + "/properties/CustomDomain", + "/properties/CustomPrivateKey", + "/properties/EngineAttributes", + "/properties/EngineVersion", + "/properties/KeyPair", + "/properties/Tags", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/opsworkscm/server_resource_gen_test.go b/internal/aws/opsworkscm/server_resource_gen_test.go new file mode 100644 index 000000000..fa05e1644 --- /dev/null +++ b/internal/aws/opsworkscm/server_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package opsworkscm_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOpsWorksCMServer_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpsWorksCM::Server", "awscc_opsworkscm_server", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/opsworkscm/server_singular_data_source_gen.go b/internal/aws/opsworkscm/server_singular_data_source_gen.go new file mode 100644 index 000000000..3336b1fa3 --- /dev/null +++ b/internal/aws/opsworkscm/server_singular_data_source_gen.go @@ -0,0 +1,389 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package opsworkscm + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_opsworkscm_server", serverDataSource) +} + +// serverDataSource returns the Terraform awscc_opsworkscm_server data source. +// This Terraform data source corresponds to the CloudFormation AWS::OpsWorksCM::Server resource. +func serverDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AssociatePublicIpAddress + // CloudFormation resource type schema: + // + // { + // "type": "boolean" + // } + "associate_public_ip_address": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: BackupId + // CloudFormation resource type schema: + // + // { + // "maxLength": 79, + // "pattern": "[a-zA-Z][a-zA-Z0-9\\-\\.\\:]*", + // "type": "string" + // } + "backup_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: BackupRetentionCount + // CloudFormation resource type schema: + // + // { + // "minLength": 1, + // "type": "integer" + // } + "backup_retention_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomCertificate + // CloudFormation resource type schema: + // + // { + // "maxLength": 2097152, + // "pattern": "(?s)\\s*-----BEGIN CERTIFICATE-----.+-----END CERTIFICATE-----\\s*", + // "type": "string" + // } + "custom_certificate": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomDomain + // CloudFormation resource type schema: + // + // { + // "maxLength": 253, + // "pattern": "", + // "type": "string" + // } + "custom_domain": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomPrivateKey + // CloudFormation resource type schema: + // + // { + // "maxLength": 4096, + // "pattern": "(?ms)\\s*^-----BEGIN (?-s:.*)PRIVATE KEY-----$.*?^-----END (?-s:.*)PRIVATE KEY-----$\\s*", + // "type": "string" + // } + "custom_private_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DisableAutomatedBackup + // CloudFormation resource type schema: + // + // { + // "type": "boolean" + // } + "disable_automated_backup": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Endpoint + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Engine + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "engine": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EngineAttributes + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "properties": { + // "Name": { + // "maxLength": 10000, + // "pattern": "(?s).*", + // "type": "string" + // }, + // "Value": { + // "maxLength": 10000, + // "pattern": "(?s).*", + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "engine_attributes": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EngineModel + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "engine_model": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EngineVersion + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "engine_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InstanceProfileArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "arn:aws:iam::[0-9]{12}:instance-profile/.*", + // "type": "string" + // } + "instance_profile_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: InstanceType + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "type": "string" + // } + "instance_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KeyPair + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": ".*", + // "type": "string" + // } + "key_pair": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PreferredBackupWindow + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$", + // "type": "string" + // } + "preferred_backup_window": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PreferredMaintenanceWindow + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$", + // "type": "string" + // } + "preferred_maintenance_window": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SecurityGroupIds + // CloudFormation resource type schema: + // + // { + // "items": { + // "maxLength": 10000, + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServerName + // CloudFormation resource type schema: + // + // { + // "maxLength": 40, + // "minLength": 1, + // "pattern": "[a-zA-Z][a-zA-Z0-9\\-]*", + // "type": "string" + // } + "server_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceRoleArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 10000, + // "pattern": "arn:aws:iam::[0-9]{12}:role/.*", + // "type": "string" + // } + "service_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SubnetIds + // CloudFormation resource type schema: + // + // { + // "items": { + // "maxLength": 10000, + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "subnet_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 0, + // "pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$", + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::OpsWorksCM::Server", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::OpsWorksCM::Server").WithTerraformTypeName("awscc_opsworkscm_server") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "associate_public_ip_address": "AssociatePublicIpAddress", + "backup_id": "BackupId", + "backup_retention_count": "BackupRetentionCount", + "custom_certificate": "CustomCertificate", + "custom_domain": "CustomDomain", + "custom_private_key": "CustomPrivateKey", + "disable_automated_backup": "DisableAutomatedBackup", + "endpoint": "Endpoint", + "engine": "Engine", + "engine_attributes": "EngineAttributes", + "engine_model": "EngineModel", + "engine_version": "EngineVersion", + "instance_profile_arn": "InstanceProfileArn", + "instance_type": "InstanceType", + "key": "Key", + "key_pair": "KeyPair", + "name": "Name", + "preferred_backup_window": "PreferredBackupWindow", + "preferred_maintenance_window": "PreferredMaintenanceWindow", + "security_group_ids": "SecurityGroupIds", + "server_name": "ServerName", + "service_role_arn": "ServiceRoleArn", + "subnet_ids": "SubnetIds", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/opsworkscm/server_singular_data_source_gen_test.go b/internal/aws/opsworkscm/server_singular_data_source_gen_test.go new file mode 100644 index 000000000..69be3d9cf --- /dev/null +++ b/internal/aws/opsworkscm/server_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package opsworkscm_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSOpsWorksCMServerDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpsWorksCM::Server", "awscc_opsworkscm_server", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSOpsWorksCMServerDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::OpsWorksCM::Server", "awscc_opsworkscm_server", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/organizations/account_resource_gen.go b/internal/aws/organizations/account_resource_gen.go index 4ca3b78ff..ee5f8d49c 100644 --- a/internal/aws/organizations/account_resource_gen.go +++ b/internal/aws/organizations/account_resource_gen.go @@ -265,6 +265,7 @@ func accountResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -283,7 +284,6 @@ func accountResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Organizations::Account").WithTerraformTypeName("awscc_organizations_account") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "account_name": "AccountName", diff --git a/internal/aws/organizations/organization_resource_gen.go b/internal/aws/organizations/organization_resource_gen.go index 3fb7a3134..b3b9ab233 100644 --- a/internal/aws/organizations/organization_resource_gen.go +++ b/internal/aws/organizations/organization_resource_gen.go @@ -76,7 +76,7 @@ func organizationResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^o-[a-z0-9]{10,32}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "organization_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier (ID) of an organization.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -148,6 +148,15 @@ func organizationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Organizations::Organization", Version: 1, @@ -158,14 +167,13 @@ func organizationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Organizations::Organization").WithTerraformTypeName("awscc_organizations_organization") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "feature_set": "FeatureSet", - "id": "Id", "management_account_arn": "ManagementAccountArn", "management_account_email": "ManagementAccountEmail", "management_account_id": "ManagementAccountId", + "organization_id": "Id", "root_id": "RootId", }) diff --git a/internal/aws/organizations/organization_singular_data_source_gen.go b/internal/aws/organizations/organization_singular_data_source_gen.go index 8181a8c45..fca437534 100644 --- a/internal/aws/organizations/organization_singular_data_source_gen.go +++ b/internal/aws/organizations/organization_singular_data_source_gen.go @@ -58,7 +58,7 @@ func organizationDataSource(ctx context.Context) (datasource.DataSource, error) // "pattern": "^o-[a-z0-9]{10,32}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "organization_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier (ID) of an organization.", Computed: true, }, /*END ATTRIBUTE*/ @@ -132,10 +132,10 @@ func organizationDataSource(ctx context.Context) (datasource.DataSource, error) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "feature_set": "FeatureSet", - "id": "Id", "management_account_arn": "ManagementAccountArn", "management_account_email": "ManagementAccountEmail", "management_account_id": "ManagementAccountId", + "organization_id": "Id", "root_id": "RootId", }) diff --git a/internal/aws/organizations/organizational_unit_resource_gen.go b/internal/aws/organizations/organizational_unit_resource_gen.go index 378dd1c5f..dd16abd8f 100644 --- a/internal/aws/organizations/organizational_unit_resource_gen.go +++ b/internal/aws/organizations/organizational_unit_resource_gen.go @@ -52,7 +52,7 @@ func organizationalUnitResource(ctx context.Context) (resource.Resource, error) // "pattern": "^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "organizational_unit_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier (ID) associated with this OU.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -159,6 +159,15 @@ func organizationalUnitResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "You can use organizational units (OUs) to group accounts together to administer as a single unit. This greatly simplifies the management of your accounts. For example, you can attach a policy-based control to an OU, and all accounts within the OU automatically inherit the policy. You can create multiple OUs within a single organization, and you can create OUs within other OUs. Each OU can contain multiple accounts, and you can move accounts from one OU to another. However, OU names must be unique within a parent OU or root.", Version: 1, @@ -169,15 +178,14 @@ func organizationalUnitResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Organizations::OrganizationalUnit").WithTerraformTypeName("awscc_organizations_organizational_unit") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "id": "Id", - "key": "Key", - "name": "Name", - "parent_id": "ParentId", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "key": "Key", + "name": "Name", + "organizational_unit_id": "Id", + "parent_id": "ParentId", + "tags": "Tags", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/organizations/organizational_unit_singular_data_source_gen.go b/internal/aws/organizations/organizational_unit_singular_data_source_gen.go index 5911ae2f1..9cfe5c09b 100644 --- a/internal/aws/organizations/organizational_unit_singular_data_source_gen.go +++ b/internal/aws/organizations/organizational_unit_singular_data_source_gen.go @@ -43,7 +43,7 @@ func organizationalUnitDataSource(ctx context.Context) (datasource.DataSource, e // "pattern": "^ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "organizational_unit_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier (ID) associated with this OU.", Computed: true, }, /*END ATTRIBUTE*/ @@ -141,13 +141,13 @@ func organizationalUnitDataSource(ctx context.Context) (datasource.DataSource, e opts = opts.WithCloudFormationTypeName("AWS::Organizations::OrganizationalUnit").WithTerraformTypeName("awscc_organizations_organizational_unit") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "id": "Id", - "key": "Key", - "name": "Name", - "parent_id": "ParentId", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "key": "Key", + "name": "Name", + "organizational_unit_id": "Id", + "parent_id": "ParentId", + "tags": "Tags", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/organizations/policy_resource_gen.go b/internal/aws/organizations/policy_resource_gen.go index 72e4f6520..96ab367e6 100644 --- a/internal/aws/organizations/policy_resource_gen.go +++ b/internal/aws/organizations/policy_resource_gen.go @@ -108,7 +108,7 @@ func policyResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^p-[0-9a-zA-Z_]{8,128}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the Policy", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -254,6 +254,15 @@ func policyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Policies in AWS Organizations enable you to manage different features of the AWS accounts in your organization. You can use policies when all features are enabled in your organization.", Version: 1, @@ -264,15 +273,14 @@ func policyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Organizations::Policy").WithTerraformTypeName("awscc_organizations_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "aws_managed": "AwsManaged", "content": "Content", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", + "policy_id": "Id", "tags": "Tags", "target_ids": "TargetIds", "type": "Type", diff --git a/internal/aws/organizations/policy_singular_data_source_gen.go b/internal/aws/organizations/policy_singular_data_source_gen.go index 8b6a3c91f..6ac6b22ab 100644 --- a/internal/aws/organizations/policy_singular_data_source_gen.go +++ b/internal/aws/organizations/policy_singular_data_source_gen.go @@ -82,7 +82,7 @@ func policyDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^p-[0-9a-zA-Z_]{8,128}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the Policy", Computed: true, }, /*END ATTRIBUTE*/ @@ -208,9 +208,9 @@ func policyDataSource(ctx context.Context) (datasource.DataSource, error) { "aws_managed": "AwsManaged", "content": "Content", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", + "policy_id": "Id", "tags": "Tags", "target_ids": "TargetIds", "type": "Type", diff --git a/internal/aws/organizations/resource_policy_resource_gen.go b/internal/aws/organizations/resource_policy_resource_gen.go index ecf6cf86b..77644e44e 100644 --- a/internal/aws/organizations/resource_policy_resource_gen.go +++ b/internal/aws/organizations/resource_policy_resource_gen.go @@ -70,7 +70,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^rp-[0-9a-zA-Z_]{4,128}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resource_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier (ID) associated with this resource policy.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -139,6 +139,15 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "You can use AWS::Organizations::ResourcePolicy to delegate policy management for AWS Organizations to specified member accounts to perform policy actions that are by default available only to the management account.", Version: 1, @@ -149,14 +158,13 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Organizations::ResourcePolicy").WithTerraformTypeName("awscc_organizations_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "content": "Content", - "id": "Id", - "key": "Key", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "content": "Content", + "key": "Key", + "resource_policy_id": "Id", + "tags": "Tags", + "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/organizations/resource_policy_singular_data_source_gen.go b/internal/aws/organizations/resource_policy_singular_data_source_gen.go index 32d07590c..7e8ff8600 100644 --- a/internal/aws/organizations/resource_policy_singular_data_source_gen.go +++ b/internal/aws/organizations/resource_policy_singular_data_source_gen.go @@ -57,7 +57,7 @@ func resourcePolicyDataSource(ctx context.Context) (datasource.DataSource, error // "pattern": "^rp-[0-9a-zA-Z_]{4,128}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resource_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The unique identifier (ID) associated with this resource policy.", Computed: true, }, /*END ATTRIBUTE*/ @@ -128,12 +128,12 @@ func resourcePolicyDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::Organizations::ResourcePolicy").WithTerraformTypeName("awscc_organizations_resource_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "content": "Content", - "id": "Id", - "key": "Key", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "content": "Content", + "key": "Key", + "resource_policy_id": "Id", + "tags": "Tags", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/osis/pipeline_resource_gen.go b/internal/aws/osis/pipeline_resource_gen.go index c9a86431c..274cbc8d0 100644 --- a/internal/aws/osis/pipeline_resource_gen.go +++ b/internal/aws/osis/pipeline_resource_gen.go @@ -514,6 +514,7 @@ func pipelineResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -532,7 +533,6 @@ func pipelineResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::OSIS::Pipeline").WithTerraformTypeName("awscc_osis_pipeline") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "buffer_options": "BufferOptions", "cloudwatch_log_destination": "CloudWatchLogDestination", diff --git a/internal/aws/panorama/application_instance_resource_gen.go b/internal/aws/panorama/application_instance_resource_gen.go index 115492518..55b7cff5a 100644 --- a/internal/aws/panorama/application_instance_resource_gen.go +++ b/internal/aws/panorama/application_instance_resource_gen.go @@ -394,6 +394,7 @@ func applicationInstanceResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -412,7 +413,6 @@ func applicationInstanceResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Panorama::ApplicationInstance").WithTerraformTypeName("awscc_panorama_application_instance") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_instance_id": "ApplicationInstanceId", "application_instance_id_to_replace": "ApplicationInstanceIdToReplace", diff --git a/internal/aws/panorama/package_resource_gen.go b/internal/aws/panorama/package_resource_gen.go index d8f7e880f..7f1748b2e 100644 --- a/internal/aws/panorama/package_resource_gen.go +++ b/internal/aws/panorama/package_resource_gen.go @@ -217,6 +217,7 @@ func packageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -235,7 +236,6 @@ func packageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Panorama::Package").WithTerraformTypeName("awscc_panorama_package") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "binary_prefix_location": "BinaryPrefixLocation", diff --git a/internal/aws/panorama/package_version_resource_gen.go b/internal/aws/panorama/package_version_resource_gen.go index f02e5ae1c..3f303329e 100644 --- a/internal/aws/panorama/package_version_resource_gen.go +++ b/internal/aws/panorama/package_version_resource_gen.go @@ -228,6 +228,7 @@ func packageVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -246,7 +247,6 @@ func packageVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Panorama::PackageVersion").WithTerraformTypeName("awscc_panorama_package_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "is_latest_patch": "IsLatestPatch", "mark_latest": "MarkLatest", diff --git a/internal/aws/pcaconnectorad/connector_resource_gen.go b/internal/aws/pcaconnectorad/connector_resource_gen.go index 174362d59..f67a5d401 100644 --- a/internal/aws/pcaconnectorad/connector_resource_gen.go +++ b/internal/aws/pcaconnectorad/connector_resource_gen.go @@ -153,6 +153,7 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -171,7 +172,6 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::PCAConnectorAD::Connector").WithTerraformTypeName("awscc_pcaconnectorad_connector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "certificate_authority_arn": "CertificateAuthorityArn", "connector_arn": "ConnectorArn", diff --git a/internal/aws/pcaconnectorad/directory_registration_resource_gen.go b/internal/aws/pcaconnectorad/directory_registration_resource_gen.go index f583e3d2d..4ac6285af 100644 --- a/internal/aws/pcaconnectorad/directory_registration_resource_gen.go +++ b/internal/aws/pcaconnectorad/directory_registration_resource_gen.go @@ -85,6 +85,7 @@ func directoryRegistrationResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -103,7 +104,6 @@ func directoryRegistrationResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::PCAConnectorAD::DirectoryRegistration").WithTerraformTypeName("awscc_pcaconnectorad_directory_registration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "directory_id": "DirectoryId", "directory_registration_arn": "DirectoryRegistrationArn", diff --git a/internal/aws/pcaconnectorad/service_principal_name_resource_gen.go b/internal/aws/pcaconnectorad/service_principal_name_resource_gen.go index ae2460e63..39c7464b6 100644 --- a/internal/aws/pcaconnectorad/service_principal_name_resource_gen.go +++ b/internal/aws/pcaconnectorad/service_principal_name_resource_gen.go @@ -71,6 +71,7 @@ func servicePrincipalNameResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -89,7 +90,6 @@ func servicePrincipalNameResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::PCAConnectorAD::ServicePrincipalName").WithTerraformTypeName("awscc_pcaconnectorad_service_principal_name") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "connector_arn": "ConnectorArn", "directory_registration_arn": "DirectoryRegistrationArn", diff --git a/internal/aws/pcaconnectorad/template_group_access_control_entry_resource_gen.go b/internal/aws/pcaconnectorad/template_group_access_control_entry_resource_gen.go index f82bf8376..d60276949 100644 --- a/internal/aws/pcaconnectorad/template_group_access_control_entry_resource_gen.go +++ b/internal/aws/pcaconnectorad/template_group_access_control_entry_resource_gen.go @@ -145,6 +145,7 @@ func templateGroupAccessControlEntryResource(ctx context.Context) (resource.Reso }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -163,7 +164,6 @@ func templateGroupAccessControlEntryResource(ctx context.Context) (resource.Reso opts = opts.WithCloudFormationTypeName("AWS::PCAConnectorAD::TemplateGroupAccessControlEntry").WithTerraformTypeName("awscc_pcaconnectorad_template_group_access_control_entry") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_rights": "AccessRights", "auto_enroll": "AutoEnroll", diff --git a/internal/aws/pcaconnectorad/template_resource_gen.go b/internal/aws/pcaconnectorad/template_resource_gen.go index 00dcd4958..781fb6a80 100644 --- a/internal/aws/pcaconnectorad/template_resource_gen.go +++ b/internal/aws/pcaconnectorad/template_resource_gen.go @@ -3000,6 +3000,7 @@ func templateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3018,7 +3019,6 @@ func templateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::PCAConnectorAD::Template").WithTerraformTypeName("awscc_pcaconnectorad_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm": "Algorithm", "application_policies": "ApplicationPolicies", diff --git a/internal/aws/personalize/dataset_group_resource_gen.go b/internal/aws/personalize/dataset_group_resource_gen.go index 824d06f01..b3bd248e1 100644 --- a/internal/aws/personalize/dataset_group_resource_gen.go +++ b/internal/aws/personalize/dataset_group_resource_gen.go @@ -137,6 +137,7 @@ func datasetGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -155,7 +156,6 @@ func datasetGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Personalize::DatasetGroup").WithTerraformTypeName("awscc_personalize_dataset_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dataset_group_arn": "DatasetGroupArn", "domain": "Domain", diff --git a/internal/aws/personalize/dataset_resource_gen.go b/internal/aws/personalize/dataset_resource_gen.go index 2cd7fed10..41bf2ad89 100644 --- a/internal/aws/personalize/dataset_resource_gen.go +++ b/internal/aws/personalize/dataset_resource_gen.go @@ -269,6 +269,7 @@ func datasetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -287,7 +288,6 @@ func datasetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Personalize::Dataset").WithTerraformTypeName("awscc_personalize_dataset") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "data_location": "DataLocation", "data_source": "DataSource", diff --git a/internal/aws/personalize/schema_resource_gen.go b/internal/aws/personalize/schema_resource_gen.go index c17b494fa..71fe7eee8 100644 --- a/internal/aws/personalize/schema_resource_gen.go +++ b/internal/aws/personalize/schema_resource_gen.go @@ -110,6 +110,7 @@ func schemaResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -128,7 +129,6 @@ func schemaResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Personalize::Schema").WithTerraformTypeName("awscc_personalize_schema") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "domain": "Domain", "name": "Name", diff --git a/internal/aws/personalize/solution_resource_gen.go b/internal/aws/personalize/solution_resource_gen.go index 959b7f203..b967fde9b 100644 --- a/internal/aws/personalize/solution_resource_gen.go +++ b/internal/aws/personalize/solution_resource_gen.go @@ -708,6 +708,7 @@ func solutionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -726,7 +727,6 @@ func solutionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Personalize::Solution").WithTerraformTypeName("awscc_personalize_solution") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "algorithm_hyper_parameter_ranges": "AlgorithmHyperParameterRanges", "algorithm_hyper_parameters": "AlgorithmHyperParameters", diff --git a/internal/aws/pinpoint/in_app_template_resource_gen.go b/internal/aws/pinpoint/in_app_template_resource_gen.go index 1c70a1db2..e1420efb6 100644 --- a/internal/aws/pinpoint/in_app_template_resource_gen.go +++ b/internal/aws/pinpoint/in_app_template_resource_gen.go @@ -816,6 +816,7 @@ func inAppTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -834,7 +835,6 @@ func inAppTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Pinpoint::InAppTemplate").WithTerraformTypeName("awscc_pinpoint_in_app_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alignment": "Alignment", "android": "Android", diff --git a/internal/aws/pipes/pipe_resource_gen.go b/internal/aws/pipes/pipe_resource_gen.go index fe0479cdb..5f474f840 100644 --- a/internal/aws/pipes/pipe_resource_gen.go +++ b/internal/aws/pipes/pipe_resource_gen.go @@ -3618,6 +3618,7 @@ func pipeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3636,7 +3637,6 @@ func pipeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Pipes::Pipe").WithTerraformTypeName("awscc_pipes_pipe") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "active_mq_broker_parameters": "ActiveMQBrokerParameters", "additional_bootstrap_servers": "AdditionalBootstrapServers", diff --git a/internal/aws/proton/environment_account_connection_plural_data_source_gen.go b/internal/aws/proton/environment_account_connection_plural_data_source_gen.go new file mode 100644 index 000000000..30f4ea641 --- /dev/null +++ b/internal/aws/proton/environment_account_connection_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package proton + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_proton_environment_account_connections", environmentAccountConnectionsDataSource) +} + +// environmentAccountConnectionsDataSource returns the Terraform awscc_proton_environment_account_connections data source. +// This Terraform data source corresponds to the CloudFormation AWS::Proton::EnvironmentAccountConnection resource. +func environmentAccountConnectionsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::Proton::EnvironmentAccountConnection", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Proton::EnvironmentAccountConnection").WithTerraformTypeName("awscc_proton_environment_account_connections") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/proton/environment_account_connection_plural_data_source_gen_test.go b/internal/aws/proton/environment_account_connection_plural_data_source_gen_test.go new file mode 100644 index 000000000..30a143e03 --- /dev/null +++ b/internal/aws/proton/environment_account_connection_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package proton_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSProtonEnvironmentAccountConnectionsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Proton::EnvironmentAccountConnection", "awscc_proton_environment_account_connections", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/proton/environment_account_connection_resource_gen.go b/internal/aws/proton/environment_account_connection_resource_gen.go new file mode 100644 index 000000000..810d09776 --- /dev/null +++ b/internal/aws/proton/environment_account_connection_resource_gen.go @@ -0,0 +1,312 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package proton + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_proton_environment_account_connection", environmentAccountConnectionResource) +} + +// environmentAccountConnectionResource returns the Terraform awscc_proton_environment_account_connection resource. +// This Terraform resource corresponds to the CloudFormation AWS::Proton::EnvironmentAccountConnection resource. +func environmentAccountConnectionResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the environment account connection.", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the environment account connection.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CodebuildRoleArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.", + // "maxLength": 200, + // "minLength": 1, + // "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$", + // "type": "string" + // } + "codebuild_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 200), + stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ComponentRoleArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account.", + // "maxLength": 200, + // "minLength": 1, + // "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$", + // "type": "string" + // } + "component_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 200), + stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EnvironmentAccountId + // CloudFormation resource type schema: + // + // { + // "description": "The environment account that's connected to the environment account connection.", + // "pattern": "^\\d{12}$", + // "type": "string" + // } + "environment_account_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The environment account that's connected to the environment account connection.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^\\d{12}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EnvironmentName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the AWS Proton environment that's created in the associated management account.", + // "maxLength": 100, + // "minLength": 1, + // "pattern": "^[0-9A-Za-z]+[0-9A-Za-z_\\-]*$", + // "type": "string" + // } + "environment_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the AWS Proton environment that's created in the associated management account.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 100), + stringvalidator.RegexMatches(regexp.MustCompile("^[0-9A-Za-z]+[0-9A-Za-z_\\-]*$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the environment account connection.", + // "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + // "type": "string" + // } + "environment_account_connection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the environment account connection.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ManagementAccountId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.", + // "pattern": "^\\d{12}$", + // "type": "string" + // } + "management_account_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^\\d{12}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RoleArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account.", + // "maxLength": 200, + // "minLength": 1, + // "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$", + // "type": "string" + // } + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 200), + stringvalidator.RegexMatches(regexp.MustCompile("^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "description": "The status of the environment account connection.", + // "enum": [ + // "PENDING", + // "CONNECTED", + // "REJECTED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The status of the environment account connection.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "\u003cp\u003eAn optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.\u003c/p\u003e\n \u003cp\u003eFor more information, see \u003ca href=\"https://docs.aws.amazon.com/proton/latest/userguide/resources.html\"\u003eProton resources and tagging\u003c/a\u003e in the\n \u003ci\u003eProton User Guide\u003c/i\u003e.\u003c/p\u003e", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "\u003cp\u003eA description of a resource tag.\u003c/p\u003e", + // "properties": { + // "Key": { + // "description": "\u003cp\u003eThe key of the resource tag.\u003c/p\u003e", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "\u003cp\u003eThe value of the resource tag.\u003c/p\u003e", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "

The key of the resource tag.

", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "

The value of the resource tag.

", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "

An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.

\n

For more information, see Proton resources and tagging in the\n Proton User Guide.

", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Schema describing various properties for AWS Proton Environment Account Connections resources.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Proton::EnvironmentAccountConnection").WithTerraformTypeName("awscc_proton_environment_account_connection") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "codebuild_role_arn": "CodebuildRoleArn", + "component_role_arn": "ComponentRoleArn", + "environment_account_connection_id": "Id", + "environment_account_id": "EnvironmentAccountId", + "environment_name": "EnvironmentName", + "key": "Key", + "management_account_id": "ManagementAccountId", + "role_arn": "RoleArn", + "status": "Status", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/proton/environment_account_connection_resource_gen_test.go b/internal/aws/proton/environment_account_connection_resource_gen_test.go new file mode 100644 index 000000000..d5c07549a --- /dev/null +++ b/internal/aws/proton/environment_account_connection_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package proton_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSProtonEnvironmentAccountConnection_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Proton::EnvironmentAccountConnection", "awscc_proton_environment_account_connection", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSProtonEnvironmentAccountConnection_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Proton::EnvironmentAccountConnection", "awscc_proton_environment_account_connection", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/proton/environment_account_connection_singular_data_source_gen.go b/internal/aws/proton/environment_account_connection_singular_data_source_gen.go new file mode 100644 index 000000000..67c813047 --- /dev/null +++ b/internal/aws/proton/environment_account_connection_singular_data_source_gen.go @@ -0,0 +1,232 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package proton + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_proton_environment_account_connection", environmentAccountConnectionDataSource) +} + +// environmentAccountConnectionDataSource returns the Terraform awscc_proton_environment_account_connection data source. +// This Terraform data source corresponds to the CloudFormation AWS::Proton::EnvironmentAccountConnection resource. +func environmentAccountConnectionDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the environment account connection.", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the environment account connection.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CodebuildRoleArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.", + // "maxLength": 200, + // "minLength": 1, + // "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$", + // "type": "string" + // } + "codebuild_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ComponentRoleArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account.", + // "maxLength": 200, + // "minLength": 1, + // "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$", + // "type": "string" + // } + "component_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EnvironmentAccountId + // CloudFormation resource type schema: + // + // { + // "description": "The environment account that's connected to the environment account connection.", + // "pattern": "^\\d{12}$", + // "type": "string" + // } + "environment_account_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The environment account that's connected to the environment account connection.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EnvironmentName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the AWS Proton environment that's created in the associated management account.", + // "maxLength": 100, + // "minLength": 1, + // "pattern": "^[0-9A-Za-z]+[0-9A-Za-z_\\-]*$", + // "type": "string" + // } + "environment_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the AWS Proton environment that's created in the associated management account.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the environment account connection.", + // "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + // "type": "string" + // } + "environment_account_connection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the environment account connection.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ManagementAccountId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.", + // "pattern": "^\\d{12}$", + // "type": "string" + // } + "management_account_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RoleArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account.", + // "maxLength": 200, + // "minLength": 1, + // "pattern": "^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/([\\w+=,.@-]{1,512}[/:])*([\\w+=,.@-]{1,64})$", + // "type": "string" + // } + "role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "description": "The status of the environment account connection.", + // "enum": [ + // "PENDING", + // "CONNECTED", + // "REJECTED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The status of the environment account connection.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "\u003cp\u003eAn optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.\u003c/p\u003e\n \u003cp\u003eFor more information, see \u003ca href=\"https://docs.aws.amazon.com/proton/latest/userguide/resources.html\"\u003eProton resources and tagging\u003c/a\u003e in the\n \u003ci\u003eProton User Guide\u003c/i\u003e.\u003c/p\u003e", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "\u003cp\u003eA description of a resource tag.\u003c/p\u003e", + // "properties": { + // "Key": { + // "description": "\u003cp\u003eThe key of the resource tag.\u003c/p\u003e", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "\u003cp\u003eThe value of the resource tag.\u003c/p\u003e", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "

The key of the resource tag.

", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "

The value of the resource tag.

", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "

An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.

\n

For more information, see Proton resources and tagging in the\n Proton User Guide.

", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::Proton::EnvironmentAccountConnection", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Proton::EnvironmentAccountConnection").WithTerraformTypeName("awscc_proton_environment_account_connection") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "codebuild_role_arn": "CodebuildRoleArn", + "component_role_arn": "ComponentRoleArn", + "environment_account_connection_id": "Id", + "environment_account_id": "EnvironmentAccountId", + "environment_name": "EnvironmentName", + "key": "Key", + "management_account_id": "ManagementAccountId", + "role_arn": "RoleArn", + "status": "Status", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/proton/environment_account_connection_singular_data_source_gen_test.go b/internal/aws/proton/environment_account_connection_singular_data_source_gen_test.go new file mode 100644 index 000000000..85aa4ffea --- /dev/null +++ b/internal/aws/proton/environment_account_connection_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package proton_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSProtonEnvironmentAccountConnectionDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Proton::EnvironmentAccountConnection", "awscc_proton_environment_account_connection", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSProtonEnvironmentAccountConnectionDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Proton::EnvironmentAccountConnection", "awscc_proton_environment_account_connection", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/proton/environment_template_resource_gen.go b/internal/aws/proton/environment_template_resource_gen.go index 0ab44a545..0ff1d504c 100644 --- a/internal/aws/proton/environment_template_resource_gen.go +++ b/internal/aws/proton/environment_template_resource_gen.go @@ -216,6 +216,7 @@ func environmentTemplateResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -234,7 +235,6 @@ func environmentTemplateResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Proton::EnvironmentTemplate").WithTerraformTypeName("awscc_proton_environment_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/proton/service_template_resource_gen.go b/internal/aws/proton/service_template_resource_gen.go index 23bc4283d..01e4ac8a5 100644 --- a/internal/aws/proton/service_template_resource_gen.go +++ b/internal/aws/proton/service_template_resource_gen.go @@ -219,6 +219,7 @@ func serviceTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -237,7 +238,6 @@ func serviceTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Proton::ServiceTemplate").WithTerraformTypeName("awscc_proton_service_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/qldb/stream_resource_gen.go b/internal/aws/qldb/stream_resource_gen.go index 231219566..3fce16f9d 100644 --- a/internal/aws/qldb/stream_resource_gen.go +++ b/internal/aws/qldb/stream_resource_gen.go @@ -64,7 +64,7 @@ func streamResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "stream_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -231,6 +231,15 @@ func streamResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::QLDB::Stream.", Version: 1, @@ -241,18 +250,17 @@ func streamResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QLDB::Stream").WithTerraformTypeName("awscc_qldb_stream") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation_enabled": "AggregationEnabled", "arn": "Arn", "exclusive_end_time": "ExclusiveEndTime", - "id": "Id", "inclusive_start_time": "InclusiveStartTime", "key": "Key", "kinesis_configuration": "KinesisConfiguration", "ledger_name": "LedgerName", "role_arn": "RoleArn", "stream_arn": "StreamArn", + "stream_id": "Id", "stream_name": "StreamName", "tags": "Tags", "value": "Value", diff --git a/internal/aws/qldb/stream_singular_data_source_gen.go b/internal/aws/qldb/stream_singular_data_source_gen.go index 933417e6e..e44efc1da 100644 --- a/internal/aws/qldb/stream_singular_data_source_gen.go +++ b/internal/aws/qldb/stream_singular_data_source_gen.go @@ -47,7 +47,7 @@ func streamDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "stream_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: InclusiveStartTime @@ -187,13 +187,13 @@ func streamDataSource(ctx context.Context) (datasource.DataSource, error) { "aggregation_enabled": "AggregationEnabled", "arn": "Arn", "exclusive_end_time": "ExclusiveEndTime", - "id": "Id", "inclusive_start_time": "InclusiveStartTime", "key": "Key", "kinesis_configuration": "KinesisConfiguration", "ledger_name": "LedgerName", "role_arn": "RoleArn", "stream_arn": "StreamArn", + "stream_id": "Id", "stream_name": "StreamName", "tags": "Tags", "value": "Value", diff --git a/internal/aws/quicksight/analysis_resource_gen.go b/internal/aws/quicksight/analysis_resource_gen.go index 09e1950df..cad51a477 100644 --- a/internal/aws/quicksight/analysis_resource_gen.go +++ b/internal/aws/quicksight/analysis_resource_gen.go @@ -813,6 +813,7 @@ func analysisResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -831,7 +832,6 @@ func analysisResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::Analysis").WithTerraformTypeName("awscc_quicksight_analysis") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "analysis_id": "AnalysisId", diff --git a/internal/aws/quicksight/dashboard_resource_gen.go b/internal/aws/quicksight/dashboard_resource_gen.go index f39dee453..a677bdedd 100644 --- a/internal/aws/quicksight/dashboard_resource_gen.go +++ b/internal/aws/quicksight/dashboard_resource_gen.go @@ -1018,6 +1018,7 @@ func dashboardResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1036,7 +1037,6 @@ func dashboardResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::Dashboard").WithTerraformTypeName("awscc_quicksight_dashboard") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "ad_hoc_filtering_option": "AdHocFilteringOption", diff --git a/internal/aws/quicksight/data_set_resource_gen.go b/internal/aws/quicksight/data_set_resource_gen.go index d90fac95f..ff99867f6 100644 --- a/internal/aws/quicksight/data_set_resource_gen.go +++ b/internal/aws/quicksight/data_set_resource_gen.go @@ -1980,6 +1980,7 @@ func dataSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1998,7 +1999,6 @@ func dataSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::DataSet").WithTerraformTypeName("awscc_quicksight_data_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "alias": "Alias", diff --git a/internal/aws/quicksight/data_source_resource_gen.go b/internal/aws/quicksight/data_source_resource_gen.go index f81577303..7637b5961 100644 --- a/internal/aws/quicksight/data_source_resource_gen.go +++ b/internal/aws/quicksight/data_source_resource_gen.go @@ -4377,6 +4377,7 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -4395,7 +4396,6 @@ func dataSourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::DataSource").WithTerraformTypeName("awscc_quicksight_data_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "alternate_data_source_parameters": "AlternateDataSourceParameters", diff --git a/internal/aws/quicksight/refresh_schedule_resource_gen.go b/internal/aws/quicksight/refresh_schedule_resource_gen.go index 09711296f..acecc313f 100644 --- a/internal/aws/quicksight/refresh_schedule_resource_gen.go +++ b/internal/aws/quicksight/refresh_schedule_resource_gen.go @@ -305,6 +305,7 @@ func refreshScheduleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -323,7 +324,6 @@ func refreshScheduleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::RefreshSchedule").WithTerraformTypeName("awscc_quicksight_refresh_schedule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "aws_account_id": "AwsAccountId", diff --git a/internal/aws/quicksight/template_resource_gen.go b/internal/aws/quicksight/template_resource_gen.go index 442f4900f..3fd703382 100644 --- a/internal/aws/quicksight/template_resource_gen.go +++ b/internal/aws/quicksight/template_resource_gen.go @@ -746,6 +746,7 @@ func templateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -764,7 +765,6 @@ func templateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::Template").WithTerraformTypeName("awscc_quicksight_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "arn": "Arn", diff --git a/internal/aws/quicksight/theme_resource_gen.go b/internal/aws/quicksight/theme_resource_gen.go index 7d2c0a0cc..28b20af8c 100644 --- a/internal/aws/quicksight/theme_resource_gen.go +++ b/internal/aws/quicksight/theme_resource_gen.go @@ -1271,6 +1271,7 @@ func themeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1289,7 +1290,6 @@ func themeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::Theme").WithTerraformTypeName("awscc_quicksight_theme") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accent": "Accent", "accent_foreground": "AccentForeground", diff --git a/internal/aws/quicksight/topic_resource_gen.go b/internal/aws/quicksight/topic_resource_gen.go index e1aa97887..d3547ffdc 100644 --- a/internal/aws/quicksight/topic_resource_gen.go +++ b/internal/aws/quicksight/topic_resource_gen.go @@ -3124,6 +3124,7 @@ func topicResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3142,7 +3143,6 @@ func topicResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::Topic").WithTerraformTypeName("awscc_quicksight_topic") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation": "Aggregation", "aggregation_function_parameters": "AggregationFunctionParameters", diff --git a/internal/aws/quicksight/vpc_connection_resource_gen.go b/internal/aws/quicksight/vpc_connection_resource_gen.go index 86bd22f3e..065bae116 100644 --- a/internal/aws/quicksight/vpc_connection_resource_gen.go +++ b/internal/aws/quicksight/vpc_connection_resource_gen.go @@ -422,6 +422,7 @@ func vPCConnectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -440,7 +441,6 @@ func vPCConnectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::QuickSight::VPCConnection").WithTerraformTypeName("awscc_quicksight_vpc_connection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "availability_status": "AvailabilityStatus", diff --git a/internal/aws/ram/permission_resource_gen.go b/internal/aws/ram/permission_resource_gen.go index 4ea56170b..a5c847e76 100644 --- a/internal/aws/ram/permission_resource_gen.go +++ b/internal/aws/ram/permission_resource_gen.go @@ -184,6 +184,7 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -202,7 +203,6 @@ func permissionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RAM::Permission").WithTerraformTypeName("awscc_ram_permission") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "is_resource_type_default": "IsResourceTypeDefault", diff --git a/internal/aws/rds/custom_db_engine_version_resource_gen.go b/internal/aws/rds/custom_db_engine_version_resource_gen.go index 76a5ee4df..9a2c0e0a9 100644 --- a/internal/aws/rds/custom_db_engine_version_resource_gen.go +++ b/internal/aws/rds/custom_db_engine_version_resource_gen.go @@ -277,6 +277,7 @@ func customDBEngineVersionResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -295,7 +296,6 @@ func customDBEngineVersionResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::RDS::CustomDBEngineVersion").WithTerraformTypeName("awscc_rds_custom_db_engine_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "database_installation_files_s3_bucket_name": "DatabaseInstallationFilesS3BucketName", "database_installation_files_s3_prefix": "DatabaseInstallationFilesS3Prefix", diff --git a/internal/aws/rds/db_cluster_parameter_group_resource_gen.go b/internal/aws/rds/db_cluster_parameter_group_resource_gen.go index 5417f9602..39d3ca306 100644 --- a/internal/aws/rds/db_cluster_parameter_group_resource_gen.go +++ b/internal/aws/rds/db_cluster_parameter_group_resource_gen.go @@ -157,6 +157,7 @@ func dBClusterParameterGroupResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -175,7 +176,6 @@ func dBClusterParameterGroupResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::RDS::DBClusterParameterGroup").WithTerraformTypeName("awscc_rds_db_cluster_parameter_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "db_cluster_parameter_group_name": "DBClusterParameterGroupName", "description": "Description", diff --git a/internal/aws/rds/db_cluster_resource_gen.go b/internal/aws/rds/db_cluster_resource_gen.go index de3de0865..5e7f2571c 100644 --- a/internal/aws/rds/db_cluster_resource_gen.go +++ b/internal/aws/rds/db_cluster_resource_gen.go @@ -1277,6 +1277,7 @@ func dBClusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1295,7 +1296,6 @@ func dBClusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::DBCluster").WithTerraformTypeName("awscc_rds_db_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "allocated_storage": "AllocatedStorage", diff --git a/internal/aws/rds/db_instance_resource_gen.go b/internal/aws/rds/db_instance_resource_gen.go index 3a125a85e..0a7f94864 100644 --- a/internal/aws/rds/db_instance_resource_gen.go +++ b/internal/aws/rds/db_instance_resource_gen.go @@ -1539,6 +1539,7 @@ func dBInstanceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1557,7 +1558,6 @@ func dBInstanceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::DBInstance").WithTerraformTypeName("awscc_rds_db_instance") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "allocated_storage": "AllocatedStorage", diff --git a/internal/aws/rds/db_parameter_group_resource_gen.go b/internal/aws/rds/db_parameter_group_resource_gen.go index 12754d7e1..861d98f86 100644 --- a/internal/aws/rds/db_parameter_group_resource_gen.go +++ b/internal/aws/rds/db_parameter_group_resource_gen.go @@ -164,6 +164,7 @@ func dBParameterGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -182,7 +183,6 @@ func dBParameterGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::DBParameterGroup").WithTerraformTypeName("awscc_rds_db_parameter_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "db_parameter_group_name": "DBParameterGroupName", "description": "Description", diff --git a/internal/aws/rds/db_proxy_endpoint_resource_gen.go b/internal/aws/rds/db_proxy_endpoint_resource_gen.go index a8598543c..e5af72f81 100644 --- a/internal/aws/rds/db_proxy_endpoint_resource_gen.go +++ b/internal/aws/rds/db_proxy_endpoint_resource_gen.go @@ -266,6 +266,7 @@ func dBProxyEndpointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -284,7 +285,6 @@ func dBProxyEndpointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::DBProxyEndpoint").WithTerraformTypeName("awscc_rds_db_proxy_endpoint") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "db_proxy_endpoint_arn": "DBProxyEndpointArn", "db_proxy_endpoint_name": "DBProxyEndpointName", diff --git a/internal/aws/rds/db_proxy_resource_gen.go b/internal/aws/rds/db_proxy_resource_gen.go index d9d2be9fb..3e8923e5d 100644 --- a/internal/aws/rds/db_proxy_resource_gen.go +++ b/internal/aws/rds/db_proxy_resource_gen.go @@ -416,6 +416,7 @@ func dBProxyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -434,7 +435,6 @@ func dBProxyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::DBProxy").WithTerraformTypeName("awscc_rds_db_proxy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "auth": "Auth", "auth_scheme": "AuthScheme", diff --git a/internal/aws/rds/db_proxy_target_group_resource_gen.go b/internal/aws/rds/db_proxy_target_group_resource_gen.go index 3320cf799..6857ae7d9 100644 --- a/internal/aws/rds/db_proxy_target_group_resource_gen.go +++ b/internal/aws/rds/db_proxy_target_group_resource_gen.go @@ -227,6 +227,7 @@ func dBProxyTargetGroupResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -245,7 +246,6 @@ func dBProxyTargetGroupResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::RDS::DBProxyTargetGroup").WithTerraformTypeName("awscc_rds_db_proxy_target_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "connection_borrow_timeout": "ConnectionBorrowTimeout", "connection_pool_configuration_info": "ConnectionPoolConfigurationInfo", diff --git a/internal/aws/rds/db_subnet_group_resource_gen.go b/internal/aws/rds/db_subnet_group_resource_gen.go index 9e904d9fa..067d0f7c6 100644 --- a/internal/aws/rds/db_subnet_group_resource_gen.go +++ b/internal/aws/rds/db_subnet_group_resource_gen.go @@ -144,6 +144,7 @@ func dBSubnetGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -162,7 +163,6 @@ func dBSubnetGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::DBSubnetGroup").WithTerraformTypeName("awscc_rds_db_subnet_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "db_subnet_group_description": "DBSubnetGroupDescription", "db_subnet_group_name": "DBSubnetGroupName", diff --git a/internal/aws/rds/event_subscription_resource_gen.go b/internal/aws/rds/event_subscription_resource_gen.go index f20acd115..e911f2295 100644 --- a/internal/aws/rds/event_subscription_resource_gen.go +++ b/internal/aws/rds/event_subscription_resource_gen.go @@ -211,6 +211,7 @@ func eventSubscriptionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -229,7 +230,6 @@ func eventSubscriptionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::EventSubscription").WithTerraformTypeName("awscc_rds_event_subscription") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "enabled": "Enabled", "event_categories": "EventCategories", diff --git a/internal/aws/rds/global_cluster_resource_gen.go b/internal/aws/rds/global_cluster_resource_gen.go index 9d96168dd..0bfbe69fe 100644 --- a/internal/aws/rds/global_cluster_resource_gen.go +++ b/internal/aws/rds/global_cluster_resource_gen.go @@ -144,6 +144,7 @@ func globalClusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -162,7 +163,6 @@ func globalClusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::GlobalCluster").WithTerraformTypeName("awscc_rds_global_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "deletion_protection": "DeletionProtection", "engine": "Engine", diff --git a/internal/aws/rds/integration_resource_gen.go b/internal/aws/rds/integration_resource_gen.go index 2901d953b..17afb178b 100644 --- a/internal/aws/rds/integration_resource_gen.go +++ b/internal/aws/rds/integration_resource_gen.go @@ -216,6 +216,7 @@ func integrationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -234,7 +235,6 @@ func integrationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::Integration").WithTerraformTypeName("awscc_rds_integration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "additional_encryption_context": "AdditionalEncryptionContext", "create_time": "CreateTime", diff --git a/internal/aws/rds/option_group_resource_gen.go b/internal/aws/rds/option_group_resource_gen.go index 7c0ce5c02..b93208c18 100644 --- a/internal/aws/rds/option_group_resource_gen.go +++ b/internal/aws/rds/option_group_resource_gen.go @@ -310,6 +310,7 @@ func optionGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -328,7 +329,6 @@ func optionGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RDS::OptionGroup").WithTerraformTypeName("awscc_rds_option_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "db_security_group_memberships": "DBSecurityGroupMemberships", "engine_name": "EngineName", diff --git a/internal/aws/redshift/cluster_parameter_group_resource_gen.go b/internal/aws/redshift/cluster_parameter_group_resource_gen.go index ad69ca912..94a72757e 100644 --- a/internal/aws/redshift/cluster_parameter_group_resource_gen.go +++ b/internal/aws/redshift/cluster_parameter_group_resource_gen.go @@ -187,6 +187,7 @@ func clusterParameterGroupResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -205,7 +206,6 @@ func clusterParameterGroupResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::Redshift::ClusterParameterGroup").WithTerraformTypeName("awscc_redshift_cluster_parameter_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "key": "Key", diff --git a/internal/aws/redshift/cluster_plural_data_source_gen.go b/internal/aws/redshift/cluster_plural_data_source_gen.go new file mode 100644 index 000000000..97ff2787c --- /dev/null +++ b/internal/aws/redshift/cluster_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package redshift + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_redshift_clusters", clustersDataSource) +} + +// clustersDataSource returns the Terraform awscc_redshift_clusters data source. +// This Terraform data source corresponds to the CloudFormation AWS::Redshift::Cluster resource. +func clustersDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::Redshift::Cluster", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Redshift::Cluster").WithTerraformTypeName("awscc_redshift_clusters") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/redshift/cluster_plural_data_source_gen_test.go b/internal/aws/redshift/cluster_plural_data_source_gen_test.go new file mode 100644 index 000000000..1dd6cd5ed --- /dev/null +++ b/internal/aws/redshift/cluster_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package redshift_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSRedshiftClustersDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Redshift::Cluster", "awscc_redshift_clusters", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/redshift/cluster_resource_gen.go b/internal/aws/redshift/cluster_resource_gen.go new file mode 100644 index 000000000..11779c535 --- /dev/null +++ b/internal/aws/redshift/cluster_resource_gen.go @@ -0,0 +1,1099 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package redshift + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_redshift_cluster", clusterResource) +} + +// clusterResource returns the Terraform awscc_redshift_cluster resource. +// This Terraform resource corresponds to the CloudFormation AWS::Redshift::Cluster resource. +func clusterResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AllowVersionUpgrade + // CloudFormation resource type schema: + // + // { + // "description": "Major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default value is True", + // "type": "boolean" + // } + "allow_version_upgrade": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default value is True", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AquaConfigurationStatus + // CloudFormation resource type schema: + // + // { + // "description": "The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values include the following.\n\nenabled - Use AQUA if it is available for the current Region and Amazon Redshift node type.\ndisabled - Don't use AQUA.\nauto - Amazon Redshift determines whether to use AQUA.\n", + // "type": "string" + // } + "aqua_configuration_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values include the following.\n\nenabled - Use AQUA if it is available for the current Region and Amazon Redshift node type.\ndisabled - Don't use AQUA.\nauto - Amazon Redshift determines whether to use AQUA.\n", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AutomatedSnapshotRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Default value is 1", + // "type": "integer" + // } + "automated_snapshot_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Default value is 1", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AvailabilityZone + // CloudFormation resource type schema: + // + // { + // "description": "The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint", + // "type": "string" + // } + "availability_zone": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AvailabilityZoneRelocation + // CloudFormation resource type schema: + // + // { + // "description": "The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster modification is complete.", + // "type": "boolean" + // } + "availability_zone_relocation": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster modification is complete.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AvailabilityZoneRelocationStatus + // CloudFormation resource type schema: + // + // { + // "description": "The availability zone relocation status of the cluster", + // "type": "string" + // } + "availability_zone_relocation_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The availability zone relocation status of the cluster", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Classic + // CloudFormation resource type schema: + // + // { + // "description": "A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false , the resize type is elastic.", + // "type": "boolean" + // } + "classic": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false , the resize type is elastic.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // Classic is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ClusterIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account", + // "maxLength": 63, + // "type": "string" + // } + "cluster_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(63), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ClusterNamespaceArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the cluster namespace.", + // "type": "string" + // } + "cluster_namespace_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the cluster namespace.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ClusterParameterGroupName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the parameter group to be associated with this cluster.", + // "maxLength": 255, + // "type": "string" + // } + "cluster_parameter_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the parameter group to be associated with this cluster.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(255), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ClusterSecurityGroups + // CloudFormation resource type schema: + // + // { + // "description": "A list of security groups to be associated with this cluster.", + // "insertionOrder": false, + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "cluster_security_groups": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "A list of security groups to be associated with this cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ClusterSubnetGroupName + // CloudFormation resource type schema: + // + // { + // "description": "The name of a cluster subnet group to be associated with this cluster.", + // "type": "string" + // } + "cluster_subnet_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of a cluster subnet group to be associated with this cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ClusterType + // CloudFormation resource type schema: + // + // { + // "description": "The type of the cluster. When cluster type is specified as single-node, the NumberOfNodes parameter is not required and if multi-node, the NumberOfNodes parameter is required", + // "type": "string" + // } + "cluster_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The type of the cluster. When cluster type is specified as single-node, the NumberOfNodes parameter is not required and if multi-node, the NumberOfNodes parameter is required", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterVersion + // CloudFormation resource type schema: + // + // { + // "description": "The version of the Amazon Redshift engine software that you want to deploy on the cluster.The version selected runs on all the nodes in the cluster.", + // "type": "string" + // } + "cluster_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The version of the Amazon Redshift engine software that you want to deploy on the cluster.The version selected runs on all the nodes in the cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DBName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the first database to be created when the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database.", + // "type": "string" + // } + "db_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the first database to be created when the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database.", + Required: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenance + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating whether to enable the deferred maintenance window.", + // "type": "boolean" + // } + "defer_maintenance": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating whether to enable the deferred maintenance window.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // DeferMaintenance is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceDuration + // CloudFormation resource type schema: + // + // { + // "description": "An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 45 days or less.", + // "type": "integer" + // } + "defer_maintenance_duration": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 45 days or less.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // DeferMaintenanceDuration is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceEndTime + // CloudFormation resource type schema: + // + // { + // "description": "A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.", + // "type": "string" + // } + "defer_maintenance_end_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "A unique identifier for the deferred maintenance window.", + // "type": "string" + // } + "defer_maintenance_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A unique identifier for the deferred maintenance window.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceStartTime + // CloudFormation resource type schema: + // + // { + // "description": "A timestamp indicating the start time for the deferred maintenance window.", + // "type": "string" + // } + "defer_maintenance_start_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A timestamp indicating the start time for the deferred maintenance window.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DestinationRegion + // CloudFormation resource type schema: + // + // { + // "description": "The destination AWS Region that you want to copy snapshots to. Constraints: Must be the name of a valid AWS Region. For more information, see Regions and Endpoints in the Amazon Web Services [https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region] General Reference", + // "type": "string" + // } + "destination_region": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The destination AWS Region that you want to copy snapshots to. Constraints: Must be the name of a valid AWS Region. For more information, see Regions and Endpoints in the Amazon Web Services [https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region] General Reference", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ElasticIp + // CloudFormation resource type schema: + // + // { + // "description": "The Elastic IP (EIP) address for the cluster.", + // "type": "string" + // } + "elastic_ip": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Elastic IP (EIP) address for the cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Encrypted + // CloudFormation resource type schema: + // + // { + // "description": "If true, the data in the cluster is encrypted at rest.", + // "type": "boolean" + // } + "encrypted": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "If true, the data in the cluster is encrypted at rest.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Endpoint + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Address": { + // "type": "string" + // }, + // "Port": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "endpoint": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Address + "address": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EnhancedVpcRouting + // CloudFormation resource type schema: + // + // { + // "description": "An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.\n\nIf this option is true , enhanced VPC routing is enabled.\n\nDefault: false", + // "type": "boolean" + // } + "enhanced_vpc_routing": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.\n\nIf this option is true , enhanced VPC routing is enabled.\n\nDefault: false", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HsmClientCertificateIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM", + // "type": "string" + // } + "hsm_client_certificate_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HsmConfigurationIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.", + // "type": "string" + // } + "hsm_configuration_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: IamRoles + // CloudFormation resource type schema: + // + // { + // "description": "A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 50 IAM roles in a single request", + // "insertionOrder": false, + // "items": { + // "type": "string" + // }, + // "maxItems": 50, + // "type": "array" + // } + "iam_roles": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 50 IAM roles in a single request", + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeAtMost(50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: KmsKeyId + // CloudFormation resource type schema: + // + // { + // "description": "The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.", + // "type": "string" + // } + "kms_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LoggingProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "BucketName": { + // "type": "string" + // }, + // "S3KeyPrefix": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "logging_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BucketName + "bucket_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: S3KeyPrefix + "s3_key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MaintenanceTrackName + // CloudFormation resource type schema: + // + // { + // "description": "The name for the maintenance track that you want to assign for the cluster. This name change is asynchronous. The new track name stays in the PendingModifiedValues for the cluster until the next maintenance window. When the maintenance track changes, the cluster is switched to the latest cluster release available for the maintenance track. At this point, the maintenance track name is applied.", + // "type": "string" + // } + "maintenance_track_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name for the maintenance track that you want to assign for the cluster. This name change is asynchronous. The new track name stays in the PendingModifiedValues for the cluster until the next maintenance window. When the maintenance track changes, the cluster is switched to the latest cluster release available for the maintenance track. At this point, the maintenance track name is applied.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ManageMasterPassword + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating if the redshift cluster's admin user credentials is managed by Redshift or not. You can't use MasterUserPassword if ManageMasterPassword is true. If ManageMasterPassword is false or not set, Amazon Redshift uses MasterUserPassword for the admin user account's password.", + // "type": "boolean" + // } + "manage_master_password": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating if the redshift cluster's admin user credentials is managed by Redshift or not. You can't use MasterUserPassword if ManageMasterPassword is true. If ManageMasterPassword is false or not set, Amazon Redshift uses MasterUserPassword for the admin user account's password.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // ManageMasterPassword is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ManualSnapshotRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.\n\nThe value must be either -1 or an integer between 1 and 3,653.", + // "type": "integer" + // } + "manual_snapshot_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.\n\nThe value must be either -1 or an integer between 1 and 3,653.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterPasswordSecretArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.", + // "type": "string" + // } + "master_password_secret_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterPasswordSecretKmsKeyId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin user credentials secret.", + // "type": "string" + // } + "master_password_secret_kms_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin user credentials secret.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MasterUserPassword + // CloudFormation resource type schema: + // + // { + // "description": "The password associated with the master user account for the cluster that is being created. You can't use MasterUserPassword if ManageMasterPassword is true. Password must be between 8 and 64 characters in length, should have at least one uppercase letter.Must contain at least one lowercase letter.Must contain one number.Can be any printable ASCII character.", + // "maxLength": 64, + // "type": "string" + // } + "master_user_password": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The password associated with the master user account for the cluster that is being created. You can't use MasterUserPassword if ManageMasterPassword is true. Password must be between 8 and 64 characters in length, should have at least one uppercase letter.Must contain at least one lowercase letter.Must contain one number.Can be any printable ASCII character.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(64), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // MasterUserPassword is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: MasterUsername + // CloudFormation resource type schema: + // + // { + // "description": "The user name associated with the master user account for the cluster that is being created. The user name can't be PUBLIC and first character must be a letter.", + // "maxLength": 128, + // "type": "string" + // } + "master_username": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The user name associated with the master user account for the cluster that is being created. The user name can't be PUBLIC and first character must be a letter.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: MultiAZ + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating if the redshift cluster is multi-az or not. If you don't provide this parameter or set the value to false, the redshift cluster will be single-az.", + // "type": "boolean" + // } + "multi_az": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating if the redshift cluster is multi-az or not. If you don't provide this parameter or set the value to false, the redshift cluster will be single-az.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: NamespaceResourcePolicy + // CloudFormation resource type schema: + // + // { + // "description": "The namespace resource policy document that will be attached to a Redshift cluster.", + // "type": "object" + // } + "namespace_resource_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Description: "The namespace resource policy document that will be attached to a Redshift cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: NodeType + // CloudFormation resource type schema: + // + // { + // "description": "The node type to be provisioned for the cluster.Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge", + // "type": "string" + // } + "node_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The node type to be provisioned for the cluster.Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: NumberOfNodes + // CloudFormation resource type schema: + // + // { + // "description": "The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node.", + // "type": "integer" + // } + "number_of_nodes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: OwnerAccount + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "owner_account": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Port + // CloudFormation resource type schema: + // + // { + // "description": "The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings", + // "type": "integer" + // } + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: PreferredMaintenanceWindow + // CloudFormation resource type schema: + // + // { + // "description": "The weekly time range (in UTC) during which automated cluster maintenance can occur.", + // "type": "string" + // } + "preferred_maintenance_window": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The weekly time range (in UTC) during which automated cluster maintenance can occur.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: PubliclyAccessible + // CloudFormation resource type schema: + // + // { + // "description": "If true, the cluster can be accessed from a public network.", + // "type": "boolean" + // } + "publicly_accessible": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "If true, the cluster can be accessed from a public network.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ResourceAction + // CloudFormation resource type schema: + // + // { + // "description": "The Redshift operation to be performed. Resource Action supports pause-cluster, resume-cluster, failover-primary-compute APIs", + // "type": "string" + // } + "resource_action": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Redshift operation to be performed. Resource Action supports pause-cluster, resume-cluster, failover-primary-compute APIs", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RevisionTarget + // CloudFormation resource type schema: + // + // { + // "description": "The identifier of the database revision. You can retrieve this value from the response to the DescribeClusterDbRevisions request.", + // "type": "string" + // } + "revision_target": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The identifier of the database revision. You can retrieve this value from the response to the DescribeClusterDbRevisions request.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RotateEncryptionKey + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating if we want to rotate Encryption Keys.", + // "type": "boolean" + // } + "rotate_encryption_key": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating if we want to rotate Encryption Keys.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SnapshotClusterIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.", + // "type": "string" + // } + "snapshot_cluster_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SnapshotCopyGrantName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.", + // "type": "string" + // } + "snapshot_copy_grant_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SnapshotCopyManual + // CloudFormation resource type schema: + // + // { + // "description": "Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots.", + // "type": "boolean" + // } + "snapshot_copy_manual": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SnapshotCopyRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "The number of days to retain automated snapshots in the destination region after they are copied from the source region. \n\n Default is 7. \n\n Constraints: Must be at least 1 and no more than 35.", + // "type": "integer" + // } + "snapshot_copy_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of days to retain automated snapshots in the destination region after they are copied from the source region. \n\n Default is 7. \n\n Constraints: Must be at least 1 and no more than 35.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SnapshotIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.", + // "type": "string" + // } + "snapshot_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // SnapshotIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "The list of tags for the cluster parameter group.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 127, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 255, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 127), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 255), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The list of tags for the cluster parameter group.", + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeAtMost(50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VpcSecurityGroupIds + // CloudFormation resource type schema: + // + // { + // "description": "A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.", + // "insertionOrder": false, + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "vpc_security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "An example resource schema demonstrating some basic constructs and validation rules.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Redshift::Cluster").WithTerraformTypeName("awscc_redshift_cluster") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "address": "Address", + "allow_version_upgrade": "AllowVersionUpgrade", + "aqua_configuration_status": "AquaConfigurationStatus", + "automated_snapshot_retention_period": "AutomatedSnapshotRetentionPeriod", + "availability_zone": "AvailabilityZone", + "availability_zone_relocation": "AvailabilityZoneRelocation", + "availability_zone_relocation_status": "AvailabilityZoneRelocationStatus", + "bucket_name": "BucketName", + "classic": "Classic", + "cluster_identifier": "ClusterIdentifier", + "cluster_namespace_arn": "ClusterNamespaceArn", + "cluster_parameter_group_name": "ClusterParameterGroupName", + "cluster_security_groups": "ClusterSecurityGroups", + "cluster_subnet_group_name": "ClusterSubnetGroupName", + "cluster_type": "ClusterType", + "cluster_version": "ClusterVersion", + "db_name": "DBName", + "defer_maintenance": "DeferMaintenance", + "defer_maintenance_duration": "DeferMaintenanceDuration", + "defer_maintenance_end_time": "DeferMaintenanceEndTime", + "defer_maintenance_identifier": "DeferMaintenanceIdentifier", + "defer_maintenance_start_time": "DeferMaintenanceStartTime", + "destination_region": "DestinationRegion", + "elastic_ip": "ElasticIp", + "encrypted": "Encrypted", + "endpoint": "Endpoint", + "enhanced_vpc_routing": "EnhancedVpcRouting", + "hsm_client_certificate_identifier": "HsmClientCertificateIdentifier", + "hsm_configuration_identifier": "HsmConfigurationIdentifier", + "iam_roles": "IamRoles", + "key": "Key", + "kms_key_id": "KmsKeyId", + "logging_properties": "LoggingProperties", + "maintenance_track_name": "MaintenanceTrackName", + "manage_master_password": "ManageMasterPassword", + "manual_snapshot_retention_period": "ManualSnapshotRetentionPeriod", + "master_password_secret_arn": "MasterPasswordSecretArn", + "master_password_secret_kms_key_id": "MasterPasswordSecretKmsKeyId", + "master_user_password": "MasterUserPassword", + "master_username": "MasterUsername", + "multi_az": "MultiAZ", + "namespace_resource_policy": "NamespaceResourcePolicy", + "node_type": "NodeType", + "number_of_nodes": "NumberOfNodes", + "owner_account": "OwnerAccount", + "port": "Port", + "preferred_maintenance_window": "PreferredMaintenanceWindow", + "publicly_accessible": "PubliclyAccessible", + "resource_action": "ResourceAction", + "revision_target": "RevisionTarget", + "rotate_encryption_key": "RotateEncryptionKey", + "s3_key_prefix": "S3KeyPrefix", + "snapshot_cluster_identifier": "SnapshotClusterIdentifier", + "snapshot_copy_grant_name": "SnapshotCopyGrantName", + "snapshot_copy_manual": "SnapshotCopyManual", + "snapshot_copy_retention_period": "SnapshotCopyRetentionPeriod", + "snapshot_identifier": "SnapshotIdentifier", + "tags": "Tags", + "value": "Value", + "vpc_security_group_ids": "VpcSecurityGroupIds", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/MasterUserPassword", + "/properties/Classic", + "/properties/SnapshotIdentifier", + "/properties/DeferMaintenance", + "/properties/DeferMaintenanceDuration", + "/properties/ManageMasterPassword", + }) + opts = opts.WithCreateTimeoutInMinutes(2160).WithDeleteTimeoutInMinutes(2160) + + opts = opts.WithUpdateTimeoutInMinutes(2160) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/redshift/cluster_resource_gen_test.go b/internal/aws/redshift/cluster_resource_gen_test.go new file mode 100644 index 000000000..cb867feab --- /dev/null +++ b/internal/aws/redshift/cluster_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package redshift_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSRedshiftCluster_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Redshift::Cluster", "awscc_redshift_cluster", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/redshift/cluster_singular_data_source_gen.go b/internal/aws/redshift/cluster_singular_data_source_gen.go new file mode 100644 index 000000000..b08ae575f --- /dev/null +++ b/internal/aws/redshift/cluster_singular_data_source_gen.go @@ -0,0 +1,813 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package redshift + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_redshift_cluster", clusterDataSource) +} + +// clusterDataSource returns the Terraform awscc_redshift_cluster data source. +// This Terraform data source corresponds to the CloudFormation AWS::Redshift::Cluster resource. +func clusterDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AllowVersionUpgrade + // CloudFormation resource type schema: + // + // { + // "description": "Major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default value is True", + // "type": "boolean" + // } + "allow_version_upgrade": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Major version upgrades can be applied during the maintenance window to the Amazon Redshift engine that is running on the cluster. Default value is True", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AquaConfigurationStatus + // CloudFormation resource type schema: + // + // { + // "description": "The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values include the following.\n\nenabled - Use AQUA if it is available for the current Region and Amazon Redshift node type.\ndisabled - Don't use AQUA.\nauto - Amazon Redshift determines whether to use AQUA.\n", + // "type": "string" + // } + "aqua_configuration_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value represents how the cluster is configured to use AQUA (Advanced Query Accelerator) after the cluster is restored. Possible values include the following.\n\nenabled - Use AQUA if it is available for the current Region and Amazon Redshift node type.\ndisabled - Don't use AQUA.\nauto - Amazon Redshift determines whether to use AQUA.\n", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AutomatedSnapshotRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Default value is 1", + // "type": "integer" + // } + "automated_snapshot_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of days that automated snapshots are retained. If the value is 0, automated snapshots are disabled. Default value is 1", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AvailabilityZone + // CloudFormation resource type schema: + // + // { + // "description": "The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint", + // "type": "string" + // } + "availability_zone": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The EC2 Availability Zone (AZ) in which you want Amazon Redshift to provision the cluster. Default: A random, system-chosen Availability Zone in the region that is specified by the endpoint", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AvailabilityZoneRelocation + // CloudFormation resource type schema: + // + // { + // "description": "The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster modification is complete.", + // "type": "boolean" + // } + "availability_zone_relocation": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "The option to enable relocation for an Amazon Redshift cluster between Availability Zones after the cluster modification is complete.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AvailabilityZoneRelocationStatus + // CloudFormation resource type schema: + // + // { + // "description": "The availability zone relocation status of the cluster", + // "type": "string" + // } + "availability_zone_relocation_status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The availability zone relocation status of the cluster", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Classic + // CloudFormation resource type schema: + // + // { + // "description": "A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false , the resize type is elastic.", + // "type": "boolean" + // } + "classic": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false , the resize type is elastic.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account", + // "maxLength": 63, + // "type": "string" + // } + "cluster_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A unique identifier for the cluster. You use this identifier to refer to the cluster for any subsequent cluster operations such as deleting or modifying. All alphabetical characters must be lower case, no hypens at the end, no two consecutive hyphens. Cluster name should be unique for all clusters within an AWS account", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterNamespaceArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the cluster namespace.", + // "type": "string" + // } + "cluster_namespace_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the cluster namespace.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterParameterGroupName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the parameter group to be associated with this cluster.", + // "maxLength": 255, + // "type": "string" + // } + "cluster_parameter_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the parameter group to be associated with this cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterSecurityGroups + // CloudFormation resource type schema: + // + // { + // "description": "A list of security groups to be associated with this cluster.", + // "insertionOrder": false, + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "cluster_security_groups": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "A list of security groups to be associated with this cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterSubnetGroupName + // CloudFormation resource type schema: + // + // { + // "description": "The name of a cluster subnet group to be associated with this cluster.", + // "type": "string" + // } + "cluster_subnet_group_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of a cluster subnet group to be associated with this cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterType + // CloudFormation resource type schema: + // + // { + // "description": "The type of the cluster. When cluster type is specified as single-node, the NumberOfNodes parameter is not required and if multi-node, the NumberOfNodes parameter is required", + // "type": "string" + // } + "cluster_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The type of the cluster. When cluster type is specified as single-node, the NumberOfNodes parameter is not required and if multi-node, the NumberOfNodes parameter is required", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ClusterVersion + // CloudFormation resource type schema: + // + // { + // "description": "The version of the Amazon Redshift engine software that you want to deploy on the cluster.The version selected runs on all the nodes in the cluster.", + // "type": "string" + // } + "cluster_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The version of the Amazon Redshift engine software that you want to deploy on the cluster.The version selected runs on all the nodes in the cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DBName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the first database to be created when the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database.", + // "type": "string" + // } + "db_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the first database to be created when the cluster is created. To create additional databases after the cluster is created, connect to the cluster with a SQL client and use SQL commands to create a database.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenance + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating whether to enable the deferred maintenance window.", + // "type": "boolean" + // } + "defer_maintenance": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating whether to enable the deferred maintenance window.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceDuration + // CloudFormation resource type schema: + // + // { + // "description": "An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 45 days or less.", + // "type": "integer" + // } + "defer_maintenance_duration": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "An integer indicating the duration of the maintenance window in days. If you specify a duration, you can't specify an end time. The duration must be 45 days or less.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceEndTime + // CloudFormation resource type schema: + // + // { + // "description": "A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.", + // "type": "string" + // } + "defer_maintenance_end_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A timestamp indicating end time for the deferred maintenance window. If you specify an end time, you can't specify a duration.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "A unique identifier for the deferred maintenance window.", + // "type": "string" + // } + "defer_maintenance_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A unique identifier for the deferred maintenance window.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeferMaintenanceStartTime + // CloudFormation resource type schema: + // + // { + // "description": "A timestamp indicating the start time for the deferred maintenance window.", + // "type": "string" + // } + "defer_maintenance_start_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "A timestamp indicating the start time for the deferred maintenance window.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DestinationRegion + // CloudFormation resource type schema: + // + // { + // "description": "The destination AWS Region that you want to copy snapshots to. Constraints: Must be the name of a valid AWS Region. For more information, see Regions and Endpoints in the Amazon Web Services [https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region] General Reference", + // "type": "string" + // } + "destination_region": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The destination AWS Region that you want to copy snapshots to. Constraints: Must be the name of a valid AWS Region. For more information, see Regions and Endpoints in the Amazon Web Services [https://docs.aws.amazon.com/general/latest/gr/rande.html#redshift_region] General Reference", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ElasticIp + // CloudFormation resource type schema: + // + // { + // "description": "The Elastic IP (EIP) address for the cluster.", + // "type": "string" + // } + "elastic_ip": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Elastic IP (EIP) address for the cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Encrypted + // CloudFormation resource type schema: + // + // { + // "description": "If true, the data in the cluster is encrypted at rest.", + // "type": "boolean" + // } + "encrypted": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "If true, the data in the cluster is encrypted at rest.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Endpoint + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "Address": { + // "type": "string" + // }, + // "Port": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "endpoint": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Address + "address": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EnhancedVpcRouting + // CloudFormation resource type schema: + // + // { + // "description": "An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.\n\nIf this option is true , enhanced VPC routing is enabled.\n\nDefault: false", + // "type": "boolean" + // } + "enhanced_vpc_routing": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.\n\nIf this option is true , enhanced VPC routing is enabled.\n\nDefault: false", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HsmClientCertificateIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM", + // "type": "string" + // } + "hsm_client_certificate_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the name of the HSM client certificate the Amazon Redshift cluster uses to retrieve the data encryption keys stored in an HSM", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HsmConfigurationIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.", + // "type": "string" + // } + "hsm_configuration_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Specifies the name of the HSM configuration that contains the information the Amazon Redshift cluster can use to retrieve and store keys in an HSM.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: IamRoles + // CloudFormation resource type schema: + // + // { + // "description": "A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 50 IAM roles in a single request", + // "insertionOrder": false, + // "items": { + // "type": "string" + // }, + // "maxItems": 50, + // "type": "array" + // } + "iam_roles": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "A list of AWS Identity and Access Management (IAM) roles that can be used by the cluster to access other AWS services. You must supply the IAM roles in their Amazon Resource Name (ARN) format. You can supply up to 50 IAM roles in a single request", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KmsKeyId + // CloudFormation resource type schema: + // + // { + // "description": "The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.", + // "type": "string" + // } + "kms_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The AWS Key Management Service (KMS) key ID of the encryption key that you want to use to encrypt data in the cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LoggingProperties + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "BucketName": { + // "type": "string" + // }, + // "S3KeyPrefix": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "logging_properties": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BucketName + "bucket_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3KeyPrefix + "s3_key_prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MaintenanceTrackName + // CloudFormation resource type schema: + // + // { + // "description": "The name for the maintenance track that you want to assign for the cluster. This name change is asynchronous. The new track name stays in the PendingModifiedValues for the cluster until the next maintenance window. When the maintenance track changes, the cluster is switched to the latest cluster release available for the maintenance track. At this point, the maintenance track name is applied.", + // "type": "string" + // } + "maintenance_track_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name for the maintenance track that you want to assign for the cluster. This name change is asynchronous. The new track name stays in the PendingModifiedValues for the cluster until the next maintenance window. When the maintenance track changes, the cluster is switched to the latest cluster release available for the maintenance track. At this point, the maintenance track name is applied.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ManageMasterPassword + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating if the redshift cluster's admin user credentials is managed by Redshift or not. You can't use MasterUserPassword if ManageMasterPassword is true. If ManageMasterPassword is false or not set, Amazon Redshift uses MasterUserPassword for the admin user account's password.", + // "type": "boolean" + // } + "manage_master_password": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating if the redshift cluster's admin user credentials is managed by Redshift or not. You can't use MasterUserPassword if ManageMasterPassword is true. If ManageMasterPassword is false or not set, Amazon Redshift uses MasterUserPassword for the admin user account's password.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ManualSnapshotRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.\n\nThe value must be either -1 or an integer between 1 and 3,653.", + // "type": "integer" + // } + "manual_snapshot_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of days to retain newly copied snapshots in the destination AWS Region after they are copied from the source AWS Region. If the value is -1, the manual snapshot is retained indefinitely.\n\nThe value must be either -1 or an integer between 1 and 3,653.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterPasswordSecretArn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.", + // "type": "string" + // } + "master_password_secret_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterPasswordSecretKmsKeyId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin user credentials secret.", + // "type": "string" + // } + "master_password_secret_kms_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin user credentials secret.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterUserPassword + // CloudFormation resource type schema: + // + // { + // "description": "The password associated with the master user account for the cluster that is being created. You can't use MasterUserPassword if ManageMasterPassword is true. Password must be between 8 and 64 characters in length, should have at least one uppercase letter.Must contain at least one lowercase letter.Must contain one number.Can be any printable ASCII character.", + // "maxLength": 64, + // "type": "string" + // } + "master_user_password": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The password associated with the master user account for the cluster that is being created. You can't use MasterUserPassword if ManageMasterPassword is true. Password must be between 8 and 64 characters in length, should have at least one uppercase letter.Must contain at least one lowercase letter.Must contain one number.Can be any printable ASCII character.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MasterUsername + // CloudFormation resource type schema: + // + // { + // "description": "The user name associated with the master user account for the cluster that is being created. The user name can't be PUBLIC and first character must be a letter.", + // "maxLength": 128, + // "type": "string" + // } + "master_username": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The user name associated with the master user account for the cluster that is being created. The user name can't be PUBLIC and first character must be a letter.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MultiAZ + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating if the redshift cluster is multi-az or not. If you don't provide this parameter or set the value to false, the redshift cluster will be single-az.", + // "type": "boolean" + // } + "multi_az": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating if the redshift cluster is multi-az or not. If you don't provide this parameter or set the value to false, the redshift cluster will be single-az.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NamespaceResourcePolicy + // CloudFormation resource type schema: + // + // { + // "description": "The namespace resource policy document that will be attached to a Redshift cluster.", + // "type": "object" + // } + "namespace_resource_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Description: "The namespace resource policy document that will be attached to a Redshift cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NodeType + // CloudFormation resource type schema: + // + // { + // "description": "The node type to be provisioned for the cluster.Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge", + // "type": "string" + // } + "node_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The node type to be provisioned for the cluster.Valid Values: ds2.xlarge | ds2.8xlarge | dc1.large | dc1.8xlarge | dc2.large | dc2.8xlarge | ra3.4xlarge | ra3.16xlarge", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NumberOfNodes + // CloudFormation resource type schema: + // + // { + // "description": "The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node.", + // "type": "integer" + // } + "number_of_nodes": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of compute nodes in the cluster. This parameter is required when the ClusterType parameter is specified as multi-node.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OwnerAccount + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "owner_account": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Port + // CloudFormation resource type schema: + // + // { + // "description": "The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings", + // "type": "integer" + // } + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The port number on which the cluster accepts incoming connections. The cluster is accessible only via the JDBC and ODBC connection strings", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PreferredMaintenanceWindow + // CloudFormation resource type schema: + // + // { + // "description": "The weekly time range (in UTC) during which automated cluster maintenance can occur.", + // "type": "string" + // } + "preferred_maintenance_window": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The weekly time range (in UTC) during which automated cluster maintenance can occur.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PubliclyAccessible + // CloudFormation resource type schema: + // + // { + // "description": "If true, the cluster can be accessed from a public network.", + // "type": "boolean" + // } + "publicly_accessible": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "If true, the cluster can be accessed from a public network.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceAction + // CloudFormation resource type schema: + // + // { + // "description": "The Redshift operation to be performed. Resource Action supports pause-cluster, resume-cluster, failover-primary-compute APIs", + // "type": "string" + // } + "resource_action": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Redshift operation to be performed. Resource Action supports pause-cluster, resume-cluster, failover-primary-compute APIs", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RevisionTarget + // CloudFormation resource type schema: + // + // { + // "description": "The identifier of the database revision. You can retrieve this value from the response to the DescribeClusterDbRevisions request.", + // "type": "string" + // } + "revision_target": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The identifier of the database revision. You can retrieve this value from the response to the DescribeClusterDbRevisions request.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RotateEncryptionKey + // CloudFormation resource type schema: + // + // { + // "description": "A boolean indicating if we want to rotate Encryption Keys.", + // "type": "boolean" + // } + "rotate_encryption_key": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "A boolean indicating if we want to rotate Encryption Keys.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SnapshotClusterIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.", + // "type": "string" + // } + "snapshot_cluster_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the cluster the source snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SnapshotCopyGrantName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.", + // "type": "string" + // } + "snapshot_copy_grant_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the snapshot copy grant to use when snapshots of an AWS KMS-encrypted cluster are copied to the destination region.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SnapshotCopyManual + // CloudFormation resource type schema: + // + // { + // "description": "Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots.", + // "type": "boolean" + // } + "snapshot_copy_manual": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Indicates whether to apply the snapshot retention period to newly copied manual snapshots instead of automated snapshots.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SnapshotCopyRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "The number of days to retain automated snapshots in the destination region after they are copied from the source region. \n\n Default is 7. \n\n Constraints: Must be at least 1 and no more than 35.", + // "type": "integer" + // } + "snapshot_copy_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "The number of days to retain automated snapshots in the destination region after they are copied from the source region. \n\n Default is 7. \n\n Constraints: Must be at least 1 and no more than 35.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SnapshotIdentifier + // CloudFormation resource type schema: + // + // { + // "description": "The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.", + // "type": "string" + // } + "snapshot_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the snapshot from which to create the new cluster. This parameter isn't case sensitive.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "The list of tags for the cluster parameter group.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 127, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + // "maxLength": 255, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The list of tags for the cluster parameter group.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VpcSecurityGroupIds + // CloudFormation resource type schema: + // + // { + // "description": "A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.", + // "insertionOrder": false, + // "items": { + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": false + // } + "vpc_security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "A list of Virtual Private Cloud (VPC) security groups to be associated with the cluster.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::Redshift::Cluster", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Redshift::Cluster").WithTerraformTypeName("awscc_redshift_cluster") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "address": "Address", + "allow_version_upgrade": "AllowVersionUpgrade", + "aqua_configuration_status": "AquaConfigurationStatus", + "automated_snapshot_retention_period": "AutomatedSnapshotRetentionPeriod", + "availability_zone": "AvailabilityZone", + "availability_zone_relocation": "AvailabilityZoneRelocation", + "availability_zone_relocation_status": "AvailabilityZoneRelocationStatus", + "bucket_name": "BucketName", + "classic": "Classic", + "cluster_identifier": "ClusterIdentifier", + "cluster_namespace_arn": "ClusterNamespaceArn", + "cluster_parameter_group_name": "ClusterParameterGroupName", + "cluster_security_groups": "ClusterSecurityGroups", + "cluster_subnet_group_name": "ClusterSubnetGroupName", + "cluster_type": "ClusterType", + "cluster_version": "ClusterVersion", + "db_name": "DBName", + "defer_maintenance": "DeferMaintenance", + "defer_maintenance_duration": "DeferMaintenanceDuration", + "defer_maintenance_end_time": "DeferMaintenanceEndTime", + "defer_maintenance_identifier": "DeferMaintenanceIdentifier", + "defer_maintenance_start_time": "DeferMaintenanceStartTime", + "destination_region": "DestinationRegion", + "elastic_ip": "ElasticIp", + "encrypted": "Encrypted", + "endpoint": "Endpoint", + "enhanced_vpc_routing": "EnhancedVpcRouting", + "hsm_client_certificate_identifier": "HsmClientCertificateIdentifier", + "hsm_configuration_identifier": "HsmConfigurationIdentifier", + "iam_roles": "IamRoles", + "key": "Key", + "kms_key_id": "KmsKeyId", + "logging_properties": "LoggingProperties", + "maintenance_track_name": "MaintenanceTrackName", + "manage_master_password": "ManageMasterPassword", + "manual_snapshot_retention_period": "ManualSnapshotRetentionPeriod", + "master_password_secret_arn": "MasterPasswordSecretArn", + "master_password_secret_kms_key_id": "MasterPasswordSecretKmsKeyId", + "master_user_password": "MasterUserPassword", + "master_username": "MasterUsername", + "multi_az": "MultiAZ", + "namespace_resource_policy": "NamespaceResourcePolicy", + "node_type": "NodeType", + "number_of_nodes": "NumberOfNodes", + "owner_account": "OwnerAccount", + "port": "Port", + "preferred_maintenance_window": "PreferredMaintenanceWindow", + "publicly_accessible": "PubliclyAccessible", + "resource_action": "ResourceAction", + "revision_target": "RevisionTarget", + "rotate_encryption_key": "RotateEncryptionKey", + "s3_key_prefix": "S3KeyPrefix", + "snapshot_cluster_identifier": "SnapshotClusterIdentifier", + "snapshot_copy_grant_name": "SnapshotCopyGrantName", + "snapshot_copy_manual": "SnapshotCopyManual", + "snapshot_copy_retention_period": "SnapshotCopyRetentionPeriod", + "snapshot_identifier": "SnapshotIdentifier", + "tags": "Tags", + "value": "Value", + "vpc_security_group_ids": "VpcSecurityGroupIds", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/redshift/cluster_singular_data_source_gen_test.go b/internal/aws/redshift/cluster_singular_data_source_gen_test.go new file mode 100644 index 000000000..c8e0014a2 --- /dev/null +++ b/internal/aws/redshift/cluster_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package redshift_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSRedshiftClusterDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Redshift::Cluster", "awscc_redshift_cluster", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSRedshiftClusterDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Redshift::Cluster", "awscc_redshift_cluster", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/redshift/cluster_subnet_group_resource_gen.go b/internal/aws/redshift/cluster_subnet_group_resource_gen.go index 63f206a3d..7232a8297 100644 --- a/internal/aws/redshift/cluster_subnet_group_resource_gen.go +++ b/internal/aws/redshift/cluster_subnet_group_resource_gen.go @@ -145,6 +145,7 @@ func clusterSubnetGroupResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -163,7 +164,6 @@ func clusterSubnetGroupResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Redshift::ClusterSubnetGroup").WithTerraformTypeName("awscc_redshift_cluster_subnet_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster_subnet_group_name": "ClusterSubnetGroupName", "description": "Description", diff --git a/internal/aws/redshift/endpoint_access_resource_gen.go b/internal/aws/redshift/endpoint_access_resource_gen.go index 36d4e7c40..e8919be7b 100644 --- a/internal/aws/redshift/endpoint_access_resource_gen.go +++ b/internal/aws/redshift/endpoint_access_resource_gen.go @@ -314,6 +314,7 @@ func endpointAccessResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -332,7 +333,6 @@ func endpointAccessResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Redshift::EndpointAccess").WithTerraformTypeName("awscc_redshift_endpoint_access") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "availability_zone": "AvailabilityZone", diff --git a/internal/aws/redshift/endpoint_authorization_resource_gen.go b/internal/aws/redshift/endpoint_authorization_resource_gen.go index 68f3e5a39..d495d804a 100644 --- a/internal/aws/redshift/endpoint_authorization_resource_gen.go +++ b/internal/aws/redshift/endpoint_authorization_resource_gen.go @@ -231,6 +231,7 @@ func endpointAuthorizationResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -249,7 +250,6 @@ func endpointAuthorizationResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::Redshift::EndpointAuthorization").WithTerraformTypeName("awscc_redshift_endpoint_authorization") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account": "Account", "allowed_all_vp_cs": "AllowedAllVPCs", diff --git a/internal/aws/redshift/event_subscription_resource_gen.go b/internal/aws/redshift/event_subscription_resource_gen.go index cb56ee102..6af49cb47 100644 --- a/internal/aws/redshift/event_subscription_resource_gen.go +++ b/internal/aws/redshift/event_subscription_resource_gen.go @@ -356,6 +356,7 @@ func eventSubscriptionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -374,7 +375,6 @@ func eventSubscriptionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Redshift::EventSubscription").WithTerraformTypeName("awscc_redshift_event_subscription") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cust_subscription_id": "CustSubscriptionId", "customer_aws_id": "CustomerAwsId", diff --git a/internal/aws/redshift/scheduled_action_resource_gen.go b/internal/aws/redshift/scheduled_action_resource_gen.go index 3a66eb34e..0c4c9e4cf 100644 --- a/internal/aws/redshift/scheduled_action_resource_gen.go +++ b/internal/aws/redshift/scheduled_action_resource_gen.go @@ -322,6 +322,7 @@ func scheduledActionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -340,7 +341,6 @@ func scheduledActionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Redshift::ScheduledAction").WithTerraformTypeName("awscc_redshift_scheduled_action") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "classic": "Classic", "cluster_identifier": "ClusterIdentifier", diff --git a/internal/aws/redshiftserverless/namespace_resource_gen.go b/internal/aws/redshiftserverless/namespace_resource_gen.go index 2c3728e54..f3c0088bc 100644 --- a/internal/aws/redshiftserverless/namespace_resource_gen.go +++ b/internal/aws/redshiftserverless/namespace_resource_gen.go @@ -522,6 +522,7 @@ func namespaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -540,7 +541,6 @@ func namespaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RedshiftServerless::Namespace").WithTerraformTypeName("awscc_redshiftserverless_namespace") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "admin_password_secret_arn": "AdminPasswordSecretArn", "admin_password_secret_kms_key_id": "AdminPasswordSecretKmsKeyId", diff --git a/internal/aws/redshiftserverless/workgroup_resource_gen.go b/internal/aws/redshiftserverless/workgroup_resource_gen.go index 556a430d3..4e4825897 100644 --- a/internal/aws/redshiftserverless/workgroup_resource_gen.go +++ b/internal/aws/redshiftserverless/workgroup_resource_gen.go @@ -637,6 +637,7 @@ func workgroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -655,7 +656,6 @@ func workgroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RedshiftServerless::Workgroup").WithTerraformTypeName("awscc_redshiftserverless_workgroup") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "address": "Address", "availability_zone": "AvailabilityZone", diff --git a/internal/aws/refactorspaces/application_resource_gen.go b/internal/aws/refactorspaces/application_resource_gen.go index ce3902a67..3f19512bb 100644 --- a/internal/aws/refactorspaces/application_resource_gen.go +++ b/internal/aws/refactorspaces/application_resource_gen.go @@ -347,6 +347,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -365,7 +366,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RefactorSpaces::Application").WithTerraformTypeName("awscc_refactorspaces_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "api_gateway_id": "ApiGatewayId", "api_gateway_proxy": "ApiGatewayProxy", diff --git a/internal/aws/refactorspaces/environment_resource_gen.go b/internal/aws/refactorspaces/environment_resource_gen.go index b2e367551..7542fa350 100644 --- a/internal/aws/refactorspaces/environment_resource_gen.go +++ b/internal/aws/refactorspaces/environment_resource_gen.go @@ -200,6 +200,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -218,7 +219,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RefactorSpaces::Environment").WithTerraformTypeName("awscc_refactorspaces_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/refactorspaces/route_resource_gen.go b/internal/aws/refactorspaces/route_resource_gen.go index 2c9406ea9..9cd537468 100644 --- a/internal/aws/refactorspaces/route_resource_gen.go +++ b/internal/aws/refactorspaces/route_resource_gen.go @@ -379,6 +379,7 @@ func routeResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -397,7 +398,6 @@ func routeResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RefactorSpaces::Route").WithTerraformTypeName("awscc_refactorspaces_route") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "activation_state": "ActivationState", "append_source_path": "AppendSourcePath", diff --git a/internal/aws/refactorspaces/service_resource_gen.go b/internal/aws/refactorspaces/service_resource_gen.go index b5bdbeb3d..dcfbb7d55 100644 --- a/internal/aws/refactorspaces/service_resource_gen.go +++ b/internal/aws/refactorspaces/service_resource_gen.go @@ -338,6 +338,7 @@ func serviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -356,7 +357,6 @@ func serviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RefactorSpaces::Service").WithTerraformTypeName("awscc_refactorspaces_service") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_identifier": "ApplicationIdentifier", "arn": "Arn", diff --git a/internal/aws/rekognition/collection_resource_gen.go b/internal/aws/rekognition/collection_resource_gen.go index e62c4b5bf..1d22dedcb 100644 --- a/internal/aws/rekognition/collection_resource_gen.go +++ b/internal/aws/rekognition/collection_resource_gen.go @@ -132,6 +132,7 @@ func collectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -150,7 +151,6 @@ func collectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Rekognition::Collection").WithTerraformTypeName("awscc_rekognition_collection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "collection_id": "CollectionId", diff --git a/internal/aws/rekognition/project_resource_gen.go b/internal/aws/rekognition/project_resource_gen.go index f3cce2a64..a26678cc3 100644 --- a/internal/aws/rekognition/project_resource_gen.go +++ b/internal/aws/rekognition/project_resource_gen.go @@ -64,6 +64,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -82,7 +83,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Rekognition::Project").WithTerraformTypeName("awscc_rekognition_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "project_name": "ProjectName", diff --git a/internal/aws/resiliencehub/app_resource_gen.go b/internal/aws/resiliencehub/app_resource_gen.go index f4db59570..71e89ed89 100644 --- a/internal/aws/resiliencehub/app_resource_gen.go +++ b/internal/aws/resiliencehub/app_resource_gen.go @@ -501,6 +501,7 @@ func appResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -519,7 +520,6 @@ func appResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ResilienceHub::App").WithTerraformTypeName("awscc_resiliencehub_app") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_arn": "AppArn", "app_assessment_schedule": "AppAssessmentSchedule", diff --git a/internal/aws/resiliencehub/resiliency_policy_resource_gen.go b/internal/aws/resiliencehub/resiliency_policy_resource_gen.go index 6a2b89772..aa101bddc 100644 --- a/internal/aws/resiliencehub/resiliency_policy_resource_gen.go +++ b/internal/aws/resiliencehub/resiliency_policy_resource_gen.go @@ -324,6 +324,7 @@ func resiliencyPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -342,7 +343,6 @@ func resiliencyPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ResilienceHub::ResiliencyPolicy").WithTerraformTypeName("awscc_resiliencehub_resiliency_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "az": "AZ", "data_location_constraint": "DataLocationConstraint", diff --git a/internal/aws/resourceexplorer2/default_view_association_resource_gen.go b/internal/aws/resourceexplorer2/default_view_association_resource_gen.go index 3e3a09346..19a0ee92f 100644 --- a/internal/aws/resourceexplorer2/default_view_association_resource_gen.go +++ b/internal/aws/resourceexplorer2/default_view_association_resource_gen.go @@ -50,6 +50,7 @@ func defaultViewAssociationResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -68,7 +69,6 @@ func defaultViewAssociationResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::ResourceExplorer2::DefaultViewAssociation").WithTerraformTypeName("awscc_resourceexplorer2_default_view_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "associated_aws_principal": "AssociatedAwsPrincipal", "view_arn": "ViewArn", diff --git a/internal/aws/resourceexplorer2/index_resource_gen.go b/internal/aws/resourceexplorer2/index_resource_gen.go index adff81521..2cdd97adc 100644 --- a/internal/aws/resourceexplorer2/index_resource_gen.go +++ b/internal/aws/resourceexplorer2/index_resource_gen.go @@ -101,6 +101,7 @@ func indexResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func indexResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ResourceExplorer2::Index").WithTerraformTypeName("awscc_resourceexplorer2_index") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "index_state": "IndexState", diff --git a/internal/aws/resourceexplorer2/view_resource_gen.go b/internal/aws/resourceexplorer2/view_resource_gen.go index cd3ee77be..1a124e98a 100644 --- a/internal/aws/resourceexplorer2/view_resource_gen.go +++ b/internal/aws/resourceexplorer2/view_resource_gen.go @@ -167,6 +167,7 @@ func viewResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -185,7 +186,6 @@ func viewResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ResourceExplorer2::View").WithTerraformTypeName("awscc_resourceexplorer2_view") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "filter_string": "FilterString", "filters": "Filters", diff --git a/internal/aws/resourcegroups/group_resource_gen.go b/internal/aws/resourcegroups/group_resource_gen.go index 6b07a11be..7624901ec 100644 --- a/internal/aws/resourcegroups/group_resource_gen.go +++ b/internal/aws/resourcegroups/group_resource_gen.go @@ -354,6 +354,7 @@ func groupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -372,7 +373,6 @@ func groupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ResourceGroups::Group").WithTerraformTypeName("awscc_resourcegroups_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "configuration": "Configuration", diff --git a/internal/aws/robomaker/fleet_resource_gen.go b/internal/aws/robomaker/fleet_resource_gen.go index 89d3b4735..82b1d2d4f 100644 --- a/internal/aws/robomaker/fleet_resource_gen.go +++ b/internal/aws/robomaker/fleet_resource_gen.go @@ -93,6 +93,7 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -111,7 +112,6 @@ func fleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RoboMaker::Fleet").WithTerraformTypeName("awscc_robomaker_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "name": "Name", diff --git a/internal/aws/robomaker/robot_application_resource_gen.go b/internal/aws/robomaker/robot_application_resource_gen.go index 437dd1ec1..77ca71a92 100644 --- a/internal/aws/robomaker/robot_application_resource_gen.go +++ b/internal/aws/robomaker/robot_application_resource_gen.go @@ -267,6 +267,7 @@ func robotApplicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -285,7 +286,6 @@ func robotApplicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RoboMaker::RobotApplication").WithTerraformTypeName("awscc_robomaker_robot_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "architecture": "Architecture", "arn": "Arn", diff --git a/internal/aws/robomaker/robot_application_version_resource_gen.go b/internal/aws/robomaker/robot_application_version_resource_gen.go index a8164f4a3..d340db0a0 100644 --- a/internal/aws/robomaker/robot_application_version_resource_gen.go +++ b/internal/aws/robomaker/robot_application_version_resource_gen.go @@ -93,6 +93,7 @@ func robotApplicationVersionResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -111,7 +112,6 @@ func robotApplicationVersionResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::RoboMaker::RobotApplicationVersion").WithTerraformTypeName("awscc_robomaker_robot_application_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application": "Application", "application_version": "ApplicationVersion", diff --git a/internal/aws/robomaker/robot_resource_gen.go b/internal/aws/robomaker/robot_resource_gen.go index 66ed96104..334bd1ea4 100644 --- a/internal/aws/robomaker/robot_resource_gen.go +++ b/internal/aws/robomaker/robot_resource_gen.go @@ -156,6 +156,7 @@ func robotResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -174,7 +175,6 @@ func robotResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RoboMaker::Robot").WithTerraformTypeName("awscc_robomaker_robot") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "architecture": "Architecture", "arn": "Arn", diff --git a/internal/aws/robomaker/simulation_application_resource_gen.go b/internal/aws/robomaker/simulation_application_resource_gen.go index a25676120..97fb54f64 100644 --- a/internal/aws/robomaker/simulation_application_resource_gen.go +++ b/internal/aws/robomaker/simulation_application_resource_gen.go @@ -404,6 +404,7 @@ func simulationApplicationResource(ctx context.Context) (resource.Resource, erro }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -422,7 +423,6 @@ func simulationApplicationResource(ctx context.Context) (resource.Resource, erro opts = opts.WithCloudFormationTypeName("AWS::RoboMaker::SimulationApplication").WithTerraformTypeName("awscc_robomaker_simulation_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "architecture": "Architecture", "arn": "Arn", diff --git a/internal/aws/robomaker/simulation_application_version_resource_gen.go b/internal/aws/robomaker/simulation_application_version_resource_gen.go index d0ccc3740..0fd2fc3e8 100644 --- a/internal/aws/robomaker/simulation_application_version_resource_gen.go +++ b/internal/aws/robomaker/simulation_application_version_resource_gen.go @@ -93,6 +93,7 @@ func simulationApplicationVersionResource(ctx context.Context) (resource.Resourc }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -111,7 +112,6 @@ func simulationApplicationVersionResource(ctx context.Context) (resource.Resourc opts = opts.WithCloudFormationTypeName("AWS::RoboMaker::SimulationApplicationVersion").WithTerraformTypeName("awscc_robomaker_simulation_application_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application": "Application", "application_version": "ApplicationVersion", diff --git a/internal/aws/rolesanywhere/crl_resource_gen.go b/internal/aws/rolesanywhere/crl_resource_gen.go index a37c32a1e..627d431d6 100644 --- a/internal/aws/rolesanywhere/crl_resource_gen.go +++ b/internal/aws/rolesanywhere/crl_resource_gen.go @@ -149,6 +149,7 @@ func cRLResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -167,7 +168,6 @@ func cRLResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RolesAnywhere::CRL").WithTerraformTypeName("awscc_rolesanywhere_crl") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "crl_data": "CrlData", "crl_id": "CrlId", diff --git a/internal/aws/rolesanywhere/profile_resource_gen.go b/internal/aws/rolesanywhere/profile_resource_gen.go index 271e41d2a..78449eb4e 100644 --- a/internal/aws/rolesanywhere/profile_resource_gen.go +++ b/internal/aws/rolesanywhere/profile_resource_gen.go @@ -218,6 +218,7 @@ func profileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -236,7 +237,6 @@ func profileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RolesAnywhere::Profile").WithTerraformTypeName("awscc_rolesanywhere_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "duration_seconds": "DurationSeconds", "enabled": "Enabled", diff --git a/internal/aws/rolesanywhere/trust_anchor_resource_gen.go b/internal/aws/rolesanywhere/trust_anchor_resource_gen.go index 97d89b61a..50b82660b 100644 --- a/internal/aws/rolesanywhere/trust_anchor_resource_gen.go +++ b/internal/aws/rolesanywhere/trust_anchor_resource_gen.go @@ -303,6 +303,7 @@ func trustAnchorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -321,7 +322,6 @@ func trustAnchorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RolesAnywhere::TrustAnchor").WithTerraformTypeName("awscc_rolesanywhere_trust_anchor") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "acm_pca_arn": "AcmPcaArn", "channel": "Channel", diff --git a/internal/aws/route53/cidr_collection_resource_gen.go b/internal/aws/route53/cidr_collection_resource_gen.go index e0a77fc52..59b21778b 100644 --- a/internal/aws/route53/cidr_collection_resource_gen.go +++ b/internal/aws/route53/cidr_collection_resource_gen.go @@ -50,7 +50,7 @@ func cidrCollectionResource(ctx context.Context) (resource.Resource, error) { // "description": "UUID of the CIDR collection.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "cidr_collection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "UUID of the CIDR collection.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -140,6 +140,15 @@ func cidrCollectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53::CidrCollection.", Version: 1, @@ -150,14 +159,13 @@ func cidrCollectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53::CidrCollection").WithTerraformTypeName("awscc_route53_cidr_collection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "cidr_list": "CidrList", - "id": "Id", - "location_name": "LocationName", - "locations": "Locations", - "name": "Name", + "arn": "Arn", + "cidr_collection_id": "Id", + "cidr_list": "CidrList", + "location_name": "LocationName", + "locations": "Locations", + "name": "Name", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/route53/cidr_collection_singular_data_source_gen.go b/internal/aws/route53/cidr_collection_singular_data_source_gen.go index b648cd61c..86d138b66 100644 --- a/internal/aws/route53/cidr_collection_singular_data_source_gen.go +++ b/internal/aws/route53/cidr_collection_singular_data_source_gen.go @@ -41,7 +41,7 @@ func cidrCollectionDataSource(ctx context.Context) (datasource.DataSource, error // "description": "UUID of the CIDR collection.", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "cidr_collection_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "UUID of the CIDR collection.", Computed: true, }, /*END ATTRIBUTE*/ @@ -129,12 +129,12 @@ func cidrCollectionDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::Route53::CidrCollection").WithTerraformTypeName("awscc_route53_cidr_collection") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "cidr_list": "CidrList", - "id": "Id", - "location_name": "LocationName", - "locations": "Locations", - "name": "Name", + "arn": "Arn", + "cidr_collection_id": "Id", + "cidr_list": "CidrList", + "location_name": "LocationName", + "locations": "Locations", + "name": "Name", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/route53/dnssec_resource_gen.go b/internal/aws/route53/dnssec_resource_gen.go index d6c5cdd69..b213eef75 100644 --- a/internal/aws/route53/dnssec_resource_gen.go +++ b/internal/aws/route53/dnssec_resource_gen.go @@ -47,6 +47,7 @@ func dNSSECResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -65,7 +66,6 @@ func dNSSECResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53::DNSSEC").WithTerraformTypeName("awscc_route53_dnssec") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "hosted_zone_id": "HostedZoneId", }) diff --git a/internal/aws/route53/health_check_resource_gen.go b/internal/aws/route53/health_check_resource_gen.go index d84e13aee..9bd3ba816 100644 --- a/internal/aws/route53/health_check_resource_gen.go +++ b/internal/aws/route53/health_check_resource_gen.go @@ -445,6 +445,7 @@ func healthCheckResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -463,7 +464,6 @@ func healthCheckResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53::HealthCheck").WithTerraformTypeName("awscc_route53_health_check") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarm_identifier": "AlarmIdentifier", "child_health_checks": "ChildHealthChecks", diff --git a/internal/aws/route53/hosted_zone_resource_gen.go b/internal/aws/route53/hosted_zone_resource_gen.go index 66225900b..91862791e 100644 --- a/internal/aws/route53/hosted_zone_resource_gen.go +++ b/internal/aws/route53/hosted_zone_resource_gen.go @@ -132,7 +132,7 @@ func hostedZoneResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "hosted_zone_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -262,6 +262,15 @@ func hostedZoneResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Creates a new public or private hosted zone. You create records in a public hosted zone to define how you want to route traffic on the internet for a domain, such as example.com, and its subdomains (apex.example.com, acme.example.com). You create records in a private hosted zone to define how you want to route traffic for a domain and its subdomains within one or more Amazon Virtual Private Clouds (Amazon VPCs). \n You can't convert a public hosted zone to a private hosted zone or vice versa. Instead, you must create a new hosted zone with the same name and create new resource record sets.\n For more information about charges for hosted zones, see [Amazon Route 53 Pricing](https://docs.aws.amazon.com/route53/pricing/).\n Note the following:\n + You can't create a hosted zone for a top-level domain (TLD) such as .com.\n + If your domain is registered with a registrar other than Route 53, you must update the name servers with your registrar to make Route 53 the DNS service for the domain. For more information, see [Migrating DNS Service for an Existing Domain to Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html) in the *Amazon Route 53 Developer Guide*. \n \n When you submit a ``CreateHostedZone`` request, the initial status of the hosted zone is ``PENDING``. For public hosted zones, this means that the NS and SOA records are not yet available on all Route 53 DNS servers. When the NS and SOA records are available, the status of the zone changes to ``INSYNC``.\n The ``CreateHostedZone`` request requires the caller to have an ``ec2:DescribeVpcs`` permission.\n When creating private hosted zones, the Amazon VPC must belong to the same partition where the hosted zone is created. A partition is a group of AWS-Regions. Each AWS-account is scoped to one partition.\n The following are the supported partitions:\n + ``aws`` - AWS-Regions \n + ``aws-cn`` - China Regions\n + ``aws-us-gov`` - govcloud-us-region \n \n For more information, see [Access Management](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *General Reference*.", Version: 1, @@ -272,13 +281,12 @@ func hostedZoneResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53::HostedZone").WithTerraformTypeName("awscc_route53_hosted_zone") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "cloudwatch_logs_log_group_arn": "CloudWatchLogsLogGroupArn", "comment": "Comment", "hosted_zone_config": "HostedZoneConfig", + "hosted_zone_id": "Id", "hosted_zone_tags": "HostedZoneTags", - "id": "Id", "key": "Key", "name": "Name", "name_servers": "NameServers", diff --git a/internal/aws/route53/hosted_zone_singular_data_source_gen.go b/internal/aws/route53/hosted_zone_singular_data_source_gen.go index 6b83e9708..8ee5422ca 100644 --- a/internal/aws/route53/hosted_zone_singular_data_source_gen.go +++ b/internal/aws/route53/hosted_zone_singular_data_source_gen.go @@ -104,7 +104,7 @@ func hostedZoneDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "hosted_zone_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -230,8 +230,8 @@ func hostedZoneDataSource(ctx context.Context) (datasource.DataSource, error) { "cloudwatch_logs_log_group_arn": "CloudWatchLogsLogGroupArn", "comment": "Comment", "hosted_zone_config": "HostedZoneConfig", + "hosted_zone_id": "Id", "hosted_zone_tags": "HostedZoneTags", - "id": "Id", "key": "Key", "name": "Name", "name_servers": "NameServers", diff --git a/internal/aws/route53/key_signing_key_resource_gen.go b/internal/aws/route53/key_signing_key_resource_gen.go index eb26f027a..00c84eea6 100644 --- a/internal/aws/route53/key_signing_key_resource_gen.go +++ b/internal/aws/route53/key_signing_key_resource_gen.go @@ -105,6 +105,7 @@ func keySigningKeyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -123,7 +124,6 @@ func keySigningKeyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53::KeySigningKey").WithTerraformTypeName("awscc_route53_key_signing_key") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "hosted_zone_id": "HostedZoneId", "key_management_service_arn": "KeyManagementServiceArn", diff --git a/internal/aws/route53recoverycontrol/cluster_resource_gen.go b/internal/aws/route53recoverycontrol/cluster_resource_gen.go index 3c6b58777..e3b1f8c28 100644 --- a/internal/aws/route53recoverycontrol/cluster_resource_gen.go +++ b/internal/aws/route53recoverycontrol/cluster_resource_gen.go @@ -183,6 +183,7 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -201,7 +202,6 @@ func clusterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryControl::Cluster").WithTerraformTypeName("awscc_route53recoverycontrol_cluster") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster_arn": "ClusterArn", "cluster_endpoints": "ClusterEndpoints", diff --git a/internal/aws/route53recoverycontrol/control_panel_resource_gen.go b/internal/aws/route53recoverycontrol/control_panel_resource_gen.go index e56011d32..3831631df 100644 --- a/internal/aws/route53recoverycontrol/control_panel_resource_gen.go +++ b/internal/aws/route53recoverycontrol/control_panel_resource_gen.go @@ -180,6 +180,7 @@ func controlPanelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -198,7 +199,6 @@ func controlPanelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryControl::ControlPanel").WithTerraformTypeName("awscc_route53recoverycontrol_control_panel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster_arn": "ClusterArn", "control_panel_arn": "ControlPanelArn", diff --git a/internal/aws/route53recoverycontrol/routing_control_resource_gen.go b/internal/aws/route53recoverycontrol/routing_control_resource_gen.go index 9ef5cbf3c..aa2ef3636 100644 --- a/internal/aws/route53recoverycontrol/routing_control_resource_gen.go +++ b/internal/aws/route53recoverycontrol/routing_control_resource_gen.go @@ -110,6 +110,7 @@ func routingControlResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -128,7 +129,6 @@ func routingControlResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryControl::RoutingControl").WithTerraformTypeName("awscc_route53recoverycontrol_routing_control") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cluster_arn": "ClusterArn", "control_panel_arn": "ControlPanelArn", diff --git a/internal/aws/route53recoverycontrol/safety_rule_resource_gen.go b/internal/aws/route53recoverycontrol/safety_rule_resource_gen.go index b0cda8414..89a4f112c 100644 --- a/internal/aws/route53recoverycontrol/safety_rule_resource_gen.go +++ b/internal/aws/route53recoverycontrol/safety_rule_resource_gen.go @@ -334,6 +334,7 @@ func safetyRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -352,7 +353,6 @@ func safetyRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryControl::SafetyRule").WithTerraformTypeName("awscc_route53recoverycontrol_safety_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "asserted_controls": "AssertedControls", "assertion_rule": "AssertionRule", diff --git a/internal/aws/route53recoveryreadiness/cell_resource_gen.go b/internal/aws/route53recoveryreadiness/cell_resource_gen.go index f77564cc6..9379beb52 100644 --- a/internal/aws/route53recoveryreadiness/cell_resource_gen.go +++ b/internal/aws/route53recoveryreadiness/cell_resource_gen.go @@ -160,6 +160,7 @@ func cellResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -178,7 +179,6 @@ func cellResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryReadiness::Cell").WithTerraformTypeName("awscc_route53recoveryreadiness_cell") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cell_arn": "CellArn", "cell_name": "CellName", diff --git a/internal/aws/route53recoveryreadiness/readiness_check_resource_gen.go b/internal/aws/route53recoveryreadiness/readiness_check_resource_gen.go index 7a6389432..3f8ff499f 100644 --- a/internal/aws/route53recoveryreadiness/readiness_check_resource_gen.go +++ b/internal/aws/route53recoveryreadiness/readiness_check_resource_gen.go @@ -135,6 +135,7 @@ func readinessCheckResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -153,7 +154,6 @@ func readinessCheckResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryReadiness::ReadinessCheck").WithTerraformTypeName("awscc_route53recoveryreadiness_readiness_check") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "key": "Key", "readiness_check_arn": "ReadinessCheckArn", diff --git a/internal/aws/route53recoveryreadiness/recovery_group_resource_gen.go b/internal/aws/route53recoveryreadiness/recovery_group_resource_gen.go index 5f25eeb02..2c17f6bb4 100644 --- a/internal/aws/route53recoveryreadiness/recovery_group_resource_gen.go +++ b/internal/aws/route53recoveryreadiness/recovery_group_resource_gen.go @@ -145,6 +145,7 @@ func recoveryGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -163,7 +164,6 @@ func recoveryGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryReadiness::RecoveryGroup").WithTerraformTypeName("awscc_route53recoveryreadiness_recovery_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "cells": "Cells", "key": "Key", diff --git a/internal/aws/route53recoveryreadiness/resource_set_resource_gen.go b/internal/aws/route53recoveryreadiness/resource_set_resource_gen.go index af7b518b3..a02aa11ee 100644 --- a/internal/aws/route53recoveryreadiness/resource_set_resource_gen.go +++ b/internal/aws/route53recoveryreadiness/resource_set_resource_gen.go @@ -374,6 +374,7 @@ func resourceSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -392,7 +393,6 @@ func resourceSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53RecoveryReadiness::ResourceSet").WithTerraformTypeName("awscc_route53recoveryreadiness_resource_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "component_id": "ComponentId", diff --git a/internal/aws/route53resolver/firewall_domain_list_resource_gen.go b/internal/aws/route53resolver/firewall_domain_list_resource_gen.go index 287fbbc2f..336523d3f 100644 --- a/internal/aws/route53resolver/firewall_domain_list_resource_gen.go +++ b/internal/aws/route53resolver/firewall_domain_list_resource_gen.go @@ -154,7 +154,7 @@ func firewallDomainListResource(ctx context.Context) (resource.Resource, error) // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "firewall_domain_list_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ResourceId", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -313,6 +313,15 @@ func firewallDomainListResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::FirewallDomainList.", Version: 1, @@ -323,23 +332,22 @@ func firewallDomainListResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::FirewallDomainList").WithTerraformTypeName("awscc_route53resolver_firewall_domain_list") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "creation_time": "CreationTime", - "creator_request_id": "CreatorRequestId", - "domain_count": "DomainCount", - "domain_file_url": "DomainFileUrl", - "domains": "Domains", - "id": "Id", - "key": "Key", - "managed_owner_name": "ManagedOwnerName", - "modification_time": "ModificationTime", - "name": "Name", - "status": "Status", - "status_message": "StatusMessage", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "creation_time": "CreationTime", + "creator_request_id": "CreatorRequestId", + "domain_count": "DomainCount", + "domain_file_url": "DomainFileUrl", + "domains": "Domains", + "firewall_domain_list_id": "Id", + "key": "Key", + "managed_owner_name": "ManagedOwnerName", + "modification_time": "ModificationTime", + "name": "Name", + "status": "Status", + "status_message": "StatusMessage", + "tags": "Tags", + "value": "Value", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/route53resolver/firewall_domain_list_singular_data_source_gen.go b/internal/aws/route53resolver/firewall_domain_list_singular_data_source_gen.go index dec586531..36d4b927a 100644 --- a/internal/aws/route53resolver/firewall_domain_list_singular_data_source_gen.go +++ b/internal/aws/route53resolver/firewall_domain_list_singular_data_source_gen.go @@ -115,7 +115,7 @@ func firewallDomainListDataSource(ctx context.Context) (datasource.DataSource, e // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "firewall_domain_list_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ResourceId", Computed: true, }, /*END ATTRIBUTE*/ @@ -256,21 +256,21 @@ func firewallDomainListDataSource(ctx context.Context) (datasource.DataSource, e opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::FirewallDomainList").WithTerraformTypeName("awscc_route53resolver_firewall_domain_list") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "creation_time": "CreationTime", - "creator_request_id": "CreatorRequestId", - "domain_count": "DomainCount", - "domain_file_url": "DomainFileUrl", - "domains": "Domains", - "id": "Id", - "key": "Key", - "managed_owner_name": "ManagedOwnerName", - "modification_time": "ModificationTime", - "name": "Name", - "status": "Status", - "status_message": "StatusMessage", - "tags": "Tags", - "value": "Value", + "arn": "Arn", + "creation_time": "CreationTime", + "creator_request_id": "CreatorRequestId", + "domain_count": "DomainCount", + "domain_file_url": "DomainFileUrl", + "domains": "Domains", + "firewall_domain_list_id": "Id", + "key": "Key", + "managed_owner_name": "ManagedOwnerName", + "modification_time": "ModificationTime", + "name": "Name", + "status": "Status", + "status_message": "StatusMessage", + "tags": "Tags", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/route53resolver/firewall_rule_group_association_resource_gen.go b/internal/aws/route53resolver/firewall_rule_group_association_resource_gen.go index 59d98d286..c19256db5 100644 --- a/internal/aws/route53resolver/firewall_rule_group_association_resource_gen.go +++ b/internal/aws/route53resolver/firewall_rule_group_association_resource_gen.go @@ -103,7 +103,7 @@ func firewallRuleGroupAssociationResource(ctx context.Context) (resource.Resourc // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "firewall_rule_group_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -314,6 +314,15 @@ func firewallRuleGroupAssociationResource(ctx context.Context) (resource.Resourc }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::FirewallRuleGroupAssociation.", Version: 1, @@ -324,24 +333,23 @@ func firewallRuleGroupAssociationResource(ctx context.Context) (resource.Resourc opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::FirewallRuleGroupAssociation").WithTerraformTypeName("awscc_route53resolver_firewall_rule_group_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "creation_time": "CreationTime", - "creator_request_id": "CreatorRequestId", - "firewall_rule_group_id": "FirewallRuleGroupId", - "id": "Id", - "key": "Key", - "managed_owner_name": "ManagedOwnerName", - "modification_time": "ModificationTime", - "mutation_protection": "MutationProtection", - "name": "Name", - "priority": "Priority", - "status": "Status", - "status_message": "StatusMessage", - "tags": "Tags", - "value": "Value", - "vpc_id": "VpcId", + "arn": "Arn", + "creation_time": "CreationTime", + "creator_request_id": "CreatorRequestId", + "firewall_rule_group_association_id": "Id", + "firewall_rule_group_id": "FirewallRuleGroupId", + "key": "Key", + "managed_owner_name": "ManagedOwnerName", + "modification_time": "ModificationTime", + "mutation_protection": "MutationProtection", + "name": "Name", + "priority": "Priority", + "status": "Status", + "status_message": "StatusMessage", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/route53resolver/firewall_rule_group_association_singular_data_source_gen.go b/internal/aws/route53resolver/firewall_rule_group_association_singular_data_source_gen.go index ebacdb5dd..881cb2ee5 100644 --- a/internal/aws/route53resolver/firewall_rule_group_association_singular_data_source_gen.go +++ b/internal/aws/route53resolver/firewall_rule_group_association_singular_data_source_gen.go @@ -83,7 +83,7 @@ func firewallRuleGroupAssociationDataSource(ctx context.Context) (datasource.Dat // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "firewall_rule_group_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, }, /*END ATTRIBUTE*/ @@ -261,22 +261,22 @@ func firewallRuleGroupAssociationDataSource(ctx context.Context) (datasource.Dat opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::FirewallRuleGroupAssociation").WithTerraformTypeName("awscc_route53resolver_firewall_rule_group_association") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "creation_time": "CreationTime", - "creator_request_id": "CreatorRequestId", - "firewall_rule_group_id": "FirewallRuleGroupId", - "id": "Id", - "key": "Key", - "managed_owner_name": "ManagedOwnerName", - "modification_time": "ModificationTime", - "mutation_protection": "MutationProtection", - "name": "Name", - "priority": "Priority", - "status": "Status", - "status_message": "StatusMessage", - "tags": "Tags", - "value": "Value", - "vpc_id": "VpcId", + "arn": "Arn", + "creation_time": "CreationTime", + "creator_request_id": "CreatorRequestId", + "firewall_rule_group_association_id": "Id", + "firewall_rule_group_id": "FirewallRuleGroupId", + "key": "Key", + "managed_owner_name": "ManagedOwnerName", + "modification_time": "ModificationTime", + "mutation_protection": "MutationProtection", + "name": "Name", + "priority": "Priority", + "status": "Status", + "status_message": "StatusMessage", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/route53resolver/firewall_rule_group_resource_gen.go b/internal/aws/route53resolver/firewall_rule_group_resource_gen.go index 65b477412..d7b888a33 100644 --- a/internal/aws/route53resolver/firewall_rule_group_resource_gen.go +++ b/internal/aws/route53resolver/firewall_rule_group_resource_gen.go @@ -263,7 +263,7 @@ func firewallRuleGroupResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "firewall_rule_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ResourceId", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -453,6 +453,15 @@ func firewallRuleGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::FirewallRuleGroup.", Version: 1, @@ -463,7 +472,6 @@ func firewallRuleGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::FirewallRuleGroup").WithTerraformTypeName("awscc_route53resolver_firewall_rule_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "arn": "Arn", @@ -474,8 +482,8 @@ func firewallRuleGroupResource(ctx context.Context) (resource.Resource, error) { "creation_time": "CreationTime", "creator_request_id": "CreatorRequestId", "firewall_domain_list_id": "FirewallDomainListId", + "firewall_rule_group_id": "Id", "firewall_rules": "FirewallRules", - "id": "Id", "key": "Key", "modification_time": "ModificationTime", "name": "Name", diff --git a/internal/aws/route53resolver/firewall_rule_group_singular_data_source_gen.go b/internal/aws/route53resolver/firewall_rule_group_singular_data_source_gen.go index 5caed394d..6eea7e568 100644 --- a/internal/aws/route53resolver/firewall_rule_group_singular_data_source_gen.go +++ b/internal/aws/route53resolver/firewall_rule_group_singular_data_source_gen.go @@ -192,7 +192,7 @@ func firewallRuleGroupDataSource(ctx context.Context) (datasource.DataSource, er // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "firewall_rule_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ResourceId", Computed: true, }, /*END ATTRIBUTE*/ @@ -367,8 +367,8 @@ func firewallRuleGroupDataSource(ctx context.Context) (datasource.DataSource, er "creation_time": "CreationTime", "creator_request_id": "CreatorRequestId", "firewall_domain_list_id": "FirewallDomainListId", + "firewall_rule_group_id": "Id", "firewall_rules": "FirewallRules", - "id": "Id", "key": "Key", "modification_time": "ModificationTime", "name": "Name", diff --git a/internal/aws/route53resolver/resolver_config_resource_gen.go b/internal/aws/route53resolver/resolver_config_resource_gen.go index 1fa09729d..8daffa270 100644 --- a/internal/aws/route53resolver/resolver_config_resource_gen.go +++ b/internal/aws/route53resolver/resolver_config_resource_gen.go @@ -7,7 +7,6 @@ package route53resolver import ( "context" - "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/resource" "github.com/hashicorp/terraform-plugin-framework/resource/schema" @@ -77,7 +76,7 @@ func resolverConfigResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -121,6 +120,15 @@ func resolverConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::ResolverConfig.", Version: 1, @@ -131,12 +139,11 @@ func resolverConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverConfig").WithTerraformTypeName("awscc_route53resolver_resolver_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "autodefined_reverse": "AutodefinedReverse", "autodefined_reverse_flag": "AutodefinedReverseFlag", - "id": "Id", "owner_id": "OwnerId", + "resolver_config_id": "Id", "resource_id": "ResourceId", }) diff --git a/internal/aws/route53resolver/resolver_config_singular_data_source_gen.go b/internal/aws/route53resolver/resolver_config_singular_data_source_gen.go index e9293493b..56ca562a6 100644 --- a/internal/aws/route53resolver/resolver_config_singular_data_source_gen.go +++ b/internal/aws/route53resolver/resolver_config_singular_data_source_gen.go @@ -62,7 +62,7 @@ func resolverConfigDataSource(ctx context.Context) (datasource.DataSource, error // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, }, /*END ATTRIBUTE*/ @@ -111,8 +111,8 @@ func resolverConfigDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithAttributeNameMap(map[string]string{ "autodefined_reverse": "AutodefinedReverse", "autodefined_reverse_flag": "AutodefinedReverseFlag", - "id": "Id", "owner_id": "OwnerId", + "resolver_config_id": "Id", "resource_id": "ResourceId", }) diff --git a/internal/aws/route53resolver/resolver_dnssec_config_resource_gen.go b/internal/aws/route53resolver/resolver_dnssec_config_resource_gen.go index f892d67f9..00bfcdbf0 100644 --- a/internal/aws/route53resolver/resolver_dnssec_config_resource_gen.go +++ b/internal/aws/route53resolver/resolver_dnssec_config_resource_gen.go @@ -35,7 +35,7 @@ func resolverDNSSECConfigResource(ctx context.Context) (resource.Resource, error // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_dnssec_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -101,6 +101,15 @@ func resolverDNSSECConfigResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::ResolverDNSSECConfig.", Version: 1, @@ -111,12 +120,11 @@ func resolverDNSSECConfigResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverDNSSECConfig").WithTerraformTypeName("awscc_route53resolver_resolver_dnssec_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "owner_id": "OwnerId", - "resource_id": "ResourceId", - "validation_status": "ValidationStatus", + "owner_id": "OwnerId", + "resolver_dnssec_config_id": "Id", + "resource_id": "ResourceId", + "validation_status": "ValidationStatus", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/route53resolver/resolver_dnssec_config_singular_data_source_gen.go b/internal/aws/route53resolver/resolver_dnssec_config_singular_data_source_gen.go index 74e4e1738..d5ed2c102 100644 --- a/internal/aws/route53resolver/resolver_dnssec_config_singular_data_source_gen.go +++ b/internal/aws/route53resolver/resolver_dnssec_config_singular_data_source_gen.go @@ -31,7 +31,7 @@ func resolverDNSSECConfigDataSource(ctx context.Context) (datasource.DataSource, // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_dnssec_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, }, /*END ATTRIBUTE*/ @@ -95,10 +95,10 @@ func resolverDNSSECConfigDataSource(ctx context.Context) (datasource.DataSource, opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverDNSSECConfig").WithTerraformTypeName("awscc_route53resolver_resolver_dnssec_config") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", - "owner_id": "OwnerId", - "resource_id": "ResourceId", - "validation_status": "ValidationStatus", + "owner_id": "OwnerId", + "resolver_dnssec_config_id": "Id", + "resource_id": "ResourceId", + "validation_status": "ValidationStatus", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/route53resolver/resolver_query_logging_config_association_resource_gen.go b/internal/aws/route53resolver/resolver_query_logging_config_association_resource_gen.go index e56cb9b03..b9591bdfa 100644 --- a/internal/aws/route53resolver/resolver_query_logging_config_association_resource_gen.go +++ b/internal/aws/route53resolver/resolver_query_logging_config_association_resource_gen.go @@ -84,7 +84,7 @@ func resolverQueryLoggingConfigAssociationResource(ctx context.Context) (resourc // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_query_logging_config_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -157,6 +157,15 @@ func resolverQueryLoggingConfigAssociationResource(ctx context.Context) (resourc }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation.", Version: 1, @@ -167,15 +176,14 @@ func resolverQueryLoggingConfigAssociationResource(ctx context.Context) (resourc opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverQueryLoggingConfigAssociation").WithTerraformTypeName("awscc_route53resolver_resolver_query_logging_config_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "error": "Error", "error_message": "ErrorMessage", - "id": "Id", "resolver_query_log_config_id": "ResolverQueryLogConfigId", - "resource_id": "ResourceId", - "status": "Status", + "resolver_query_logging_config_association_id": "Id", + "resource_id": "ResourceId", + "status": "Status", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/route53resolver/resolver_query_logging_config_association_singular_data_source_gen.go b/internal/aws/route53resolver/resolver_query_logging_config_association_singular_data_source_gen.go index 33be64221..6fd227e06 100644 --- a/internal/aws/route53resolver/resolver_query_logging_config_association_singular_data_source_gen.go +++ b/internal/aws/route53resolver/resolver_query_logging_config_association_singular_data_source_gen.go @@ -71,7 +71,7 @@ func resolverQueryLoggingConfigAssociationDataSource(ctx context.Context) (datas // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_query_logging_config_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id", Computed: true, }, /*END ATTRIBUTE*/ @@ -140,10 +140,10 @@ func resolverQueryLoggingConfigAssociationDataSource(ctx context.Context) (datas "creation_time": "CreationTime", "error": "Error", "error_message": "ErrorMessage", - "id": "Id", "resolver_query_log_config_id": "ResolverQueryLogConfigId", - "resource_id": "ResourceId", - "status": "Status", + "resolver_query_logging_config_association_id": "Id", + "resource_id": "ResourceId", + "status": "Status", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/route53resolver/resolver_query_logging_config_resource_gen.go b/internal/aws/route53resolver/resolver_query_logging_config_resource_gen.go index 5cc2d8670..b65ee4f35 100644 --- a/internal/aws/route53resolver/resolver_query_logging_config_resource_gen.go +++ b/internal/aws/route53resolver/resolver_query_logging_config_resource_gen.go @@ -119,7 +119,7 @@ func resolverQueryLoggingConfigResource(ctx context.Context) (resource.Resource, // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_query_logging_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ResourceId", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -205,6 +205,15 @@ func resolverQueryLoggingConfigResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource schema for AWS::Route53Resolver::ResolverQueryLoggingConfig.", Version: 1, @@ -215,18 +224,17 @@ func resolverQueryLoggingConfigResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverQueryLoggingConfig").WithTerraformTypeName("awscc_route53resolver_resolver_query_logging_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "association_count": "AssociationCount", - "creation_time": "CreationTime", - "creator_request_id": "CreatorRequestId", - "destination_arn": "DestinationArn", - "id": "Id", - "name": "Name", - "owner_id": "OwnerId", - "share_status": "ShareStatus", - "status": "Status", + "arn": "Arn", + "association_count": "AssociationCount", + "creation_time": "CreationTime", + "creator_request_id": "CreatorRequestId", + "destination_arn": "DestinationArn", + "name": "Name", + "owner_id": "OwnerId", + "resolver_query_logging_config_id": "Id", + "share_status": "ShareStatus", + "status": "Status", }) opts = opts.IsImmutableType(true) diff --git a/internal/aws/route53resolver/resolver_query_logging_config_singular_data_source_gen.go b/internal/aws/route53resolver/resolver_query_logging_config_singular_data_source_gen.go index f8224348a..370996f8c 100644 --- a/internal/aws/route53resolver/resolver_query_logging_config_singular_data_source_gen.go +++ b/internal/aws/route53resolver/resolver_query_logging_config_singular_data_source_gen.go @@ -94,7 +94,7 @@ func resolverQueryLoggingConfigDataSource(ctx context.Context) (datasource.DataS // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "resolver_query_logging_config_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "ResourceId", Computed: true, }, /*END ATTRIBUTE*/ @@ -175,16 +175,16 @@ func resolverQueryLoggingConfigDataSource(ctx context.Context) (datasource.DataS opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverQueryLoggingConfig").WithTerraformTypeName("awscc_route53resolver_resolver_query_logging_config") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "association_count": "AssociationCount", - "creation_time": "CreationTime", - "creator_request_id": "CreatorRequestId", - "destination_arn": "DestinationArn", - "id": "Id", - "name": "Name", - "owner_id": "OwnerId", - "share_status": "ShareStatus", - "status": "Status", + "arn": "Arn", + "association_count": "AssociationCount", + "creation_time": "CreationTime", + "creator_request_id": "CreatorRequestId", + "destination_arn": "DestinationArn", + "name": "Name", + "owner_id": "OwnerId", + "resolver_query_logging_config_id": "Id", + "share_status": "ShareStatus", + "status": "Status", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/route53resolver/resolver_rule_association_resource_gen.go b/internal/aws/route53resolver/resolver_rule_association_resource_gen.go index bb6e25f17..42d0895fa 100644 --- a/internal/aws/route53resolver/resolver_rule_association_resource_gen.go +++ b/internal/aws/route53resolver/resolver_rule_association_resource_gen.go @@ -84,6 +84,7 @@ func resolverRuleAssociationResource(ctx context.Context) (resource.Resource, er }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -102,7 +103,6 @@ func resolverRuleAssociationResource(ctx context.Context) (resource.Resource, er opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverRuleAssociation").WithTerraformTypeName("awscc_route53resolver_resolver_rule_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "name": "Name", "resolver_rule_association_id": "ResolverRuleAssociationId", diff --git a/internal/aws/route53resolver/resolver_rule_resource_gen.go b/internal/aws/route53resolver/resolver_rule_resource_gen.go index 78b6e3f2d..9487a13dc 100644 --- a/internal/aws/route53resolver/resolver_rule_resource_gen.go +++ b/internal/aws/route53resolver/resolver_rule_resource_gen.go @@ -294,6 +294,7 @@ func resolverRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -312,7 +313,6 @@ func resolverRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Route53Resolver::ResolverRule").WithTerraformTypeName("awscc_route53resolver_resolver_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "domain_name": "DomainName", diff --git a/internal/aws/rum/app_monitor_resource_gen.go b/internal/aws/rum/app_monitor_resource_gen.go index 145b040ca..c5ee9e0ab 100644 --- a/internal/aws/rum/app_monitor_resource_gen.go +++ b/internal/aws/rum/app_monitor_resource_gen.go @@ -7,8 +7,6 @@ package rum import ( "context" - "regexp" - "github.com/hashicorp/terraform-plugin-framework-validators/float64validator" "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" @@ -27,6 +25,7 @@ import ( "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" + "regexp" ) func init() { @@ -136,7 +135,7 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { // "properties": { // "DimensionKeys": { // "additionalProperties": false, - // "description": "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", + // "description": "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", // "patternProperties": { // "": { // "maxLength": 255, @@ -154,11 +153,18 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { // "type": "string" // }, // "Name": { - // "description": "The name for the metric that is defined in this structure. Valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", + // "description": "The name for the metric that is defined in this structure. For extended metrics, valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", // "maxLength": 255, // "minLength": 1, // "type": "string" // }, + // "Namespace": { + // "description": "The namespace used by CloudWatch Metrics for the metric that is defined in this structure", + // "maxLength": 237, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9-._/#:]+$", + // "type": "string" + // }, // "UnitLabel": { // "description": "The CloudWatch metric unit to use for this metric. If you omit this field, the metric is recorded with no unit.", // "maxLength": 256, @@ -358,7 +364,7 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { "dimension_keys": // Pattern: "" schema.MapAttribute{ /*START ATTRIBUTE*/ ElementType: types.StringType, - Description: "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", + Description: "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", Optional: true, Computed: true, PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ @@ -379,12 +385,25 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ // Property: Name "name": schema.StringAttribute{ /*START ATTRIBUTE*/ - Description: "The name for the metric that is defined in this structure. Valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", + Description: "The name for the metric that is defined in this structure. For extended metrics, valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", Required: true, Validators: []validator.String{ /*START VALIDATORS*/ stringvalidator.LengthBetween(1, 255), }, /*END VALIDATORS*/ }, /*END ATTRIBUTE*/ + // Property: Namespace + "namespace": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The namespace used by CloudWatch Metrics for the metric that is defined in this structure", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 237), + stringvalidator.RegexMatches(regexp.MustCompile("[a-zA-Z0-9-._/#:]+$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ // Property: UnitLabel "unit_label": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The CloudWatch metric unit to use for this metric. If you omit this field, the metric is recorded with no unit.", @@ -549,6 +568,23 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { stringvalidator.LengthBetween(1, 253), }, /*END VALIDATORS*/ }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The unique ID of the new app monitor.", + // "maxLength": 36, + // "minLength": 36, + // "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + // "type": "string" + // } + "app_monitor_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The unique ID of the new app monitor.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ // Property: Name // CloudFormation resource type schema: // @@ -633,6 +669,7 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -651,10 +688,10 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::RUM::AppMonitor").WithTerraformTypeName("awscc_rum_app_monitor") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allow_cookies": "AllowCookies", "app_monitor_configuration": "AppMonitorConfiguration", + "app_monitor_id": "Id", "custom_events": "CustomEvents", "cw_log_enabled": "CwLogEnabled", "destination": "Destination", @@ -673,6 +710,7 @@ func appMonitorResource(ctx context.Context) (resource.Resource, error) { "metric_definitions": "MetricDefinitions", "metric_destinations": "MetricDestinations", "name": "Name", + "namespace": "Namespace", "session_sample_rate": "SessionSampleRate", "status": "Status", "tags": "Tags", diff --git a/internal/aws/rum/app_monitor_singular_data_source_gen.go b/internal/aws/rum/app_monitor_singular_data_source_gen.go index 27ff3ddb8..13761acd2 100644 --- a/internal/aws/rum/app_monitor_singular_data_source_gen.go +++ b/internal/aws/rum/app_monitor_singular_data_source_gen.go @@ -122,7 +122,7 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { // "properties": { // "DimensionKeys": { // "additionalProperties": false, - // "description": "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", + // "description": "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", // "patternProperties": { // "": { // "maxLength": 255, @@ -140,11 +140,18 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { // "type": "string" // }, // "Name": { - // "description": "The name for the metric that is defined in this structure. Valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", + // "description": "The name for the metric that is defined in this structure. For extended metrics, valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", // "maxLength": 255, // "minLength": 1, // "type": "string" // }, + // "Namespace": { + // "description": "The namespace used by CloudWatch Metrics for the metric that is defined in this structure", + // "maxLength": 237, + // "minLength": 1, + // "pattern": "[a-zA-Z0-9-._/#:]+$", + // "type": "string" + // }, // "UnitLabel": { // "description": "The CloudWatch metric unit to use for this metric. If you omit this field, the metric is recorded with no unit.", // "maxLength": 256, @@ -269,7 +276,7 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { "dimension_keys": // Pattern: "" schema.MapAttribute{ /*START ATTRIBUTE*/ ElementType: types.StringType, - Description: "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", + Description: "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", Computed: true, }, /*END ATTRIBUTE*/ // Property: EventPattern @@ -279,7 +286,12 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { }, /*END ATTRIBUTE*/ // Property: Name "name": schema.StringAttribute{ /*START ATTRIBUTE*/ - Description: "The name for the metric that is defined in this structure. Valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", + Description: "The name for the metric that is defined in this structure. For extended metrics, valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Namespace + "namespace": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The namespace used by CloudWatch Metrics for the metric that is defined in this structure", Computed: true, }, /*END ATTRIBUTE*/ // Property: UnitLabel @@ -371,6 +383,20 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { Description: "The top-level internet domain name for which your application has administrative authority.", Computed: true, }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The unique ID of the new app monitor.", + // "maxLength": 36, + // "minLength": 36, + // "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + // "type": "string" + // } + "app_monitor_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The unique ID of the new app monitor.", + Computed: true, + }, /*END ATTRIBUTE*/ // Property: Name // CloudFormation resource type schema: // @@ -455,6 +481,7 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithAttributeNameMap(map[string]string{ "allow_cookies": "AllowCookies", "app_monitor_configuration": "AppMonitorConfiguration", + "app_monitor_id": "Id", "custom_events": "CustomEvents", "cw_log_enabled": "CwLogEnabled", "destination": "Destination", @@ -473,6 +500,7 @@ func appMonitorDataSource(ctx context.Context) (datasource.DataSource, error) { "metric_definitions": "MetricDefinitions", "metric_destinations": "MetricDestinations", "name": "Name", + "namespace": "Namespace", "session_sample_rate": "SessionSampleRate", "status": "Status", "tags": "Tags", diff --git a/internal/aws/s3/access_grant_resource_gen.go b/internal/aws/s3/access_grant_resource_gen.go index 6c4ceffde..b173c6419 100644 --- a/internal/aws/s3/access_grant_resource_gen.go +++ b/internal/aws/s3/access_grant_resource_gen.go @@ -279,6 +279,7 @@ func accessGrantResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -297,7 +298,6 @@ func accessGrantResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3::AccessGrant").WithTerraformTypeName("awscc_s3_access_grant") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_grant_arn": "AccessGrantArn", "access_grant_id": "AccessGrantId", diff --git a/internal/aws/s3/access_grants_instance_resource_gen.go b/internal/aws/s3/access_grants_instance_resource_gen.go index 143cc71fd..edd5cf1cb 100644 --- a/internal/aws/s3/access_grants_instance_resource_gen.go +++ b/internal/aws/s3/access_grants_instance_resource_gen.go @@ -115,6 +115,7 @@ func accessGrantsInstanceResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -133,7 +134,6 @@ func accessGrantsInstanceResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::S3::AccessGrantsInstance").WithTerraformTypeName("awscc_s3_access_grants_instance") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_grants_instance_arn": "AccessGrantsInstanceArn", "access_grants_instance_id": "AccessGrantsInstanceId", diff --git a/internal/aws/s3/access_grants_location_resource_gen.go b/internal/aws/s3/access_grants_location_resource_gen.go index 95c305efb..36f5a2b15 100644 --- a/internal/aws/s3/access_grants_location_resource_gen.go +++ b/internal/aws/s3/access_grants_location_resource_gen.go @@ -139,6 +139,7 @@ func accessGrantsLocationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -157,7 +158,6 @@ func accessGrantsLocationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::S3::AccessGrantsLocation").WithTerraformTypeName("awscc_s3_access_grants_location") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_grants_location_arn": "AccessGrantsLocationArn", "access_grants_location_id": "AccessGrantsLocationId", diff --git a/internal/aws/s3/access_point_resource_gen.go b/internal/aws/s3/access_point_resource_gen.go index c4e50dbec..9b4a31a2f 100644 --- a/internal/aws/s3/access_point_resource_gen.go +++ b/internal/aws/s3/access_point_resource_gen.go @@ -270,6 +270,7 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -288,7 +289,6 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3::AccessPoint").WithTerraformTypeName("awscc_s3_access_point") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias": "Alias", "arn": "Arn", diff --git a/internal/aws/s3/bucket_policy_resource_gen.go b/internal/aws/s3/bucket_policy_resource_gen.go index 958bd1b54..9db9a7dcb 100644 --- a/internal/aws/s3/bucket_policy_resource_gen.go +++ b/internal/aws/s3/bucket_policy_resource_gen.go @@ -51,6 +51,7 @@ func bucketPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -69,7 +70,6 @@ func bucketPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3::BucketPolicy").WithTerraformTypeName("awscc_s3_bucket_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "policy_document": "PolicyDocument", diff --git a/internal/aws/s3/bucket_resource_gen.go b/internal/aws/s3/bucket_resource_gen.go index 13b14036e..33216ba97 100644 --- a/internal/aws/s3/bucket_resource_gen.go +++ b/internal/aws/s3/bucket_resource_gen.go @@ -3875,6 +3875,7 @@ func bucketResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3893,7 +3894,6 @@ func bucketResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3::Bucket").WithTerraformTypeName("awscc_s3_bucket") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "abort_incomplete_multipart_upload": "AbortIncompleteMultipartUpload", "accelerate_configuration": "AccelerateConfiguration", diff --git a/internal/aws/s3/multi_region_access_point_policy_resource_gen.go b/internal/aws/s3/multi_region_access_point_policy_resource_gen.go index 63840d0c1..8f94ce473 100644 --- a/internal/aws/s3/multi_region_access_point_policy_resource_gen.go +++ b/internal/aws/s3/multi_region_access_point_policy_resource_gen.go @@ -99,6 +99,7 @@ func multiRegionAccessPointPolicyResource(ctx context.Context) (resource.Resourc }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -117,7 +118,6 @@ func multiRegionAccessPointPolicyResource(ctx context.Context) (resource.Resourc opts = opts.WithCloudFormationTypeName("AWS::S3::MultiRegionAccessPointPolicy").WithTerraformTypeName("awscc_s3_multi_region_access_point_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "is_public": "IsPublic", "mrap_name": "MrapName", diff --git a/internal/aws/s3/multi_region_access_point_resource_gen.go b/internal/aws/s3/multi_region_access_point_resource_gen.go index e559a1af7..ce2e3f6a8 100644 --- a/internal/aws/s3/multi_region_access_point_resource_gen.go +++ b/internal/aws/s3/multi_region_access_point_resource_gen.go @@ -223,6 +223,7 @@ func multiRegionAccessPointResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -241,7 +242,6 @@ func multiRegionAccessPointResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::S3::MultiRegionAccessPoint").WithTerraformTypeName("awscc_s3_multi_region_access_point") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias": "Alias", "block_public_acls": "BlockPublicAcls", diff --git a/internal/aws/s3/storage_lens_group_resource_gen.go b/internal/aws/s3/storage_lens_group_resource_gen.go index c48200f24..95a8ef7fe 100644 --- a/internal/aws/s3/storage_lens_group_resource_gen.go +++ b/internal/aws/s3/storage_lens_group_resource_gen.go @@ -807,6 +807,7 @@ func storageLensGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -825,7 +826,6 @@ func storageLensGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3::StorageLensGroup").WithTerraformTypeName("awscc_s3_storage_lens_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "and": "And", "bytes_greater_than": "BytesGreaterThan", diff --git a/internal/aws/s3/storage_lens_resource_gen.go b/internal/aws/s3/storage_lens_resource_gen.go index ba047d963..309cb168b 100644 --- a/internal/aws/s3/storage_lens_resource_gen.go +++ b/internal/aws/s3/storage_lens_resource_gen.go @@ -952,6 +952,7 @@ func storageLensResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -970,7 +971,6 @@ func storageLensResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3::StorageLens").WithTerraformTypeName("awscc_s3_storage_lens") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "account_level": "AccountLevel", diff --git a/internal/aws/s3express/bucket_policy_resource_gen.go b/internal/aws/s3express/bucket_policy_resource_gen.go index 65e094740..d44c92bf7 100644 --- a/internal/aws/s3express/bucket_policy_resource_gen.go +++ b/internal/aws/s3express/bucket_policy_resource_gen.go @@ -51,6 +51,7 @@ func bucketPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -69,7 +70,6 @@ func bucketPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3Express::BucketPolicy").WithTerraformTypeName("awscc_s3express_bucket_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "policy_document": "PolicyDocument", diff --git a/internal/aws/s3express/directory_bucket_resource_gen.go b/internal/aws/s3express/directory_bucket_resource_gen.go index cbda60451..5d7b501be 100644 --- a/internal/aws/s3express/directory_bucket_resource_gen.go +++ b/internal/aws/s3express/directory_bucket_resource_gen.go @@ -101,6 +101,7 @@ func directoryBucketResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -119,7 +120,6 @@ func directoryBucketResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3Express::DirectoryBucket").WithTerraformTypeName("awscc_s3express_directory_bucket") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket_name": "BucketName", diff --git a/internal/aws/s3objectlambda/access_point_policy_resource_gen.go b/internal/aws/s3objectlambda/access_point_policy_resource_gen.go index 8a701baec..e9d97c2a0 100644 --- a/internal/aws/s3objectlambda/access_point_policy_resource_gen.go +++ b/internal/aws/s3objectlambda/access_point_policy_resource_gen.go @@ -63,6 +63,7 @@ func accessPointPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -81,7 +82,6 @@ func accessPointPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3ObjectLambda::AccessPointPolicy").WithTerraformTypeName("awscc_s3objectlambda_access_point_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "object_lambda_access_point": "ObjectLambdaAccessPoint", "policy_document": "PolicyDocument", diff --git a/internal/aws/s3objectlambda/access_point_resource_gen.go b/internal/aws/s3objectlambda/access_point_resource_gen.go index bb81b713f..57f14e8a1 100644 --- a/internal/aws/s3objectlambda/access_point_resource_gen.go +++ b/internal/aws/s3objectlambda/access_point_resource_gen.go @@ -354,6 +354,7 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -372,7 +373,6 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3ObjectLambda::AccessPoint").WithTerraformTypeName("awscc_s3objectlambda_access_point") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "alias": "Alias", diff --git a/internal/aws/s3outposts/access_point_resource_gen.go b/internal/aws/s3outposts/access_point_resource_gen.go index 10da585fe..9aa8dc7bf 100644 --- a/internal/aws/s3outposts/access_point_resource_gen.go +++ b/internal/aws/s3outposts/access_point_resource_gen.go @@ -143,6 +143,7 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -161,7 +162,6 @@ func accessPointResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3Outposts::AccessPoint").WithTerraformTypeName("awscc_s3outposts_access_point") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", diff --git a/internal/aws/s3outposts/bucket_policy_resource_gen.go b/internal/aws/s3outposts/bucket_policy_resource_gen.go index b3e5f3174..b29ae10e5 100644 --- a/internal/aws/s3outposts/bucket_policy_resource_gen.go +++ b/internal/aws/s3outposts/bucket_policy_resource_gen.go @@ -63,6 +63,7 @@ func bucketPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -81,7 +82,6 @@ func bucketPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3Outposts::BucketPolicy").WithTerraformTypeName("awscc_s3outposts_bucket_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "policy_document": "PolicyDocument", diff --git a/internal/aws/s3outposts/bucket_resource_gen.go b/internal/aws/s3outposts/bucket_resource_gen.go index db56a5420..724d5a016 100644 --- a/internal/aws/s3outposts/bucket_resource_gen.go +++ b/internal/aws/s3outposts/bucket_resource_gen.go @@ -508,6 +508,7 @@ func bucketResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -526,7 +527,6 @@ func bucketResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::S3Outposts::Bucket").WithTerraformTypeName("awscc_s3outposts_bucket") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "abort_incomplete_multipart_upload": "AbortIncompleteMultipartUpload", "and_operator": "AndOperator", diff --git a/internal/aws/s3outposts/endpoint_plural_data_source_gen.go b/internal/aws/s3outposts/endpoint_plural_data_source_gen.go new file mode 100644 index 000000000..ba98b03b8 --- /dev/null +++ b/internal/aws/s3outposts/endpoint_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package s3outposts + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_s3outposts_endpoints", endpointsDataSource) +} + +// endpointsDataSource returns the Terraform awscc_s3outposts_endpoints data source. +// This Terraform data source corresponds to the CloudFormation AWS::S3Outposts::Endpoint resource. +func endpointsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::S3Outposts::Endpoint", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::S3Outposts::Endpoint").WithTerraformTypeName("awscc_s3outposts_endpoints") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/s3outposts/endpoint_plural_data_source_gen_test.go b/internal/aws/s3outposts/endpoint_plural_data_source_gen_test.go new file mode 100644 index 000000000..820516c7d --- /dev/null +++ b/internal/aws/s3outposts/endpoint_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package s3outposts_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSS3OutpostsEndpointsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::S3Outposts::Endpoint", "awscc_s3outposts_endpoints", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/s3outposts/endpoint_resource_gen.go b/internal/aws/s3outposts/endpoint_resource_gen.go new file mode 100644 index 000000000..68ae4351b --- /dev/null +++ b/internal/aws/s3outposts/endpoint_resource_gen.go @@ -0,0 +1,359 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package s3outposts + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_s3outposts_endpoint", endpointResource) +} + +// endpointResource returns the Terraform awscc_s3outposts_endpoint resource. +// This Terraform resource corresponds to the CloudFormation AWS::S3Outposts::Endpoint resource. +func endpointResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessType + // CloudFormation resource type schema: + // + // { + // "default": "Private", + // "description": "The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool.", + // "enum": [ + // "CustomerOwnedIp", + // "Private" + // ], + // "type": "string" + // } + "access_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "CustomerOwnedIp", + "Private", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + generic.StringDefaultValue("Private"), + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the endpoint.", + // "maxLength": 500, + // "minLength": 5, + // "pattern": "^arn:[^:]+:s3-outposts:[a-zA-Z0-9\\-]+:\\d{12}:outpost\\/[^:]+\\/endpoint/[a-zA-Z0-9]{19}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the endpoint.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CidrBlock + // CloudFormation resource type schema: + // + // { + // "description": "The VPC CIDR committed by this endpoint.", + // "maxLength": 20, + // "minLength": 1, + // "type": "string" + // } + "cidr_block": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The VPC CIDR committed by this endpoint.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CreationTime + // CloudFormation resource type schema: + // + // { + // "description": "The time the endpoint was created.", + // "pattern": "^([0-2]\\d{3})-(0[0-9]|1[0-2])-([0-2]\\d|3[01])T([01]\\d|2[0-4]):([0-5]\\d):([0-6]\\d)((\\.\\d{3})?)Z$", + // "type": "string" + // } + "creation_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The time the endpoint was created.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CustomerOwnedIpv4Pool + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint.", + // "pattern": "^ipv4pool-coip-([0-9a-f]{17})$", + // "type": "string" + // } + "customer_owned_ipv_4_pool": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint.", + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^ipv4pool-coip-([0-9a-f]{17})$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: FailedReason + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "The failure reason, if any, for a create or delete endpoint operation.", + // "properties": { + // "ErrorCode": { + // "description": "The failure code, if any, for a create or delete endpoint operation.", + // "type": "string" + // }, + // "Message": { + // "description": "Additional error details describing the endpoint failure and recommended action.", + // "type": "string" + // } + // }, + // "type": "object" + // } + "failed_reason": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ErrorCode + "error_code": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The failure code, if any, for a create or delete endpoint operation.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Message + "message": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Additional error details describing the endpoint failure and recommended action.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "The failure reason, if any, for a create or delete endpoint operation.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the endpoint.", + // "maxLength": 500, + // "minLength": 5, + // "pattern": "^[a-zA-Z0-9]{19}$", + // "type": "string" + // } + "endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the endpoint.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: NetworkInterfaces + // CloudFormation resource type schema: + // + // { + // "description": "The network interfaces of the endpoint.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "The container for the network interface.", + // "properties": { + // "NetworkInterfaceId": { + // "maxLength": 100, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "NetworkInterfaceId" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "network_interfaces": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NetworkInterfaceId + "network_interface_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The network interfaces of the endpoint.", + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: OutpostId + // CloudFormation resource type schema: + // + // { + // "description": "The id of the customer outpost on which the bucket resides.", + // "pattern": "^(op-[a-f0-9]{17}|\\d{12}|ec2)$", + // "type": "string" + // } + "outpost_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The id of the customer outpost on which the bucket resides.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^(op-[a-f0-9]{17}|\\d{12}|ec2)$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SecurityGroupId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the security group to use with the endpoint.", + // "maxLength": 100, + // "minLength": 1, + // "pattern": "^sg-([0-9a-f]{8}|[0-9a-f]{17})$", + // "type": "string" + // } + "security_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the security group to use with the endpoint.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 100), + stringvalidator.RegexMatches(regexp.MustCompile("^sg-([0-9a-f]{8}|[0-9a-f]{17})$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "Available", + // "Pending", + // "Deleting", + // "Create_Failed", + // "Delete_Failed" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SubnetId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the subnet in the selected VPC. The subnet must belong to the Outpost.", + // "maxLength": 100, + // "minLength": 1, + // "pattern": "^subnet-([0-9a-f]{8}|[0-9a-f]{17})$", + // "type": "string" + // } + "subnet_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the subnet in the selected VPC. The subnet must belong to the Outpost.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 100), + stringvalidator.RegexMatches(regexp.MustCompile("^subnet-([0-9a-f]{8}|[0-9a-f]{17})$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type Definition for AWS::S3Outposts::Endpoint", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::S3Outposts::Endpoint").WithTerraformTypeName("awscc_s3outposts_endpoint") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_type": "AccessType", + "arn": "Arn", + "cidr_block": "CidrBlock", + "creation_time": "CreationTime", + "customer_owned_ipv_4_pool": "CustomerOwnedIpv4Pool", + "endpoint_id": "Id", + "error_code": "ErrorCode", + "failed_reason": "FailedReason", + "message": "Message", + "network_interface_id": "NetworkInterfaceId", + "network_interfaces": "NetworkInterfaces", + "outpost_id": "OutpostId", + "security_group_id": "SecurityGroupId", + "status": "Status", + "subnet_id": "SubnetId", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/s3outposts/endpoint_resource_gen_test.go b/internal/aws/s3outposts/endpoint_resource_gen_test.go new file mode 100644 index 000000000..e9e6e49d6 --- /dev/null +++ b/internal/aws/s3outposts/endpoint_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package s3outposts_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSS3OutpostsEndpoint_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::S3Outposts::Endpoint", "awscc_s3outposts_endpoint", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/s3outposts/endpoint_singular_data_source_gen.go b/internal/aws/s3outposts/endpoint_singular_data_source_gen.go new file mode 100644 index 000000000..13cd1b711 --- /dev/null +++ b/internal/aws/s3outposts/endpoint_singular_data_source_gen.go @@ -0,0 +1,273 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package s3outposts + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_s3outposts_endpoint", endpointDataSource) +} + +// endpointDataSource returns the Terraform awscc_s3outposts_endpoint data source. +// This Terraform data source corresponds to the CloudFormation AWS::S3Outposts::Endpoint resource. +func endpointDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: AccessType + // CloudFormation resource type schema: + // + // { + // "default": "Private", + // "description": "The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool.", + // "enum": [ + // "CustomerOwnedIp", + // "Private" + // ], + // "type": "string" + // } + "access_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The type of access for the on-premise network connectivity for the Outpost endpoint. To access endpoint from an on-premises network, you must specify the access type and provide the customer owned Ipv4 pool.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "description": "The Amazon Resource Name (ARN) of the endpoint.", + // "maxLength": 500, + // "minLength": 5, + // "pattern": "^arn:[^:]+:s3-outposts:[a-zA-Z0-9\\-]+:\\d{12}:outpost\\/[^:]+\\/endpoint/[a-zA-Z0-9]{19}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The Amazon Resource Name (ARN) of the endpoint.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CidrBlock + // CloudFormation resource type schema: + // + // { + // "description": "The VPC CIDR committed by this endpoint.", + // "maxLength": 20, + // "minLength": 1, + // "type": "string" + // } + "cidr_block": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The VPC CIDR committed by this endpoint.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreationTime + // CloudFormation resource type schema: + // + // { + // "description": "The time the endpoint was created.", + // "pattern": "^([0-2]\\d{3})-(0[0-9]|1[0-2])-([0-2]\\d|3[01])T([01]\\d|2[0-4]):([0-5]\\d):([0-6]\\d)((\\.\\d{3})?)Z$", + // "type": "string" + // } + "creation_time": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The time the endpoint was created.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomerOwnedIpv4Pool + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint.", + // "pattern": "^ipv4pool-coip-([0-9a-f]{17})$", + // "type": "string" + // } + "customer_owned_ipv_4_pool": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the customer-owned IPv4 pool for the Endpoint. IP addresses will be allocated from this pool for the endpoint.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: FailedReason + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "The failure reason, if any, for a create or delete endpoint operation.", + // "properties": { + // "ErrorCode": { + // "description": "The failure code, if any, for a create or delete endpoint operation.", + // "type": "string" + // }, + // "Message": { + // "description": "Additional error details describing the endpoint failure and recommended action.", + // "type": "string" + // } + // }, + // "type": "object" + // } + "failed_reason": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ErrorCode + "error_code": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The failure code, if any, for a create or delete endpoint operation.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Message + "message": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Additional error details describing the endpoint failure and recommended action.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "The failure reason, if any, for a create or delete endpoint operation.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the endpoint.", + // "maxLength": 500, + // "minLength": 5, + // "pattern": "^[a-zA-Z0-9]{19}$", + // "type": "string" + // } + "endpoint_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the endpoint.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: NetworkInterfaces + // CloudFormation resource type schema: + // + // { + // "description": "The network interfaces of the endpoint.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "The container for the network interface.", + // "properties": { + // "NetworkInterfaceId": { + // "maxLength": 100, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "NetworkInterfaceId" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "network_interfaces": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: NetworkInterfaceId + "network_interface_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The network interfaces of the endpoint.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: OutpostId + // CloudFormation resource type schema: + // + // { + // "description": "The id of the customer outpost on which the bucket resides.", + // "pattern": "^(op-[a-f0-9]{17}|\\d{12}|ec2)$", + // "type": "string" + // } + "outpost_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The id of the customer outpost on which the bucket resides.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SecurityGroupId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the security group to use with the endpoint.", + // "maxLength": 100, + // "minLength": 1, + // "pattern": "^sg-([0-9a-f]{8}|[0-9a-f]{17})$", + // "type": "string" + // } + "security_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the security group to use with the endpoint.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "Available", + // "Pending", + // "Deleting", + // "Create_Failed", + // "Delete_Failed" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SubnetId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of the subnet in the selected VPC. The subnet must belong to the Outpost.", + // "maxLength": 100, + // "minLength": 1, + // "pattern": "^subnet-([0-9a-f]{8}|[0-9a-f]{17})$", + // "type": "string" + // } + "subnet_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of the subnet in the selected VPC. The subnet must belong to the Outpost.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::S3Outposts::Endpoint", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::S3Outposts::Endpoint").WithTerraformTypeName("awscc_s3outposts_endpoint") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_type": "AccessType", + "arn": "Arn", + "cidr_block": "CidrBlock", + "creation_time": "CreationTime", + "customer_owned_ipv_4_pool": "CustomerOwnedIpv4Pool", + "endpoint_id": "Id", + "error_code": "ErrorCode", + "failed_reason": "FailedReason", + "message": "Message", + "network_interface_id": "NetworkInterfaceId", + "network_interfaces": "NetworkInterfaces", + "outpost_id": "OutpostId", + "security_group_id": "SecurityGroupId", + "status": "Status", + "subnet_id": "SubnetId", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/s3outposts/endpoint_singular_data_source_gen_test.go b/internal/aws/s3outposts/endpoint_singular_data_source_gen_test.go new file mode 100644 index 000000000..7d1c49814 --- /dev/null +++ b/internal/aws/s3outposts/endpoint_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package s3outposts_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSS3OutpostsEndpointDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::S3Outposts::Endpoint", "awscc_s3outposts_endpoint", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSS3OutpostsEndpointDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::S3Outposts::Endpoint", "awscc_s3outposts_endpoint", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/sagemaker/app_image_config_resource_gen.go b/internal/aws/sagemaker/app_image_config_resource_gen.go index a6c7e66f0..87f9bd90c 100644 --- a/internal/aws/sagemaker/app_image_config_resource_gen.go +++ b/internal/aws/sagemaker/app_image_config_resource_gen.go @@ -447,6 +447,7 @@ func appImageConfigResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -465,7 +466,6 @@ func appImageConfigResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::AppImageConfig").WithTerraformTypeName("awscc_sagemaker_app_image_config") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_image_config_arn": "AppImageConfigArn", "app_image_config_name": "AppImageConfigName", diff --git a/internal/aws/sagemaker/app_resource_gen.go b/internal/aws/sagemaker/app_resource_gen.go index 24f8a3197..2025b2ed0 100644 --- a/internal/aws/sagemaker/app_resource_gen.go +++ b/internal/aws/sagemaker/app_resource_gen.go @@ -407,6 +407,7 @@ func appResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -425,7 +426,6 @@ func appResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::App").WithTerraformTypeName("awscc_sagemaker_app") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_arn": "AppArn", "app_name": "AppName", diff --git a/internal/aws/sagemaker/data_quality_job_definition_resource_gen.go b/internal/aws/sagemaker/data_quality_job_definition_resource_gen.go index 40558a7d9..70d76c547 100644 --- a/internal/aws/sagemaker/data_quality_job_definition_resource_gen.go +++ b/internal/aws/sagemaker/data_quality_job_definition_resource_gen.go @@ -1190,6 +1190,7 @@ func dataQualityJobDefinitionResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1208,7 +1209,6 @@ func dataQualityJobDefinitionResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::SageMaker::DataQualityJobDefinition").WithTerraformTypeName("awscc_sagemaker_data_quality_job_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "baselining_job_name": "BaseliningJobName", "batch_transform_input": "BatchTransformInput", diff --git a/internal/aws/sagemaker/device_fleet_resource_gen.go b/internal/aws/sagemaker/device_fleet_resource_gen.go index 715da26bd..38e483930 100644 --- a/internal/aws/sagemaker/device_fleet_resource_gen.go +++ b/internal/aws/sagemaker/device_fleet_resource_gen.go @@ -206,6 +206,7 @@ func deviceFleetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -224,7 +225,6 @@ func deviceFleetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::DeviceFleet").WithTerraformTypeName("awscc_sagemaker_device_fleet") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "device_fleet_name": "DeviceFleetName", diff --git a/internal/aws/sagemaker/device_resource_gen.go b/internal/aws/sagemaker/device_resource_gen.go index b9028bd3f..8715ab037 100644 --- a/internal/aws/sagemaker/device_resource_gen.go +++ b/internal/aws/sagemaker/device_resource_gen.go @@ -190,6 +190,7 @@ func deviceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -208,7 +209,6 @@ func deviceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Device").WithTerraformTypeName("awscc_sagemaker_device") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "device": "Device", diff --git a/internal/aws/sagemaker/domain_resource_gen.go b/internal/aws/sagemaker/domain_resource_gen.go index 5b71a08c9..7ae778278 100644 --- a/internal/aws/sagemaker/domain_resource_gen.go +++ b/internal/aws/sagemaker/domain_resource_gen.go @@ -3392,6 +3392,7 @@ func domainResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3410,7 +3411,6 @@ func domainResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Domain").WithTerraformTypeName("awscc_sagemaker_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_status": "AccessStatus", "app_image_config_name": "AppImageConfigName", diff --git a/internal/aws/sagemaker/feature_group_resource_gen.go b/internal/aws/sagemaker/feature_group_resource_gen.go index f885eaba1..ba06851ae 100644 --- a/internal/aws/sagemaker/feature_group_resource_gen.go +++ b/internal/aws/sagemaker/feature_group_resource_gen.go @@ -657,6 +657,7 @@ func featureGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -675,7 +676,6 @@ func featureGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::FeatureGroup").WithTerraformTypeName("awscc_sagemaker_feature_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "catalog": "Catalog", "creation_time": "CreationTime", diff --git a/internal/aws/sagemaker/image_resource_gen.go b/internal/aws/sagemaker/image_resource_gen.go index bb8c26368..7963e4d65 100644 --- a/internal/aws/sagemaker/image_resource_gen.go +++ b/internal/aws/sagemaker/image_resource_gen.go @@ -192,6 +192,7 @@ func imageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -210,7 +211,6 @@ func imageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Image").WithTerraformTypeName("awscc_sagemaker_image") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "image_arn": "ImageArn", "image_description": "ImageDescription", diff --git a/internal/aws/sagemaker/image_version_resource_gen.go b/internal/aws/sagemaker/image_version_resource_gen.go index 0462620ff..99ab48852 100644 --- a/internal/aws/sagemaker/image_version_resource_gen.go +++ b/internal/aws/sagemaker/image_version_resource_gen.go @@ -355,6 +355,7 @@ func imageVersionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -373,7 +374,6 @@ func imageVersionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::ImageVersion").WithTerraformTypeName("awscc_sagemaker_image_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias": "Alias", "aliases": "Aliases", diff --git a/internal/aws/sagemaker/inference_component_resource_gen.go b/internal/aws/sagemaker/inference_component_resource_gen.go index cf3bba917..64f2efaa5 100644 --- a/internal/aws/sagemaker/inference_component_resource_gen.go +++ b/internal/aws/sagemaker/inference_component_resource_gen.go @@ -595,6 +595,7 @@ func inferenceComponentResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -613,7 +614,6 @@ func inferenceComponentResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::SageMaker::InferenceComponent").WithTerraformTypeName("awscc_sagemaker_inference_component") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "artifact_url": "ArtifactUrl", "compute_resource_requirements": "ComputeResourceRequirements", diff --git a/internal/aws/sagemaker/inference_experiment_resource_gen.go b/internal/aws/sagemaker/inference_experiment_resource_gen.go index 3c802b32a..4e1ec3393 100644 --- a/internal/aws/sagemaker/inference_experiment_resource_gen.go +++ b/internal/aws/sagemaker/inference_experiment_resource_gen.go @@ -814,6 +814,7 @@ func inferenceExperimentResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -832,7 +833,6 @@ func inferenceExperimentResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::SageMaker::InferenceExperiment").WithTerraformTypeName("awscc_sagemaker_inference_experiment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "content_type": "ContentType", diff --git a/internal/aws/sagemaker/model_bias_job_definition_resource_gen.go b/internal/aws/sagemaker/model_bias_job_definition_resource_gen.go index 7121164f2..5fa42bfae 100644 --- a/internal/aws/sagemaker/model_bias_job_definition_resource_gen.go +++ b/internal/aws/sagemaker/model_bias_job_definition_resource_gen.go @@ -1287,6 +1287,7 @@ func modelBiasJobDefinitionResource(ctx context.Context) (resource.Resource, err }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1305,7 +1306,6 @@ func modelBiasJobDefinitionResource(ctx context.Context) (resource.Resource, err opts = opts.WithCloudFormationTypeName("AWS::SageMaker::ModelBiasJobDefinition").WithTerraformTypeName("awscc_sagemaker_model_bias_job_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "baselining_job_name": "BaseliningJobName", "batch_transform_input": "BatchTransformInput", diff --git a/internal/aws/sagemaker/model_explainability_job_definition_resource_gen.go b/internal/aws/sagemaker/model_explainability_job_definition_resource_gen.go index 3196cc370..2c31eab02 100644 --- a/internal/aws/sagemaker/model_explainability_job_definition_resource_gen.go +++ b/internal/aws/sagemaker/model_explainability_job_definition_resource_gen.go @@ -1147,6 +1147,7 @@ func modelExplainabilityJobDefinitionResource(ctx context.Context) (resource.Res }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1165,7 +1166,6 @@ func modelExplainabilityJobDefinitionResource(ctx context.Context) (resource.Res opts = opts.WithCloudFormationTypeName("AWS::SageMaker::ModelExplainabilityJobDefinition").WithTerraformTypeName("awscc_sagemaker_model_explainability_job_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "baselining_job_name": "BaseliningJobName", "batch_transform_input": "BatchTransformInput", diff --git a/internal/aws/sagemaker/model_package_group_resource_gen.go b/internal/aws/sagemaker/model_package_group_resource_gen.go index 325f104c3..307b6bcff 100644 --- a/internal/aws/sagemaker/model_package_group_resource_gen.go +++ b/internal/aws/sagemaker/model_package_group_resource_gen.go @@ -204,6 +204,7 @@ func modelPackageGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -222,7 +223,6 @@ func modelPackageGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::ModelPackageGroup").WithTerraformTypeName("awscc_sagemaker_model_package_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "key": "Key", diff --git a/internal/aws/sagemaker/model_package_resource_gen.go b/internal/aws/sagemaker/model_package_resource_gen.go index 69a618f89..e812066b9 100644 --- a/internal/aws/sagemaker/model_package_resource_gen.go +++ b/internal/aws/sagemaker/model_package_resource_gen.go @@ -3706,6 +3706,7 @@ func modelPackageResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -3724,7 +3725,6 @@ func modelPackageResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::ModelPackage").WithTerraformTypeName("awscc_sagemaker_model_package") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accept": "Accept", "additional_inference_specifications": "AdditionalInferenceSpecifications", diff --git a/internal/aws/sagemaker/model_quality_job_definition_resource_gen.go b/internal/aws/sagemaker/model_quality_job_definition_resource_gen.go index e27dde719..1485275ab 100644 --- a/internal/aws/sagemaker/model_quality_job_definition_resource_gen.go +++ b/internal/aws/sagemaker/model_quality_job_definition_resource_gen.go @@ -1349,6 +1349,7 @@ func modelQualityJobDefinitionResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1367,7 +1368,6 @@ func modelQualityJobDefinitionResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::SageMaker::ModelQualityJobDefinition").WithTerraformTypeName("awscc_sagemaker_model_quality_job_definition") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "baselining_job_name": "BaseliningJobName", "batch_transform_input": "BatchTransformInput", diff --git a/internal/aws/sagemaker/monitoring_schedule_resource_gen.go b/internal/aws/sagemaker/monitoring_schedule_resource_gen.go index dd734d64d..a70cdf694 100644 --- a/internal/aws/sagemaker/monitoring_schedule_resource_gen.go +++ b/internal/aws/sagemaker/monitoring_schedule_resource_gen.go @@ -1520,6 +1520,7 @@ func monitoringScheduleResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1538,7 +1539,6 @@ func monitoringScheduleResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::SageMaker::MonitoringSchedule").WithTerraformTypeName("awscc_sagemaker_monitoring_schedule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "baseline_config": "BaselineConfig", "batch_transform_input": "BatchTransformInput", diff --git a/internal/aws/sagemaker/pipeline_resource_gen.go b/internal/aws/sagemaker/pipeline_resource_gen.go index 5cfe0758e..6cb5ec0b0 100644 --- a/internal/aws/sagemaker/pipeline_resource_gen.go +++ b/internal/aws/sagemaker/pipeline_resource_gen.go @@ -279,6 +279,7 @@ func pipelineResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -297,7 +298,6 @@ func pipelineResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Pipeline").WithTerraformTypeName("awscc_sagemaker_pipeline") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket": "Bucket", "e_tag": "ETag", diff --git a/internal/aws/sagemaker/project_resource_gen.go b/internal/aws/sagemaker/project_resource_gen.go index e651f7c16..affc88fe4 100644 --- a/internal/aws/sagemaker/project_resource_gen.go +++ b/internal/aws/sagemaker/project_resource_gen.go @@ -397,6 +397,7 @@ func projectResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -415,7 +416,6 @@ func projectResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Project").WithTerraformTypeName("awscc_sagemaker_project") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "creation_time": "CreationTime", "key": "Key", diff --git a/internal/aws/sagemaker/space_resource_gen.go b/internal/aws/sagemaker/space_resource_gen.go index 40ccc3ca9..20c538f9f 100644 --- a/internal/aws/sagemaker/space_resource_gen.go +++ b/internal/aws/sagemaker/space_resource_gen.go @@ -1416,6 +1416,7 @@ func spaceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1434,7 +1435,6 @@ func spaceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::Space").WithTerraformTypeName("awscc_sagemaker_space") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_image_config_name": "AppImageConfigName", "app_type": "AppType", diff --git a/internal/aws/sagemaker/user_profile_resource_gen.go b/internal/aws/sagemaker/user_profile_resource_gen.go index 3d8aa0d4e..70a3368c6 100644 --- a/internal/aws/sagemaker/user_profile_resource_gen.go +++ b/internal/aws/sagemaker/user_profile_resource_gen.go @@ -1778,6 +1778,7 @@ func userProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1796,7 +1797,6 @@ func userProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SageMaker::UserProfile").WithTerraformTypeName("awscc_sagemaker_user_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_status": "AccessStatus", "app_image_config_name": "AppImageConfigName", diff --git a/internal/aws/scheduler/schedule_group_resource_gen.go b/internal/aws/scheduler/schedule_group_resource_gen.go index 4d5c8a49f..6396bf1ec 100644 --- a/internal/aws/scheduler/schedule_group_resource_gen.go +++ b/internal/aws/scheduler/schedule_group_resource_gen.go @@ -185,6 +185,7 @@ func scheduleGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -203,7 +204,6 @@ func scheduleGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Scheduler::ScheduleGroup").WithTerraformTypeName("awscc_scheduler_schedule_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "creation_date": "CreationDate", diff --git a/internal/aws/secretsmanager/secret_resource_gen.go b/internal/aws/secretsmanager/secret_resource_gen.go index d4a7cb356..6fd995e4d 100644 --- a/internal/aws/secretsmanager/secret_resource_gen.go +++ b/internal/aws/secretsmanager/secret_resource_gen.go @@ -201,7 +201,7 @@ func secretResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "secret_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -362,6 +362,15 @@ func secretResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Creates a new secret. A *secret* can be a password, a set of credentials such as a user name and password, an OAuth token, or other secret information that you store in an encrypted form in Secrets Manager.\n For RDS master user credentials, see [AWS::RDS::DBCluster MasterUserSecret](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbcluster-masterusersecret.html).\n To retrieve a secret in a CFNshort template, use a *dynamic reference*. For more information, see [Retrieve a secret in an resource](https://docs.aws.amazon.com/secretsmanager/latest/userguide/cfn-example_reference-secret.html).\n A common scenario is to first create a secret with ``GenerateSecretString``, which generates a password, and then use a dynamic reference to retrieve the username and password from the secret to use as credentials for a new database. See the example *Creating a Redshift cluster and a secret for the admin credentials*.\n For information about creating a secret in the console, see [Create a secret](https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html). For information about creating a secret using the CLI or SDK, see [CreateSecret](https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_CreateSecret.html).\n For information about retrieving a secret in code, see [Retrieve secrets from Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html).", Version: 1, @@ -372,7 +381,6 @@ func secretResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SecretsManager::Secret").WithTerraformTypeName("awscc_secretsmanager_secret") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "exclude_characters": "ExcludeCharacters", @@ -382,7 +390,6 @@ func secretResource(ctx context.Context) (resource.Resource, error) { "exclude_uppercase": "ExcludeUppercase", "generate_secret_string": "GenerateSecretString", "generate_string_key": "GenerateStringKey", - "id": "Id", "include_space": "IncludeSpace", "key": "Key", "kms_key_id": "KmsKeyId", @@ -391,6 +398,7 @@ func secretResource(ctx context.Context) (resource.Resource, error) { "region": "Region", "replica_regions": "ReplicaRegions", "require_each_included_type": "RequireEachIncludedType", + "secret_id": "Id", "secret_string": "SecretString", "secret_string_template": "SecretStringTemplate", "tags": "Tags", diff --git a/internal/aws/secretsmanager/secret_singular_data_source_gen.go b/internal/aws/secretsmanager/secret_singular_data_source_gen.go index c80fa2ef8..b79cc79b6 100644 --- a/internal/aws/secretsmanager/secret_singular_data_source_gen.go +++ b/internal/aws/secretsmanager/secret_singular_data_source_gen.go @@ -146,7 +146,7 @@ func secretDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "secret_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -299,7 +299,6 @@ func secretDataSource(ctx context.Context) (datasource.DataSource, error) { "exclude_uppercase": "ExcludeUppercase", "generate_secret_string": "GenerateSecretString", "generate_string_key": "GenerateStringKey", - "id": "Id", "include_space": "IncludeSpace", "key": "Key", "kms_key_id": "KmsKeyId", @@ -308,6 +307,7 @@ func secretDataSource(ctx context.Context) (datasource.DataSource, error) { "region": "Region", "replica_regions": "ReplicaRegions", "require_each_included_type": "RequireEachIncludedType", + "secret_id": "Id", "secret_string": "SecretString", "secret_string_template": "SecretStringTemplate", "tags": "Tags", diff --git a/internal/aws/securityhub/hub_resource_gen.go b/internal/aws/securityhub/hub_resource_gen.go index 8ad041b05..b1a924c1a 100644 --- a/internal/aws/securityhub/hub_resource_gen.go +++ b/internal/aws/securityhub/hub_resource_gen.go @@ -137,6 +137,7 @@ func hubResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -155,7 +156,6 @@ func hubResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SecurityHub::Hub").WithTerraformTypeName("awscc_securityhub_hub") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "ARN", "auto_enable_controls": "AutoEnableControls", diff --git a/internal/aws/securityhub/standard_resource_gen.go b/internal/aws/securityhub/standard_resource_gen.go index 54d240abf..cde0268fa 100644 --- a/internal/aws/securityhub/standard_resource_gen.go +++ b/internal/aws/securityhub/standard_resource_gen.go @@ -127,6 +127,7 @@ func standardResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -145,7 +146,6 @@ func standardResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SecurityHub::Standard").WithTerraformTypeName("awscc_securityhub_standard") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "disabled_standards_controls": "DisabledStandardsControls", "reason": "Reason", diff --git a/internal/aws/servicecatalog/cloudformation_provisioned_product_resource_gen.go b/internal/aws/servicecatalog/cloudformation_provisioned_product_resource_gen.go index 0c317ccea..ae4e86ecb 100644 --- a/internal/aws/servicecatalog/cloudformation_provisioned_product_resource_gen.go +++ b/internal/aws/servicecatalog/cloudformation_provisioned_product_resource_gen.go @@ -525,6 +525,7 @@ func cloudFormationProvisionedProductResource(ctx context.Context) (resource.Res }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -543,7 +544,6 @@ func cloudFormationProvisionedProductResource(ctx context.Context) (resource.Res opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalog::CloudFormationProvisionedProduct").WithTerraformTypeName("awscc_servicecatalog_cloudformation_provisioned_product") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "accept_language": "AcceptLanguage", "cloudformation_stack_arn": "CloudformationStackArn", diff --git a/internal/aws/servicecatalog/service_action_association_resource_gen.go b/internal/aws/servicecatalog/service_action_association_resource_gen.go index ca0f51852..dd430352b 100644 --- a/internal/aws/servicecatalog/service_action_association_resource_gen.go +++ b/internal/aws/servicecatalog/service_action_association_resource_gen.go @@ -82,6 +82,7 @@ func serviceActionAssociationResource(ctx context.Context) (resource.Resource, e }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -100,7 +101,6 @@ func serviceActionAssociationResource(ctx context.Context) (resource.Resource, e opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalog::ServiceActionAssociation").WithTerraformTypeName("awscc_servicecatalog_service_action_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "product_id": "ProductId", "provisioning_artifact_id": "ProvisioningArtifactId", diff --git a/internal/aws/servicecatalog/service_action_resource_gen.go b/internal/aws/servicecatalog/service_action_resource_gen.go index d2afbdb63..b22ed8b65 100644 --- a/internal/aws/servicecatalog/service_action_resource_gen.go +++ b/internal/aws/servicecatalog/service_action_resource_gen.go @@ -140,7 +140,7 @@ func serviceActionResource(ctx context.Context) (resource.Resource, error) { // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "service_action_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -162,6 +162,15 @@ func serviceActionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Schema for AWS::ServiceCatalog::ServiceAction", Version: 1, @@ -172,16 +181,15 @@ func serviceActionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalog::ServiceAction").WithTerraformTypeName("awscc_servicecatalog_service_action") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "accept_language": "AcceptLanguage", - "definition": "Definition", - "definition_type": "DefinitionType", - "description": "Description", - "id": "Id", - "key": "Key", - "name": "Name", - "value": "Value", + "accept_language": "AcceptLanguage", + "definition": "Definition", + "definition_type": "DefinitionType", + "description": "Description", + "key": "Key", + "name": "Name", + "service_action_id": "Id", + "value": "Value", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ diff --git a/internal/aws/servicecatalog/service_action_singular_data_source_gen.go b/internal/aws/servicecatalog/service_action_singular_data_source_gen.go index a3e46c06f..d5b37f011 100644 --- a/internal/aws/servicecatalog/service_action_singular_data_source_gen.go +++ b/internal/aws/servicecatalog/service_action_singular_data_source_gen.go @@ -106,7 +106,7 @@ func serviceActionDataSource(ctx context.Context) (datasource.DataSource, error) // "minLength": 1, // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "service_action_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Name @@ -137,14 +137,14 @@ func serviceActionDataSource(ctx context.Context) (datasource.DataSource, error) opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalog::ServiceAction").WithTerraformTypeName("awscc_servicecatalog_service_action") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "accept_language": "AcceptLanguage", - "definition": "Definition", - "definition_type": "DefinitionType", - "description": "Description", - "id": "Id", - "key": "Key", - "name": "Name", - "value": "Value", + "accept_language": "AcceptLanguage", + "definition": "Definition", + "definition_type": "DefinitionType", + "description": "Description", + "key": "Key", + "name": "Name", + "service_action_id": "Id", + "value": "Value", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/servicecatalogappregistry/application_resource_gen.go b/internal/aws/servicecatalogappregistry/application_resource_gen.go index 7a49c1719..99ae582a6 100644 --- a/internal/aws/servicecatalogappregistry/application_resource_gen.go +++ b/internal/aws/servicecatalogappregistry/application_resource_gen.go @@ -117,7 +117,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { // "pattern": "[a-z0-9]{26}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "application_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -165,6 +165,15 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Schema for AWS::ServiceCatalogAppRegistry::Application", Version: 1, @@ -175,14 +184,13 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalogAppRegistry::Application").WithTerraformTypeName("awscc_servicecatalogappregistry_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ + "application_id": "Id", "application_name": "ApplicationName", "application_tag_key": "ApplicationTagKey", "application_tag_value": "ApplicationTagValue", "arn": "Arn", "description": "Description", - "id": "Id", "name": "Name", "tags": "Tags", }) diff --git a/internal/aws/servicecatalogappregistry/application_singular_data_source_gen.go b/internal/aws/servicecatalogappregistry/application_singular_data_source_gen.go index 4b63b8d92..263333b67 100644 --- a/internal/aws/servicecatalogappregistry/application_singular_data_source_gen.go +++ b/internal/aws/servicecatalogappregistry/application_singular_data_source_gen.go @@ -92,7 +92,7 @@ func applicationDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "[a-z0-9]{26}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "application_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Name @@ -144,12 +144,12 @@ func applicationDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalogAppRegistry::Application").WithTerraformTypeName("awscc_servicecatalogappregistry_application") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ + "application_id": "Id", "application_name": "ApplicationName", "application_tag_key": "ApplicationTagKey", "application_tag_value": "ApplicationTagValue", "arn": "Arn", "description": "Description", - "id": "Id", "name": "Name", "tags": "Tags", }) diff --git a/internal/aws/servicecatalogappregistry/attribute_group_association_resource_gen.go b/internal/aws/servicecatalogappregistry/attribute_group_association_resource_gen.go index 1b873be6e..2acc7a118 100644 --- a/internal/aws/servicecatalogappregistry/attribute_group_association_resource_gen.go +++ b/internal/aws/servicecatalogappregistry/attribute_group_association_resource_gen.go @@ -97,6 +97,7 @@ func attributeGroupAssociationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -115,7 +116,6 @@ func attributeGroupAssociationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation").WithTerraformTypeName("awscc_servicecatalogappregistry_attribute_group_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application": "Application", "application_arn": "ApplicationArn", diff --git a/internal/aws/servicecatalogappregistry/attribute_group_resource_gen.go b/internal/aws/servicecatalogappregistry/attribute_group_resource_gen.go index e97233d38..1d58ca9b1 100644 --- a/internal/aws/servicecatalogappregistry/attribute_group_resource_gen.go +++ b/internal/aws/servicecatalogappregistry/attribute_group_resource_gen.go @@ -79,7 +79,7 @@ func attributeGroupResource(ctx context.Context) (resource.Resource, error) { // "pattern": "[a-z0-9]{12}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "attribute_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -127,6 +127,15 @@ func attributeGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Schema for AWS::ServiceCatalogAppRegistry::AttributeGroup.", Version: 1, @@ -137,14 +146,13 @@ func attributeGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalogAppRegistry::AttributeGroup").WithTerraformTypeName("awscc_servicecatalogappregistry_attribute_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "attributes": "Attributes", - "description": "Description", - "id": "Id", - "name": "Name", - "tags": "Tags", + "arn": "Arn", + "attribute_group_id": "Id", + "attributes": "Attributes", + "description": "Description", + "name": "Name", + "tags": "Tags", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/servicecatalogappregistry/attribute_group_singular_data_source_gen.go b/internal/aws/servicecatalogappregistry/attribute_group_singular_data_source_gen.go index d7661a143..b178a4207 100644 --- a/internal/aws/servicecatalogappregistry/attribute_group_singular_data_source_gen.go +++ b/internal/aws/servicecatalogappregistry/attribute_group_singular_data_source_gen.go @@ -63,7 +63,7 @@ func attributeGroupDataSource(ctx context.Context) (datasource.DataSource, error // "pattern": "[a-z0-9]{12}", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "attribute_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Name @@ -115,12 +115,12 @@ func attributeGroupDataSource(ctx context.Context) (datasource.DataSource, error opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalogAppRegistry::AttributeGroup").WithTerraformTypeName("awscc_servicecatalogappregistry_attribute_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "arn": "Arn", - "attributes": "Attributes", - "description": "Description", - "id": "Id", - "name": "Name", - "tags": "Tags", + "arn": "Arn", + "attribute_group_id": "Id", + "attributes": "Attributes", + "description": "Description", + "name": "Name", + "tags": "Tags", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/servicecatalogappregistry/resource_association_resource_gen.go b/internal/aws/servicecatalogappregistry/resource_association_resource_gen.go index 0b10d8280..96f8aefc9 100644 --- a/internal/aws/servicecatalogappregistry/resource_association_resource_gen.go +++ b/internal/aws/servicecatalogappregistry/resource_association_resource_gen.go @@ -116,6 +116,7 @@ func resourceAssociationResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -134,7 +135,6 @@ func resourceAssociationResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::ServiceCatalogAppRegistry::ResourceAssociation").WithTerraformTypeName("awscc_servicecatalogappregistry_resource_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application": "Application", "application_arn": "ApplicationArn", diff --git a/internal/aws/ses/configuration_set_event_destination_resource_gen.go b/internal/aws/ses/configuration_set_event_destination_resource_gen.go index 5336558df..b210b5621 100644 --- a/internal/aws/ses/configuration_set_event_destination_resource_gen.go +++ b/internal/aws/ses/configuration_set_event_destination_resource_gen.go @@ -284,7 +284,7 @@ func configurationSetEventDestinationResource(ctx context.Context) (resource.Res // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "configuration_set_event_destination_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -292,6 +292,15 @@ func configurationSetEventDestinationResource(ctx context.Context) (resource.Res }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::SES::ConfigurationSetEventDestination", Version: 1, @@ -302,24 +311,23 @@ func configurationSetEventDestinationResource(ctx context.Context) (resource.Res opts = opts.WithCloudFormationTypeName("AWS::SES::ConfigurationSetEventDestination").WithTerraformTypeName("awscc_ses_configuration_set_event_destination") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "cloudwatch_destination": "CloudWatchDestination", - "configuration_set_name": "ConfigurationSetName", - "default_dimension_value": "DefaultDimensionValue", - "delivery_stream_arn": "DeliveryStreamARN", - "dimension_configurations": "DimensionConfigurations", - "dimension_name": "DimensionName", - "dimension_value_source": "DimensionValueSource", - "enabled": "Enabled", - "event_destination": "EventDestination", - "iam_role_arn": "IAMRoleARN", - "id": "Id", - "kinesis_firehose_destination": "KinesisFirehoseDestination", - "matching_event_types": "MatchingEventTypes", - "name": "Name", - "sns_destination": "SnsDestination", - "topic_arn": "TopicARN", + "cloudwatch_destination": "CloudWatchDestination", + "configuration_set_event_destination_id": "Id", + "configuration_set_name": "ConfigurationSetName", + "default_dimension_value": "DefaultDimensionValue", + "delivery_stream_arn": "DeliveryStreamARN", + "dimension_configurations": "DimensionConfigurations", + "dimension_name": "DimensionName", + "dimension_value_source": "DimensionValueSource", + "enabled": "Enabled", + "event_destination": "EventDestination", + "iam_role_arn": "IAMRoleARN", + "kinesis_firehose_destination": "KinesisFirehoseDestination", + "matching_event_types": "MatchingEventTypes", + "name": "Name", + "sns_destination": "SnsDestination", + "topic_arn": "TopicARN", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) diff --git a/internal/aws/ses/configuration_set_event_destination_singular_data_source_gen.go b/internal/aws/ses/configuration_set_event_destination_singular_data_source_gen.go index b550305e2..df0fc40f4 100644 --- a/internal/aws/ses/configuration_set_event_destination_singular_data_source_gen.go +++ b/internal/aws/ses/configuration_set_event_destination_singular_data_source_gen.go @@ -230,7 +230,7 @@ func configurationSetEventDestinationDataSource(ctx context.Context) (datasource // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "configuration_set_event_destination_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ @@ -250,22 +250,22 @@ func configurationSetEventDestinationDataSource(ctx context.Context) (datasource opts = opts.WithCloudFormationTypeName("AWS::SES::ConfigurationSetEventDestination").WithTerraformTypeName("awscc_ses_configuration_set_event_destination") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "cloudwatch_destination": "CloudWatchDestination", - "configuration_set_name": "ConfigurationSetName", - "default_dimension_value": "DefaultDimensionValue", - "delivery_stream_arn": "DeliveryStreamARN", - "dimension_configurations": "DimensionConfigurations", - "dimension_name": "DimensionName", - "dimension_value_source": "DimensionValueSource", - "enabled": "Enabled", - "event_destination": "EventDestination", - "iam_role_arn": "IAMRoleARN", - "id": "Id", - "kinesis_firehose_destination": "KinesisFirehoseDestination", - "matching_event_types": "MatchingEventTypes", - "name": "Name", - "sns_destination": "SnsDestination", - "topic_arn": "TopicARN", + "cloudwatch_destination": "CloudWatchDestination", + "configuration_set_event_destination_id": "Id", + "configuration_set_name": "ConfigurationSetName", + "default_dimension_value": "DefaultDimensionValue", + "delivery_stream_arn": "DeliveryStreamARN", + "dimension_configurations": "DimensionConfigurations", + "dimension_name": "DimensionName", + "dimension_value_source": "DimensionValueSource", + "enabled": "Enabled", + "event_destination": "EventDestination", + "iam_role_arn": "IAMRoleARN", + "kinesis_firehose_destination": "KinesisFirehoseDestination", + "matching_event_types": "MatchingEventTypes", + "name": "Name", + "sns_destination": "SnsDestination", + "topic_arn": "TopicARN", }) v, err := generic.NewSingularDataSource(ctx, opts...) diff --git a/internal/aws/ses/configuration_set_resource_gen.go b/internal/aws/ses/configuration_set_resource_gen.go index 51b518d5f..726311ddb 100644 --- a/internal/aws/ses/configuration_set_resource_gen.go +++ b/internal/aws/ses/configuration_set_resource_gen.go @@ -338,6 +338,7 @@ func configurationSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -356,7 +357,6 @@ func configurationSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SES::ConfigurationSet").WithTerraformTypeName("awscc_ses_configuration_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "custom_redirect_domain": "CustomRedirectDomain", "dashboard_options": "DashboardOptions", diff --git a/internal/aws/ses/contact_list_resource_gen.go b/internal/aws/ses/contact_list_resource_gen.go index 13f72b50f..7c48f6e2e 100644 --- a/internal/aws/ses/contact_list_resource_gen.go +++ b/internal/aws/ses/contact_list_resource_gen.go @@ -219,6 +219,7 @@ func contactListResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -237,7 +238,6 @@ func contactListResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SES::ContactList").WithTerraformTypeName("awscc_ses_contact_list") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "contact_list_name": "ContactListName", "default_subscription_status": "DefaultSubscriptionStatus", diff --git a/internal/aws/ses/dedicated_ip_pool_resource_gen.go b/internal/aws/ses/dedicated_ip_pool_resource_gen.go index 8f4183a46..220a29b41 100644 --- a/internal/aws/ses/dedicated_ip_pool_resource_gen.go +++ b/internal/aws/ses/dedicated_ip_pool_resource_gen.go @@ -68,6 +68,7 @@ func dedicatedIpPoolResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -86,7 +87,6 @@ func dedicatedIpPoolResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SES::DedicatedIpPool").WithTerraformTypeName("awscc_ses_dedicated_ip_pool") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "pool_name": "PoolName", "scaling_mode": "ScalingMode", diff --git a/internal/aws/ses/email_identity_resource_gen.go b/internal/aws/ses/email_identity_resource_gen.go index b855f79d2..f45503b58 100644 --- a/internal/aws/ses/email_identity_resource_gen.go +++ b/internal/aws/ses/email_identity_resource_gen.go @@ -331,6 +331,7 @@ func emailIdentityResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -349,7 +350,6 @@ func emailIdentityResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SES::EmailIdentity").WithTerraformTypeName("awscc_ses_email_identity") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "behavior_on_mx_failure": "BehaviorOnMxFailure", "configuration_set_attributes": "ConfigurationSetAttributes", diff --git a/internal/aws/ses/template_resource_gen.go b/internal/aws/ses/template_resource_gen.go index 2c519856b..cba1f6de8 100644 --- a/internal/aws/ses/template_resource_gen.go +++ b/internal/aws/ses/template_resource_gen.go @@ -34,7 +34,7 @@ func templateResource(ctx context.Context) (resource.Resource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "template_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ stringplanmodifier.UseStateForUnknown(), @@ -121,6 +121,15 @@ func templateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::SES::Template", Version: 1, @@ -131,12 +140,11 @@ func templateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SES::Template").WithTerraformTypeName("awscc_ses_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "html_part": "HtmlPart", - "id": "Id", "subject_part": "SubjectPart", "template": "Template", + "template_id": "Id", "template_name": "TemplateName", "text_part": "TextPart", }) diff --git a/internal/aws/ses/template_singular_data_source_gen.go b/internal/aws/ses/template_singular_data_source_gen.go index f2a477561..b805b7201 100644 --- a/internal/aws/ses/template_singular_data_source_gen.go +++ b/internal/aws/ses/template_singular_data_source_gen.go @@ -28,7 +28,7 @@ func templateDataSource(ctx context.Context) (datasource.DataSource, error) { // { // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "template_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Computed: true, }, /*END ATTRIBUTE*/ // Property: Template @@ -107,9 +107,9 @@ func templateDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "html_part": "HtmlPart", - "id": "Id", "subject_part": "SubjectPart", "template": "Template", + "template_id": "Id", "template_name": "TemplateName", "text_part": "TextPart", }) diff --git a/internal/aws/ses/vdm_attributes_resource_gen.go b/internal/aws/ses/vdm_attributes_resource_gen.go index e7daaea56..92eb58795 100644 --- a/internal/aws/ses/vdm_attributes_resource_gen.go +++ b/internal/aws/ses/vdm_attributes_resource_gen.go @@ -118,6 +118,7 @@ func vdmAttributesResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -136,7 +137,6 @@ func vdmAttributesResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SES::VdmAttributes").WithTerraformTypeName("awscc_ses_vdm_attributes") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "dashboard_attributes": "DashboardAttributes", "engagement_metrics": "EngagementMetrics", diff --git a/internal/aws/shield/drt_access_resource_gen.go b/internal/aws/shield/drt_access_resource_gen.go index 9beb63d9d..0b2668c43 100644 --- a/internal/aws/shield/drt_access_resource_gen.go +++ b/internal/aws/shield/drt_access_resource_gen.go @@ -89,6 +89,7 @@ func dRTAccessResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -107,7 +108,6 @@ func dRTAccessResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Shield::DRTAccess").WithTerraformTypeName("awscc_shield_drt_access") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "log_bucket_list": "LogBucketList", diff --git a/internal/aws/shield/proactive_engagement_resource_gen.go b/internal/aws/shield/proactive_engagement_resource_gen.go index befcfdf76..21cbc69fa 100644 --- a/internal/aws/shield/proactive_engagement_resource_gen.go +++ b/internal/aws/shield/proactive_engagement_resource_gen.go @@ -153,6 +153,7 @@ func proactiveEngagementResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -171,7 +172,6 @@ func proactiveEngagementResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::Shield::ProactiveEngagement").WithTerraformTypeName("awscc_shield_proactive_engagement") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "contact_notes": "ContactNotes", diff --git a/internal/aws/shield/protection_group_resource_gen.go b/internal/aws/shield/protection_group_resource_gen.go index 3ca2beefa..fa6882dc8 100644 --- a/internal/aws/shield/protection_group_resource_gen.go +++ b/internal/aws/shield/protection_group_resource_gen.go @@ -240,6 +240,7 @@ func protectionGroupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -258,7 +259,6 @@ func protectionGroupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Shield::ProtectionGroup").WithTerraformTypeName("awscc_shield_protection_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aggregation": "Aggregation", "key": "Key", diff --git a/internal/aws/shield/protection_resource_gen.go b/internal/aws/shield/protection_resource_gen.go index 71b8d6930..c2357f05b 100644 --- a/internal/aws/shield/protection_resource_gen.go +++ b/internal/aws/shield/protection_resource_gen.go @@ -282,6 +282,7 @@ func protectionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -300,7 +301,6 @@ func protectionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Shield::Protection").WithTerraformTypeName("awscc_shield_protection") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "application_layer_automatic_response_configuration": "ApplicationLayerAutomaticResponseConfiguration", diff --git a/internal/aws/signer/profile_permission_resource_gen.go b/internal/aws/signer/profile_permission_resource_gen.go index 580f29e32..b61aabc94 100644 --- a/internal/aws/signer/profile_permission_resource_gen.go +++ b/internal/aws/signer/profile_permission_resource_gen.go @@ -95,6 +95,7 @@ func profilePermissionResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -113,7 +114,6 @@ func profilePermissionResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Signer::ProfilePermission").WithTerraformTypeName("awscc_signer_profile_permission") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "principal": "Principal", diff --git a/internal/aws/signer/signing_profile_resource_gen.go b/internal/aws/signer/signing_profile_resource_gen.go index a640f551d..9d1dd4854 100644 --- a/internal/aws/signer/signing_profile_resource_gen.go +++ b/internal/aws/signer/signing_profile_resource_gen.go @@ -227,6 +227,7 @@ func signingProfileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -245,7 +246,6 @@ func signingProfileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Signer::SigningProfile").WithTerraformTypeName("awscc_signer_signing_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/simspaceweaver/simulation_resource_gen.go b/internal/aws/simspaceweaver/simulation_resource_gen.go index 14b15363f..dfa85de4e 100644 --- a/internal/aws/simspaceweaver/simulation_resource_gen.go +++ b/internal/aws/simspaceweaver/simulation_resource_gen.go @@ -205,6 +205,7 @@ func simulationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -223,7 +224,6 @@ func simulationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SimSpaceWeaver::Simulation").WithTerraformTypeName("awscc_simspaceweaver_simulation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bucket_name": "BucketName", "describe_payload": "DescribePayload", diff --git a/internal/aws/sns/topic_inline_policy_resource_gen.go b/internal/aws/sns/topic_inline_policy_resource_gen.go index 7adc6ed07..901e17a61 100644 --- a/internal/aws/sns/topic_inline_policy_resource_gen.go +++ b/internal/aws/sns/topic_inline_policy_resource_gen.go @@ -53,6 +53,7 @@ func topicInlinePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -71,7 +72,6 @@ func topicInlinePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SNS::TopicInlinePolicy").WithTerraformTypeName("awscc_sns_topic_inline_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy_document": "PolicyDocument", "topic_arn": "TopicArn", diff --git a/internal/aws/sns/topic_plural_data_source_gen.go b/internal/aws/sns/topic_plural_data_source_gen.go new file mode 100644 index 000000000..dd97bf792 --- /dev/null +++ b/internal/aws/sns/topic_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package sns + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_sns_topics", topicsDataSource) +} + +// topicsDataSource returns the Terraform awscc_sns_topics data source. +// This Terraform data source corresponds to the CloudFormation AWS::SNS::Topic resource. +func topicsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::SNS::Topic", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::SNS::Topic").WithTerraformTypeName("awscc_sns_topics") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/sns/topic_plural_data_source_gen_test.go b/internal/aws/sns/topic_plural_data_source_gen_test.go new file mode 100644 index 000000000..9d9406fa7 --- /dev/null +++ b/internal/aws/sns/topic_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package sns_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSNSTopicsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::SNS::Topic", "awscc_sns_topics", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/sns/topic_policy_resource_gen.go b/internal/aws/sns/topic_policy_resource_gen.go index a9afb4d42..ef9d9e6e7 100644 --- a/internal/aws/sns/topic_policy_resource_gen.go +++ b/internal/aws/sns/topic_policy_resource_gen.go @@ -32,7 +32,7 @@ func topicPolicyResource(ctx context.Context) (resource.Resource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "topic_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -72,6 +72,15 @@ func topicPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "The ``AWS::SNS::TopicPolicy`` resource associates SNS topics with a policy. For an example snippet, see [Declaring an policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-iam.html#scenario-sns-policy) in the *User Guide*.", Version: 1, @@ -82,10 +91,9 @@ func topicPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SNS::TopicPolicy").WithTerraformTypeName("awscc_sns_topic_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", "policy_document": "PolicyDocument", + "topic_policy_id": "Id", "topics": "Topics", }) diff --git a/internal/aws/sns/topic_policy_singular_data_source_gen.go b/internal/aws/sns/topic_policy_singular_data_source_gen.go index 78848cf34..2abf8637e 100644 --- a/internal/aws/sns/topic_policy_singular_data_source_gen.go +++ b/internal/aws/sns/topic_policy_singular_data_source_gen.go @@ -30,7 +30,7 @@ func topicPolicyDataSource(ctx context.Context) (datasource.DataSource, error) { // "description": "", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "topic_policy_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "", Computed: true, }, /*END ATTRIBUTE*/ @@ -79,8 +79,8 @@ func topicPolicyDataSource(ctx context.Context) (datasource.DataSource, error) { opts = opts.WithCloudFormationTypeName("AWS::SNS::TopicPolicy").WithTerraformTypeName("awscc_sns_topic_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ - "id": "Id", "policy_document": "PolicyDocument", + "topic_policy_id": "Id", "topics": "Topics", }) diff --git a/internal/aws/sns/topic_resource_gen.go b/internal/aws/sns/topic_resource_gen.go new file mode 100644 index 000000000..c7360a5b3 --- /dev/null +++ b/internal/aws/sns/topic_resource_gen.go @@ -0,0 +1,438 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package sns + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_sns_topic", topicResource) +} + +// topicResource returns the Terraform awscc_sns_topic resource. +// This Terraform resource corresponds to the CloudFormation AWS::SNS::Topic resource. +func topicResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ArchivePolicy + // CloudFormation resource type schema: + // + // { + // "description": "The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.", + // "type": "object" + // } + "archive_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Description: "The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ContentBasedDeduplication + // CloudFormation resource type schema: + // + // { + // "description": "Enables content-based deduplication for FIFO topics.\n + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action. \n + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message).\n (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.", + // "type": "boolean" + // } + "content_based_deduplication": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Enables content-based deduplication for FIFO topics.\n + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action. \n + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message).\n (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DataProtectionPolicy + // CloudFormation resource type schema: + // + // { + // "description": "The body of the policy document you want to use for this topic.\n You can only add one policy per topic.\n The policy must be in JSON string format.\n Length Constraints: Maximum length of 30,720.", + // "type": "object" + // } + "data_protection_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Description: "The body of the policy document you want to use for this topic.\n You can only add one policy per topic.\n The policy must be in JSON string format.\n Length Constraints: Maximum length of 30,720.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DeliveryStatusLogging + // CloudFormation resource type schema: + // + // { + // "description": "", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "", + // "properties": { + // "FailureFeedbackRoleArn": { + // "description": "", + // "type": "string" + // }, + // "Protocol": { + // "description": "", + // "enum": [ + // "http/s", + // "sqs", + // "lambda", + // "firehose", + // "application" + // ], + // "type": "string" + // }, + // "SuccessFeedbackRoleArn": { + // "description": "", + // "type": "string" + // }, + // "SuccessFeedbackSampleRate": { + // "description": "", + // "type": "string" + // } + // }, + // "required": [ + // "Protocol" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "delivery_status_logging": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FailureFeedbackRoleArn + "failure_feedback_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "http/s", + "sqs", + "lambda", + "firehose", + "application", + ), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: SuccessFeedbackRoleArn + "success_feedback_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SuccessFeedbackSampleRate + "success_feedback_sample_rate": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DisplayName + // CloudFormation resource type schema: + // + // { + // "description": "The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.", + // "type": "string" + // } + "display_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: FifoTopic + // CloudFormation resource type schema: + // + // { + // "description": "Set to true to create a FIFO topic.", + // "type": "boolean" + // } + "fifo_topic": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Set to true to create a FIFO topic.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + boolplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: KmsMasterKeyId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*.\n This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).", + // "type": "string" + // } + "kms_master_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*.\n This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SignatureVersion + // CloudFormation resource type schema: + // + // { + // "description": "The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.", + // "type": "string" + // } + "signature_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Subscription + // CloudFormation resource type schema: + // + // { + // "description": "The SNS subscriptions (endpoints) for this topic.\n If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "``Subscription`` is an embedded property that describes the subscription endpoints of an SNS topic.\n For full control over subscription behavior (for example, delivery policy, filtering, raw message delivery, and cross-region subscriptions), use the [AWS::SNS::Subscription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html) resource.", + // "properties": { + // "Endpoint": { + // "description": "The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the ``Endpoint`` parameter of the ``Subscribe`` action in the *API Reference*.", + // "type": "string" + // }, + // "Protocol": { + // "description": "The subscription's protocol. For more information, see the ``Protocol`` parameter of the ``Subscribe`` action in the *API Reference*.", + // "type": "string" + // } + // }, + // "required": [ + // "Endpoint", + // "Protocol" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "subscription": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Endpoint + "endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the ``Endpoint`` parameter of the ``Subscribe`` action in the *API Reference*.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The subscription's protocol. For more information, see the ``Protocol`` parameter of the ``Subscribe`` action in the *API Reference*.", + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The SNS subscriptions (endpoints) for this topic.\n If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "The list of tags to add to a new topic.\n To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "The list of tags to be added to the specified topic.", + // "properties": { + // "Key": { + // "description": "The required key portion of the tag.", + // "type": "string" + // }, + // "Value": { + // "description": "The optional value portion of the tag.", + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The required key portion of the tag.", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The optional value portion of the tag.", + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The list of tags to add to a new topic.\n To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TopicArn + // CloudFormation resource type schema: + // + // { + // "description": "", + // "type": "string" + // } + "topic_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TopicName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``.\n If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).\n If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.", + // "type": "string" + // } + "topic_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``.\n If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).\n If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TracingConfig + // CloudFormation resource type schema: + // + // { + // "description": "Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.", + // "type": "string" + // } + "tracing_config": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "The ``AWS::SNS::Topic`` resource creates a topic to which notifications can be published.\n One account can create a maximum of 100,000 standard topics and 1,000 FIFO topics. For more information, see [endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/sns.html) in the *General Reference*.\n The structure of ``AUTHPARAMS`` depends on the .signature of the API request. For more information, see [Examples of the complete Signature Version 4 signing process](https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html) in the *General Reference*.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::SNS::Topic").WithTerraformTypeName("awscc_sns_topic") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "archive_policy": "ArchivePolicy", + "content_based_deduplication": "ContentBasedDeduplication", + "data_protection_policy": "DataProtectionPolicy", + "delivery_status_logging": "DeliveryStatusLogging", + "display_name": "DisplayName", + "endpoint": "Endpoint", + "failure_feedback_role_arn": "FailureFeedbackRoleArn", + "fifo_topic": "FifoTopic", + "key": "Key", + "kms_master_key_id": "KmsMasterKeyId", + "protocol": "Protocol", + "signature_version": "SignatureVersion", + "subscription": "Subscription", + "success_feedback_role_arn": "SuccessFeedbackRoleArn", + "success_feedback_sample_rate": "SuccessFeedbackSampleRate", + "tags": "Tags", + "topic_arn": "TopicArn", + "topic_name": "TopicName", + "tracing_config": "TracingConfig", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/sns/topic_resource_gen_test.go b/internal/aws/sns/topic_resource_gen_test.go new file mode 100644 index 000000000..cecb10493 --- /dev/null +++ b/internal/aws/sns/topic_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package sns_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSNSTopic_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::SNS::Topic", "awscc_sns_topic", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSSNSTopic_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::SNS::Topic", "awscc_sns_topic", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/sns/topic_singular_data_source_gen.go b/internal/aws/sns/topic_singular_data_source_gen.go new file mode 100644 index 000000000..532b0bb10 --- /dev/null +++ b/internal/aws/sns/topic_singular_data_source_gen.go @@ -0,0 +1,346 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package sns + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes" + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_sns_topic", topicDataSource) +} + +// topicDataSource returns the Terraform awscc_sns_topic data source. +// This Terraform data source corresponds to the CloudFormation AWS::SNS::Topic resource. +func topicDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ArchivePolicy + // CloudFormation resource type schema: + // + // { + // "description": "The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.", + // "type": "object" + // } + "archive_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Description: "The archive policy determines the number of days SNS retains messages. You can set a retention period from 1 to 365 days.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ContentBasedDeduplication + // CloudFormation resource type schema: + // + // { + // "description": "Enables content-based deduplication for FIFO topics.\n + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action. \n + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message).\n (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.", + // "type": "boolean" + // } + "content_based_deduplication": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Enables content-based deduplication for FIFO topics.\n + By default, ``ContentBasedDeduplication`` is set to ``false``. If you create a FIFO topic and this attribute is ``false``, you must specify a value for the ``MessageDeduplicationId`` parameter for the [Publish](https://docs.aws.amazon.com/sns/latest/api/API_Publish.html) action. \n + When you set ``ContentBasedDeduplication`` to ``true``, SNS uses a SHA-256 hash to generate the ``MessageDeduplicationId`` using the body of the message (but not the attributes of the message).\n (Optional) To override the generated value, you can specify a value for the the ``MessageDeduplicationId`` parameter for the ``Publish`` action.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DataProtectionPolicy + // CloudFormation resource type schema: + // + // { + // "description": "The body of the policy document you want to use for this topic.\n You can only add one policy per topic.\n The policy must be in JSON string format.\n Length Constraints: Maximum length of 30,720.", + // "type": "object" + // } + "data_protection_policy": schema.StringAttribute{ /*START ATTRIBUTE*/ + CustomType: jsontypes.NormalizedType{}, + Description: "The body of the policy document you want to use for this topic.\n You can only add one policy per topic.\n The policy must be in JSON string format.\n Length Constraints: Maximum length of 30,720.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeliveryStatusLogging + // CloudFormation resource type schema: + // + // { + // "description": "", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "", + // "properties": { + // "FailureFeedbackRoleArn": { + // "description": "", + // "type": "string" + // }, + // "Protocol": { + // "description": "", + // "enum": [ + // "http/s", + // "sqs", + // "lambda", + // "firehose", + // "application" + // ], + // "type": "string" + // }, + // "SuccessFeedbackRoleArn": { + // "description": "", + // "type": "string" + // }, + // "SuccessFeedbackSampleRate": { + // "description": "", + // "type": "string" + // } + // }, + // "required": [ + // "Protocol" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": true + // } + "delivery_status_logging": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FailureFeedbackRoleArn + "failure_feedback_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SuccessFeedbackRoleArn + "success_feedback_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SuccessFeedbackSampleRate + "success_feedback_sample_rate": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DisplayName + // CloudFormation resource type schema: + // + // { + // "description": "The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.", + // "type": "string" + // } + "display_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The display name to use for an SNS topic with SMS subscriptions. The display name must be maximum 100 characters long, including hyphens (-), underscores (_), spaces, and tabs.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: FifoTopic + // CloudFormation resource type schema: + // + // { + // "description": "Set to true to create a FIFO topic.", + // "type": "boolean" + // } + "fifo_topic": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Set to true to create a FIFO topic.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KmsMasterKeyId + // CloudFormation resource type schema: + // + // { + // "description": "The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*.\n This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).", + // "type": "string" + // } + "kms_master_key_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The ID of an AWS managed customer master key (CMK) for SNS or a custom CMK. For more information, see [Key terms](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html#sse-key-terms). For more examples, see ``KeyId`` in the *API Reference*.\n This property applies only to [server-side-encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html).", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SignatureVersion + // CloudFormation resource type schema: + // + // { + // "description": "The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.", + // "type": "string" + // } + "signature_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS. By default, ``SignatureVersion`` is set to ``1``.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Subscription + // CloudFormation resource type schema: + // + // { + // "description": "The SNS subscriptions (endpoints) for this topic.\n If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "``Subscription`` is an embedded property that describes the subscription endpoints of an SNS topic.\n For full control over subscription behavior (for example, delivery policy, filtering, raw message delivery, and cross-region subscriptions), use the [AWS::SNS::Subscription](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-subscription.html) resource.", + // "properties": { + // "Endpoint": { + // "description": "The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the ``Endpoint`` parameter of the ``Subscribe`` action in the *API Reference*.", + // "type": "string" + // }, + // "Protocol": { + // "description": "The subscription's protocol. For more information, see the ``Protocol`` parameter of the ``Subscribe`` action in the *API Reference*.", + // "type": "string" + // } + // }, + // "required": [ + // "Endpoint", + // "Protocol" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "subscription": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Endpoint + "endpoint": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The endpoint that receives notifications from the SNS topic. The endpoint value depends on the protocol that you specify. For more information, see the ``Endpoint`` parameter of the ``Subscribe`` action in the *API Reference*.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The subscription's protocol. For more information, see the ``Protocol`` parameter of the ``Subscribe`` action in the *API Reference*.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The SNS subscriptions (endpoints) for this topic.\n If you specify the ``Subscription`` property in the ``AWS::SNS::Topic`` resource and it creates an associated subscription resource, the associated subscription is not deleted when the ``AWS::SNS::Topic`` resource is deleted.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "description": "The list of tags to add to a new topic.\n To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.", + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "description": "The list of tags to be added to the specified topic.", + // "properties": { + // "Key": { + // "description": "The required key portion of the tag.", + // "type": "string" + // }, + // "Value": { + // "description": "The optional value portion of the tag.", + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The required key portion of the tag.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The optional value portion of the tag.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "The list of tags to add to a new topic.\n To be able to tag a topic on creation, you must have the ``sns:CreateTopic`` and ``sns:TagResource`` permissions.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TopicArn + // CloudFormation resource type schema: + // + // { + // "description": "", + // "type": "string" + // } + "topic_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TopicName + // CloudFormation resource type schema: + // + // { + // "description": "The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``.\n If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).\n If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.", + // "type": "string" + // } + "topic_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The name of the topic you want to create. Topic names must include only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. FIFO topic names must end with ``.fifo``.\n If you don't specify a name, CFN generates a unique physical ID and uses that ID for the topic name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).\n If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TracingConfig + // CloudFormation resource type schema: + // + // { + // "description": "Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.", + // "type": "string" + // } + "tracing_config": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Tracing mode of an SNS topic. By default ``TracingConfig`` is set to ``PassThrough``, and the topic passes through the tracing header it receives from an SNS publisher to its subscriptions. If set to ``Active``, SNS will vend X-Ray segment data to topic owner account if the sampled flag in the tracing header is true.", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::SNS::Topic", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::SNS::Topic").WithTerraformTypeName("awscc_sns_topic") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "archive_policy": "ArchivePolicy", + "content_based_deduplication": "ContentBasedDeduplication", + "data_protection_policy": "DataProtectionPolicy", + "delivery_status_logging": "DeliveryStatusLogging", + "display_name": "DisplayName", + "endpoint": "Endpoint", + "failure_feedback_role_arn": "FailureFeedbackRoleArn", + "fifo_topic": "FifoTopic", + "key": "Key", + "kms_master_key_id": "KmsMasterKeyId", + "protocol": "Protocol", + "signature_version": "SignatureVersion", + "subscription": "Subscription", + "success_feedback_role_arn": "SuccessFeedbackRoleArn", + "success_feedback_sample_rate": "SuccessFeedbackSampleRate", + "tags": "Tags", + "topic_arn": "TopicArn", + "topic_name": "TopicName", + "tracing_config": "TracingConfig", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/sns/topic_singular_data_source_gen_test.go b/internal/aws/sns/topic_singular_data_source_gen_test.go new file mode 100644 index 000000000..27baaa2ae --- /dev/null +++ b/internal/aws/sns/topic_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package sns_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSNSTopicDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::SNS::Topic", "awscc_sns_topic", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSSNSTopicDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::SNS::Topic", "awscc_sns_topic", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/sqs/queue_inline_policy_resource_gen.go b/internal/aws/sqs/queue_inline_policy_resource_gen.go index 94a857488..1427ab6d4 100644 --- a/internal/aws/sqs/queue_inline_policy_resource_gen.go +++ b/internal/aws/sqs/queue_inline_policy_resource_gen.go @@ -53,6 +53,7 @@ func queueInlinePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -71,7 +72,6 @@ func queueInlinePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SQS::QueueInlinePolicy").WithTerraformTypeName("awscc_sqs_queue_inline_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy_document": "PolicyDocument", "queue": "Queue", diff --git a/internal/aws/sqs/queue_resource_gen.go b/internal/aws/sqs/queue_resource_gen.go index 4cd3d23e7..2f2861500 100644 --- a/internal/aws/sqs/queue_resource_gen.go +++ b/internal/aws/sqs/queue_resource_gen.go @@ -335,6 +335,7 @@ func queueResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -353,7 +354,6 @@ func queueResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SQS::Queue").WithTerraformTypeName("awscc_sqs_queue") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "content_based_deduplication": "ContentBasedDeduplication", diff --git a/internal/aws/ssm/association_resource_gen.go b/internal/aws/ssm/association_resource_gen.go index 5c8392145..f8deb882c 100644 --- a/internal/aws/ssm/association_resource_gen.go +++ b/internal/aws/ssm/association_resource_gen.go @@ -522,6 +522,7 @@ func associationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -540,7 +541,6 @@ func associationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSM::Association").WithTerraformTypeName("awscc_ssm_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "apply_only_at_cron_interval": "ApplyOnlyAtCronInterval", "association_id": "AssociationId", diff --git a/internal/aws/ssm/document_resource_gen.go b/internal/aws/ssm/document_resource_gen.go index eab22bc8d..e4ce05f7b 100644 --- a/internal/aws/ssm/document_resource_gen.go +++ b/internal/aws/ssm/document_resource_gen.go @@ -453,6 +453,7 @@ func documentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -471,7 +472,6 @@ func documentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSM::Document").WithTerraformTypeName("awscc_ssm_document") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attachments": "Attachments", "content": "Content", diff --git a/internal/aws/ssm/parameter_resource_gen.go b/internal/aws/ssm/parameter_resource_gen.go index 3c1e34480..f7b728ee3 100644 --- a/internal/aws/ssm/parameter_resource_gen.go +++ b/internal/aws/ssm/parameter_resource_gen.go @@ -203,6 +203,7 @@ func parameterResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -221,7 +222,6 @@ func parameterResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSM::Parameter").WithTerraformTypeName("awscc_ssm_parameter") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "allowed_pattern": "AllowedPattern", "data_type": "DataType", diff --git a/internal/aws/ssm/patch_baseline_resource_gen.go b/internal/aws/ssm/patch_baseline_resource_gen.go index 22c51267b..d3cda24ea 100644 --- a/internal/aws/ssm/patch_baseline_resource_gen.go +++ b/internal/aws/ssm/patch_baseline_resource_gen.go @@ -545,7 +545,7 @@ func patchBaselineResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[a-zA-Z0-9_\\-:/]{20,128}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "patch_baseline_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the patch baseline.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -861,6 +861,15 @@ func patchBaselineResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource Type definition for AWS::SSM::PatchBaseline", Version: 1, @@ -871,7 +880,6 @@ func patchBaselineResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSM::PatchBaseline").WithTerraformTypeName("awscc_ssm_patch_baseline") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "approval_rules": "ApprovalRules", "approve_after_days": "ApproveAfterDays", @@ -885,10 +893,10 @@ func patchBaselineResource(ctx context.Context) (resource.Resource, error) { "description": "Description", "enable_non_security": "EnableNonSecurity", "global_filters": "GlobalFilters", - "id": "Id", "key": "Key", "name": "Name", "operating_system": "OperatingSystem", + "patch_baseline_id": "Id", "patch_filter_group": "PatchFilterGroup", "patch_filters": "PatchFilters", "patch_groups": "PatchGroups", diff --git a/internal/aws/ssm/patch_baseline_singular_data_source_gen.go b/internal/aws/ssm/patch_baseline_singular_data_source_gen.go index ff2875d71..06c709678 100644 --- a/internal/aws/ssm/patch_baseline_singular_data_source_gen.go +++ b/internal/aws/ssm/patch_baseline_singular_data_source_gen.go @@ -351,7 +351,7 @@ func patchBaselineDataSource(ctx context.Context) (datasource.DataSource, error) // "pattern": "^[a-zA-Z0-9_\\-:/]{20,128}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "patch_baseline_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "The ID of the patch baseline.", Computed: true, }, /*END ATTRIBUTE*/ @@ -587,10 +587,10 @@ func patchBaselineDataSource(ctx context.Context) (datasource.DataSource, error) "description": "Description", "enable_non_security": "EnableNonSecurity", "global_filters": "GlobalFilters", - "id": "Id", "key": "Key", "name": "Name", "operating_system": "OperatingSystem", + "patch_baseline_id": "Id", "patch_filter_group": "PatchFilterGroup", "patch_filters": "PatchFilters", "patch_groups": "PatchGroups", diff --git a/internal/aws/ssm/resource_data_sync_resource_gen.go b/internal/aws/ssm/resource_data_sync_resource_gen.go index 96b5edf61..e4e2ccf79 100644 --- a/internal/aws/ssm/resource_data_sync_resource_gen.go +++ b/internal/aws/ssm/resource_data_sync_resource_gen.go @@ -359,6 +359,7 @@ func resourceDataSyncResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -377,7 +378,6 @@ func resourceDataSyncResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSM::ResourceDataSync").WithTerraformTypeName("awscc_ssm_resource_data_sync") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "aws_organizations_source": "AwsOrganizationsSource", "bucket_name": "BucketName", diff --git a/internal/aws/ssm/resource_policy_resource_gen.go b/internal/aws/ssm/resource_policy_resource_gen.go index 6a5ad367d..9abb42cee 100644 --- a/internal/aws/ssm/resource_policy_resource_gen.go +++ b/internal/aws/ssm/resource_policy_resource_gen.go @@ -79,6 +79,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -97,7 +98,6 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSM::ResourcePolicy").WithTerraformTypeName("awscc_ssm_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy": "Policy", "policy_hash": "PolicyHash", diff --git a/internal/aws/ssmcontacts/contact_channel_resource_gen.go b/internal/aws/ssmcontacts/contact_channel_resource_gen.go index 1cf414234..b29f1cacb 100644 --- a/internal/aws/ssmcontacts/contact_channel_resource_gen.go +++ b/internal/aws/ssmcontacts/contact_channel_resource_gen.go @@ -147,6 +147,7 @@ func contactChannelResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -165,7 +166,6 @@ func contactChannelResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMContacts::ContactChannel").WithTerraformTypeName("awscc_ssmcontacts_contact_channel") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "channel_address": "ChannelAddress", diff --git a/internal/aws/ssmcontacts/contact_resource_gen.go b/internal/aws/ssmcontacts/contact_resource_gen.go index 5c129ed8e..e6453ed5c 100644 --- a/internal/aws/ssmcontacts/contact_resource_gen.go +++ b/internal/aws/ssmcontacts/contact_resource_gen.go @@ -299,6 +299,7 @@ func contactResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -317,7 +318,6 @@ func contactResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMContacts::Contact").WithTerraformTypeName("awscc_ssmcontacts_contact") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias": "Alias", "arn": "Arn", diff --git a/internal/aws/ssmcontacts/plan_resource_gen.go b/internal/aws/ssmcontacts/plan_resource_gen.go index e0c83222c..3342354fa 100644 --- a/internal/aws/ssmcontacts/plan_resource_gen.go +++ b/internal/aws/ssmcontacts/plan_resource_gen.go @@ -246,6 +246,7 @@ func planResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -264,7 +265,6 @@ func planResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMContacts::Plan").WithTerraformTypeName("awscc_ssmcontacts_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "channel_id": "ChannelId", diff --git a/internal/aws/ssmcontacts/rotation_resource_gen.go b/internal/aws/ssmcontacts/rotation_resource_gen.go index 13c409b11..29b1dfb9b 100644 --- a/internal/aws/ssmcontacts/rotation_resource_gen.go +++ b/internal/aws/ssmcontacts/rotation_resource_gen.go @@ -509,6 +509,7 @@ func rotationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -527,7 +528,6 @@ func rotationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMContacts::Rotation").WithTerraformTypeName("awscc_ssmcontacts_rotation") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "contact_ids": "ContactIds", diff --git a/internal/aws/ssmguiconnect/preferences_resource_gen.go b/internal/aws/ssmguiconnect/preferences_resource_gen.go index 3be9807a4..ce3e83943 100644 --- a/internal/aws/ssmguiconnect/preferences_resource_gen.go +++ b/internal/aws/ssmguiconnect/preferences_resource_gen.go @@ -193,6 +193,7 @@ func preferencesResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -211,7 +212,6 @@ func preferencesResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMGuiConnect::Preferences").WithTerraformTypeName("awscc_ssmguiconnect_preferences") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_id": "AccountId", "alert": "Alert", diff --git a/internal/aws/ssmincidents/replication_set_resource_gen.go b/internal/aws/ssmincidents/replication_set_resource_gen.go index cffb40bec..e31c7823c 100644 --- a/internal/aws/ssmincidents/replication_set_resource_gen.go +++ b/internal/aws/ssmincidents/replication_set_resource_gen.go @@ -211,6 +211,7 @@ func replicationSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -229,7 +230,6 @@ func replicationSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMIncidents::ReplicationSet").WithTerraformTypeName("awscc_ssmincidents_replication_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "deletion_protected": "DeletionProtected", diff --git a/internal/aws/ssmincidents/response_plan_resource_gen.go b/internal/aws/ssmincidents/response_plan_resource_gen.go index c03d9ec0f..f2cbf1238 100644 --- a/internal/aws/ssmincidents/response_plan_resource_gen.go +++ b/internal/aws/ssmincidents/response_plan_resource_gen.go @@ -839,6 +839,7 @@ func responsePlanResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -857,7 +858,6 @@ func responsePlanResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSMIncidents::ResponsePlan").WithTerraformTypeName("awscc_ssmincidents_response_plan") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "actions": "Actions", "arn": "Arn", diff --git a/internal/aws/sso/assignment_resource_gen.go b/internal/aws/sso/assignment_resource_gen.go index c10ad3ece..3e6b4f7c8 100644 --- a/internal/aws/sso/assignment_resource_gen.go +++ b/internal/aws/sso/assignment_resource_gen.go @@ -156,6 +156,7 @@ func assignmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -174,7 +175,6 @@ func assignmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSO::Assignment").WithTerraformTypeName("awscc_sso_assignment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "instance_arn": "InstanceArn", "permission_set_arn": "PermissionSetArn", diff --git a/internal/aws/sso/instance_access_control_attribute_configuration_resource_gen.go b/internal/aws/sso/instance_access_control_attribute_configuration_resource_gen.go index 0b43ec28c..36bc90c2c 100644 --- a/internal/aws/sso/instance_access_control_attribute_configuration_resource_gen.go +++ b/internal/aws/sso/instance_access_control_attribute_configuration_resource_gen.go @@ -243,6 +243,7 @@ func instanceAccessControlAttributeConfigurationResource(ctx context.Context) (r }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -261,7 +262,6 @@ func instanceAccessControlAttributeConfigurationResource(ctx context.Context) (r opts = opts.WithCloudFormationTypeName("AWS::SSO::InstanceAccessControlAttributeConfiguration").WithTerraformTypeName("awscc_sso_instance_access_control_attribute_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_control_attributes": "AccessControlAttributes", "instance_access_control_attribute_configuration": "InstanceAccessControlAttributeConfiguration", diff --git a/internal/aws/sso/permission_set_resource_gen.go b/internal/aws/sso/permission_set_resource_gen.go index 0376931d5..f8b3ef812 100644 --- a/internal/aws/sso/permission_set_resource_gen.go +++ b/internal/aws/sso/permission_set_resource_gen.go @@ -417,6 +417,7 @@ func permissionSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -435,7 +436,6 @@ func permissionSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SSO::PermissionSet").WithTerraformTypeName("awscc_sso_permission_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "customer_managed_policy_reference": "CustomerManagedPolicyReference", "customer_managed_policy_references": "CustomerManagedPolicyReferences", diff --git a/internal/aws/stepfunctions/activity_resource_gen.go b/internal/aws/stepfunctions/activity_resource_gen.go index 907f26137..b776ba590 100644 --- a/internal/aws/stepfunctions/activity_resource_gen.go +++ b/internal/aws/stepfunctions/activity_resource_gen.go @@ -114,6 +114,7 @@ func activityResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -132,7 +133,6 @@ func activityResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::StepFunctions::Activity").WithTerraformTypeName("awscc_stepfunctions_activity") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "key": "Key", diff --git a/internal/aws/stepfunctions/state_machine_alias_resource_gen.go b/internal/aws/stepfunctions/state_machine_alias_resource_gen.go index c86ae8682..fd7c0e370 100644 --- a/internal/aws/stepfunctions/state_machine_alias_resource_gen.go +++ b/internal/aws/stepfunctions/state_machine_alias_resource_gen.go @@ -278,6 +278,7 @@ func stateMachineAliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -296,7 +297,6 @@ func stateMachineAliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::StepFunctions::StateMachineAlias").WithTerraformTypeName("awscc_stepfunctions_state_machine_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alarms": "Alarms", "arn": "Arn", diff --git a/internal/aws/stepfunctions/state_machine_resource_gen.go b/internal/aws/stepfunctions/state_machine_resource_gen.go index 0645fe1be..9b8b2fd1d 100644 --- a/internal/aws/stepfunctions/state_machine_resource_gen.go +++ b/internal/aws/stepfunctions/state_machine_resource_gen.go @@ -419,6 +419,7 @@ func stateMachineResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -437,7 +438,6 @@ func stateMachineResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::StepFunctions::StateMachine").WithTerraformTypeName("awscc_stepfunctions_state_machine") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", diff --git a/internal/aws/stepfunctions/state_machine_version_resource_gen.go b/internal/aws/stepfunctions/state_machine_version_resource_gen.go index f52bc1065..d9d9ae0de 100644 --- a/internal/aws/stepfunctions/state_machine_version_resource_gen.go +++ b/internal/aws/stepfunctions/state_machine_version_resource_gen.go @@ -97,6 +97,7 @@ func stateMachineVersionResource(ctx context.Context) (resource.Resource, error) }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -115,7 +116,6 @@ func stateMachineVersionResource(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("AWS::StepFunctions::StateMachineVersion").WithTerraformTypeName("awscc_stepfunctions_state_machine_version") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", diff --git a/internal/aws/supportapp/account_alias_resource_gen.go b/internal/aws/supportapp/account_alias_resource_gen.go index 8fda15da2..21399af79 100644 --- a/internal/aws/supportapp/account_alias_resource_gen.go +++ b/internal/aws/supportapp/account_alias_resource_gen.go @@ -64,6 +64,7 @@ func accountAliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -82,7 +83,6 @@ func accountAliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SupportApp::AccountAlias").WithTerraformTypeName("awscc_supportapp_account_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "account_alias": "AccountAlias", "account_alias_resource_id": "AccountAliasResourceId", diff --git a/internal/aws/supportapp/slack_channel_configuration_resource_gen.go b/internal/aws/supportapp/slack_channel_configuration_resource_gen.go index 8c16caec9..1e50e4cd7 100644 --- a/internal/aws/supportapp/slack_channel_configuration_resource_gen.go +++ b/internal/aws/supportapp/slack_channel_configuration_resource_gen.go @@ -180,6 +180,7 @@ func slackChannelConfigurationResource(ctx context.Context) (resource.Resource, }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -198,7 +199,6 @@ func slackChannelConfigurationResource(ctx context.Context) (resource.Resource, opts = opts.WithCloudFormationTypeName("AWS::SupportApp::SlackChannelConfiguration").WithTerraformTypeName("awscc_supportapp_slack_channel_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "channel_id": "ChannelId", "channel_name": "ChannelName", diff --git a/internal/aws/supportapp/slack_workspace_configuration_resource_gen.go b/internal/aws/supportapp/slack_workspace_configuration_resource_gen.go index a564ee3eb..c04d53d91 100644 --- a/internal/aws/supportapp/slack_workspace_configuration_resource_gen.go +++ b/internal/aws/supportapp/slack_workspace_configuration_resource_gen.go @@ -73,6 +73,7 @@ func slackWorkspaceConfigurationResource(ctx context.Context) (resource.Resource }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -91,7 +92,6 @@ func slackWorkspaceConfigurationResource(ctx context.Context) (resource.Resource opts = opts.WithCloudFormationTypeName("AWS::SupportApp::SlackWorkspaceConfiguration").WithTerraformTypeName("awscc_supportapp_slack_workspace_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "team_id": "TeamId", "version_id": "VersionId", diff --git a/internal/aws/synthetics/canary_plural_data_source_gen.go b/internal/aws/synthetics/canary_plural_data_source_gen.go new file mode 100644 index 000000000..54168f955 --- /dev/null +++ b/internal/aws/synthetics/canary_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package synthetics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_synthetics_canaries", canariesDataSource) +} + +// canariesDataSource returns the Terraform awscc_synthetics_canaries data source. +// This Terraform data source corresponds to the CloudFormation AWS::Synthetics::Canary resource. +func canariesDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::Synthetics::Canary", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Synthetics::Canary").WithTerraformTypeName("awscc_synthetics_canaries") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/synthetics/canary_plural_data_source_gen_test.go b/internal/aws/synthetics/canary_plural_data_source_gen_test.go new file mode 100644 index 000000000..993115a5a --- /dev/null +++ b/internal/aws/synthetics/canary_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package synthetics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSyntheticsCanariesDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Canary", "awscc_synthetics_canaries", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/synthetics/canary_resource_gen.go b/internal/aws/synthetics/canary_resource_gen.go new file mode 100644 index 000000000..8fdd86833 --- /dev/null +++ b/internal/aws/synthetics/canary_resource_gen.go @@ -0,0 +1,745 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package synthetics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/mapplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_synthetics_canary", canaryResource) +} + +// canaryResource returns the Terraform awscc_synthetics_canary resource. +// This Terraform resource corresponds to the CloudFormation AWS::Synthetics::Canary resource. +func canaryResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ArtifactConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide artifact configuration", + // "properties": { + // "S3Encryption": { + // "additionalProperties": false, + // "description": "Encryption configuration for uploading artifacts to S3", + // "properties": { + // "EncryptionMode": { + // "description": "Encryption mode for encrypting artifacts when uploading to S3. Valid values: SSE_S3 and SSE_KMS.", + // "type": "string" + // }, + // "KmsKeyArn": { + // "description": "KMS key Arn for encrypting artifacts when uploading to S3. You must specify KMS key Arn for SSE_KMS encryption mode only.", + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "artifact_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: S3Encryption + "s3_encryption": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EncryptionMode + "encryption_mode": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Encryption mode for encrypting artifacts when uploading to S3. Valid values: SSE_S3 and SSE_KMS.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: KmsKeyArn + "kms_key_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "KMS key Arn for encrypting artifacts when uploading to S3. You must specify KMS key Arn for SSE_KMS encryption mode only.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Encryption configuration for uploading artifacts to S3", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide artifact configuration", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ArtifactS3Location + // CloudFormation resource type schema: + // + // { + // "description": "Provide the s3 bucket output location for test results", + // "pattern": "^(s3|S3)://", + // "type": "string" + // } + "artifact_s3_location": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Provide the s3 bucket output location for test results", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^(s3|S3)://"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Code + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide the canary script source", + // "oneOf": [ + // { + // "required": [ + // "S3Bucket", + // "S3Key" + // ] + // }, + // { + // "required": [ + // "Script" + // ] + // } + // ], + // "properties": { + // "Handler": { + // "type": "string" + // }, + // "S3Bucket": { + // "type": "string" + // }, + // "S3Key": { + // "type": "string" + // }, + // "S3ObjectVersion": { + // "type": "string" + // }, + // "Script": { + // "type": "string" + // }, + // "SourceLocationArn": { + // "type": "string" + // } + // }, + // "required": [ + // "Handler" + // ], + // "type": "object" + // } + "code": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Handler + "handler": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: S3Bucket + "s3_bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // S3Bucket is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: S3Key + "s3_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // S3Key is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: S3ObjectVersion + "s3_object_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // S3ObjectVersion is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Script + "script": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // Script is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: SourceLocationArn + "source_location_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide the canary script source", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: DeleteLambdaResourcesOnCanaryDeletion + // CloudFormation resource type schema: + // + // { + // "description": "Deletes associated lambda resources created by Synthetics if set to True. Default is False", + // "type": "boolean" + // } + "delete_lambda_resources_on_canary_deletion": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Deletes associated lambda resources created by Synthetics if set to True. Default is False", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // DeleteLambdaResourcesOnCanaryDeletion is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ExecutionRoleArn + // CloudFormation resource type schema: + // + // { + // "description": "Lambda Execution role used to run your canaries", + // "type": "string" + // } + "execution_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Lambda Execution role used to run your canaries", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: FailureRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "Retention period of failed canary runs represented in number of days", + // "type": "integer" + // } + "failure_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Retention period of failed canary runs represented in number of days", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "Id of the canary", + // "type": "string" + // } + "canary_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Id of the canary", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "Name of the canary.", + // "pattern": "^[0-9a-z_\\-]{1,21}$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the canary.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^[0-9a-z_\\-]{1,21}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RunConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide canary run configuration", + // "properties": { + // "ActiveTracing": { + // "description": "Enable active tracing if set to true", + // "type": "boolean" + // }, + // "EnvironmentVariables": { + // "additionalProperties": false, + // "description": "Environment variable key-value pairs.", + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "MemoryInMB": { + // "description": "Provide maximum memory available for canary in MB", + // "type": "integer" + // }, + // "TimeoutInSeconds": { + // "description": "Provide maximum canary timeout per run in seconds", + // "type": "integer" + // } + // }, + // "type": "object" + // } + "run_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ActiveTracing + "active_tracing": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Enable active tracing if set to true", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: EnvironmentVariables + "environment_variables": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "Environment variable key-value pairs.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Map{ /*START PLAN MODIFIERS*/ + mapplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // EnvironmentVariables is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: MemoryInMB + "memory_in_mb": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Provide maximum memory available for canary in MB", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: TimeoutInSeconds + "timeout_in_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Provide maximum canary timeout per run in seconds", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide canary run configuration", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: RuntimeVersion + // CloudFormation resource type schema: + // + // { + // "description": "Runtime version of Synthetics Library", + // "type": "string" + // } + "runtime_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Runtime version of Synthetics Library", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Schedule + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Frequency to run your canaries", + // "properties": { + // "DurationInSeconds": { + // "type": "string" + // }, + // "Expression": { + // "type": "string" + // } + // }, + // "required": [ + // "Expression" + // ], + // "type": "object" + // } + "schedule": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DurationInSeconds + "duration_in_seconds": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Expression + "expression": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Frequency to run your canaries", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: StartCanaryAfterCreation + // CloudFormation resource type schema: + // + // { + // "description": "Runs canary if set to True. Default is False", + // "type": "boolean" + // } + "start_canary_after_creation": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Runs canary if set to True. Default is False", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // StartCanaryAfterCreation is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: State + // CloudFormation resource type schema: + // + // { + // "description": "State of the canary", + // "type": "string" + // } + "state": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "State of the canary", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SuccessRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "Retention period of successful canary runs represented in number of days", + // "type": "integer" + // } + "success_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Retention period of successful canary runs represented in number of days", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VPCConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide VPC Configuration if enabled.", + // "properties": { + // "SecurityGroupIds": { + // "items": { + // "type": "string" + // }, + // "type": "array" + // }, + // "SubnetIds": { + // "items": { + // "type": "string" + // }, + // "type": "array" + // }, + // "VpcId": { + // "type": "string" + // } + // }, + // "required": [ + // "SubnetIds", + // "SecurityGroupIds" + // ], + // "type": "object" + // } + "vpc_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SecurityGroupIds + "security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Required: true, + }, /*END ATTRIBUTE*/ + // Property: SubnetIds + "subnet_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Required: true, + }, /*END ATTRIBUTE*/ + // Property: VpcId + "vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide VPC Configuration if enabled.", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VisualReference + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Visual reference configuration for visual testing", + // "properties": { + // "BaseCanaryRunId": { + // "description": "Canary run id to be used as base reference for visual testing", + // "type": "string" + // }, + // "BaseScreenshots": { + // "description": "List of screenshots used as base reference for visual testing", + // "items": { + // "properties": { + // "IgnoreCoordinates": { + // "description": "List of coordinates of rectangles to be ignored during visual testing", + // "items": { + // "description": "Coordinates of a rectangle to be ignored during visual testing", + // "type": "string" + // }, + // "type": "array" + // }, + // "ScreenshotName": { + // "description": "Name of the screenshot to be used as base reference for visual testing", + // "type": "string" + // } + // }, + // "required": [ + // "ScreenshotName" + // ], + // "type": "object" + // }, + // "type": "array" + // } + // }, + // "required": [ + // "BaseCanaryRunId" + // ], + // "type": "object" + // } + "visual_reference": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BaseCanaryRunId + "base_canary_run_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Canary run id to be used as base reference for visual testing", + Required: true, + }, /*END ATTRIBUTE*/ + // Property: BaseScreenshots + "base_screenshots": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: IgnoreCoordinates + "ignore_coordinates": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "List of coordinates of rectangles to be ignored during visual testing", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ScreenshotName + "screenshot_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the screenshot to be used as base reference for visual testing", + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "List of screenshots used as base reference for visual testing", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Visual reference configuration for visual testing", + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + // VisualReference is a write-only property. + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::Synthetics::Canary", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Synthetics::Canary").WithTerraformTypeName("awscc_synthetics_canary") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "active_tracing": "ActiveTracing", + "artifact_config": "ArtifactConfig", + "artifact_s3_location": "ArtifactS3Location", + "base_canary_run_id": "BaseCanaryRunId", + "base_screenshots": "BaseScreenshots", + "canary_id": "Id", + "code": "Code", + "delete_lambda_resources_on_canary_deletion": "DeleteLambdaResourcesOnCanaryDeletion", + "duration_in_seconds": "DurationInSeconds", + "encryption_mode": "EncryptionMode", + "environment_variables": "EnvironmentVariables", + "execution_role_arn": "ExecutionRoleArn", + "expression": "Expression", + "failure_retention_period": "FailureRetentionPeriod", + "handler": "Handler", + "ignore_coordinates": "IgnoreCoordinates", + "key": "Key", + "kms_key_arn": "KmsKeyArn", + "memory_in_mb": "MemoryInMB", + "name": "Name", + "run_config": "RunConfig", + "runtime_version": "RuntimeVersion", + "s3_bucket": "S3Bucket", + "s3_encryption": "S3Encryption", + "s3_key": "S3Key", + "s3_object_version": "S3ObjectVersion", + "schedule": "Schedule", + "screenshot_name": "ScreenshotName", + "script": "Script", + "security_group_ids": "SecurityGroupIds", + "source_location_arn": "SourceLocationArn", + "start_canary_after_creation": "StartCanaryAfterCreation", + "state": "State", + "subnet_ids": "SubnetIds", + "success_retention_period": "SuccessRetentionPeriod", + "tags": "Tags", + "timeout_in_seconds": "TimeoutInSeconds", + "value": "Value", + "visual_reference": "VisualReference", + "vpc_config": "VPCConfig", + "vpc_id": "VpcId", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/Code/S3Bucket", + "/properties/Code/S3Key", + "/properties/Code/S3ObjectVersion", + "/properties/Code/Script", + "/properties/DeleteLambdaResourcesOnCanaryDeletion", + "/properties/StartCanaryAfterCreation", + "/properties/RunConfig/EnvironmentVariables", + "/properties/VisualReference", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/synthetics/canary_resource_gen_test.go b/internal/aws/synthetics/canary_resource_gen_test.go new file mode 100644 index 000000000..7f562a0af --- /dev/null +++ b/internal/aws/synthetics/canary_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package synthetics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSyntheticsCanary_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Canary", "awscc_synthetics_canary", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/synthetics/canary_singular_data_source_gen.go b/internal/aws/synthetics/canary_singular_data_source_gen.go new file mode 100644 index 000000000..874cfed7d --- /dev/null +++ b/internal/aws/synthetics/canary_singular_data_source_gen.go @@ -0,0 +1,588 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package synthetics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_synthetics_canary", canaryDataSource) +} + +// canaryDataSource returns the Terraform awscc_synthetics_canary data source. +// This Terraform data source corresponds to the CloudFormation AWS::Synthetics::Canary resource. +func canaryDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ArtifactConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide artifact configuration", + // "properties": { + // "S3Encryption": { + // "additionalProperties": false, + // "description": "Encryption configuration for uploading artifacts to S3", + // "properties": { + // "EncryptionMode": { + // "description": "Encryption mode for encrypting artifacts when uploading to S3. Valid values: SSE_S3 and SSE_KMS.", + // "type": "string" + // }, + // "KmsKeyArn": { + // "description": "KMS key Arn for encrypting artifacts when uploading to S3. You must specify KMS key Arn for SSE_KMS encryption mode only.", + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "type": "object" + // } + "artifact_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: S3Encryption + "s3_encryption": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: EncryptionMode + "encryption_mode": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Encryption mode for encrypting artifacts when uploading to S3. Valid values: SSE_S3 and SSE_KMS.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: KmsKeyArn + "kms_key_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "KMS key Arn for encrypting artifacts when uploading to S3. You must specify KMS key Arn for SSE_KMS encryption mode only.", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Encryption configuration for uploading artifacts to S3", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide artifact configuration", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ArtifactS3Location + // CloudFormation resource type schema: + // + // { + // "description": "Provide the s3 bucket output location for test results", + // "pattern": "^(s3|S3)://", + // "type": "string" + // } + "artifact_s3_location": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Provide the s3 bucket output location for test results", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Code + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide the canary script source", + // "oneOf": [ + // { + // "required": [ + // "S3Bucket", + // "S3Key" + // ] + // }, + // { + // "required": [ + // "Script" + // ] + // } + // ], + // "properties": { + // "Handler": { + // "type": "string" + // }, + // "S3Bucket": { + // "type": "string" + // }, + // "S3Key": { + // "type": "string" + // }, + // "S3ObjectVersion": { + // "type": "string" + // }, + // "Script": { + // "type": "string" + // }, + // "SourceLocationArn": { + // "type": "string" + // } + // }, + // "required": [ + // "Handler" + // ], + // "type": "object" + // } + "code": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Handler + "handler": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3Bucket + "s3_bucket": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3Key + "s3_key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: S3ObjectVersion + "s3_object_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Script + "script": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SourceLocationArn + "source_location_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide the canary script source", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DeleteLambdaResourcesOnCanaryDeletion + // CloudFormation resource type schema: + // + // { + // "description": "Deletes associated lambda resources created by Synthetics if set to True. Default is False", + // "type": "boolean" + // } + "delete_lambda_resources_on_canary_deletion": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Deletes associated lambda resources created by Synthetics if set to True. Default is False", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ExecutionRoleArn + // CloudFormation resource type schema: + // + // { + // "description": "Lambda Execution role used to run your canaries", + // "type": "string" + // } + "execution_role_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Lambda Execution role used to run your canaries", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: FailureRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "Retention period of failed canary runs represented in number of days", + // "type": "integer" + // } + "failure_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Retention period of failed canary runs represented in number of days", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "Id of the canary", + // "type": "string" + // } + "canary_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Id of the canary", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "Name of the canary.", + // "pattern": "^[0-9a-z_\\-]{1,21}$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the canary.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RunConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide canary run configuration", + // "properties": { + // "ActiveTracing": { + // "description": "Enable active tracing if set to true", + // "type": "boolean" + // }, + // "EnvironmentVariables": { + // "additionalProperties": false, + // "description": "Environment variable key-value pairs.", + // "patternProperties": { + // "": { + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "MemoryInMB": { + // "description": "Provide maximum memory available for canary in MB", + // "type": "integer" + // }, + // "TimeoutInSeconds": { + // "description": "Provide maximum canary timeout per run in seconds", + // "type": "integer" + // } + // }, + // "type": "object" + // } + "run_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: ActiveTracing + "active_tracing": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Enable active tracing if set to true", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: EnvironmentVariables + "environment_variables": // Pattern: "" + schema.MapAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "Environment variable key-value pairs.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: MemoryInMB + "memory_in_mb": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Provide maximum memory available for canary in MB", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: TimeoutInSeconds + "timeout_in_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Provide maximum canary timeout per run in seconds", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide canary run configuration", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: RuntimeVersion + // CloudFormation resource type schema: + // + // { + // "description": "Runtime version of Synthetics Library", + // "type": "string" + // } + "runtime_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Runtime version of Synthetics Library", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Schedule + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Frequency to run your canaries", + // "properties": { + // "DurationInSeconds": { + // "type": "string" + // }, + // "Expression": { + // "type": "string" + // } + // }, + // "required": [ + // "Expression" + // ], + // "type": "object" + // } + "schedule": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DurationInSeconds + "duration_in_seconds": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Expression + "expression": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Frequency to run your canaries", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: StartCanaryAfterCreation + // CloudFormation resource type schema: + // + // { + // "description": "Runs canary if set to True. Default is False", + // "type": "boolean" + // } + "start_canary_after_creation": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Description: "Runs canary if set to True. Default is False", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: State + // CloudFormation resource type schema: + // + // { + // "description": "State of the canary", + // "type": "string" + // } + "state": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "State of the canary", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SuccessRetentionPeriod + // CloudFormation resource type schema: + // + // { + // "description": "Retention period of successful canary runs represented in number of days", + // "type": "integer" + // } + "success_retention_period": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Description: "Retention period of successful canary runs represented in number of days", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 0, + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VPCConfig + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Provide VPC Configuration if enabled.", + // "properties": { + // "SecurityGroupIds": { + // "items": { + // "type": "string" + // }, + // "type": "array" + // }, + // "SubnetIds": { + // "items": { + // "type": "string" + // }, + // "type": "array" + // }, + // "VpcId": { + // "type": "string" + // } + // }, + // "required": [ + // "SubnetIds", + // "SecurityGroupIds" + // ], + // "type": "object" + // } + "vpc_config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: SecurityGroupIds + "security_group_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SubnetIds + "subnet_ids": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VpcId + "vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Provide VPC Configuration if enabled.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VisualReference + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "description": "Visual reference configuration for visual testing", + // "properties": { + // "BaseCanaryRunId": { + // "description": "Canary run id to be used as base reference for visual testing", + // "type": "string" + // }, + // "BaseScreenshots": { + // "description": "List of screenshots used as base reference for visual testing", + // "items": { + // "properties": { + // "IgnoreCoordinates": { + // "description": "List of coordinates of rectangles to be ignored during visual testing", + // "items": { + // "description": "Coordinates of a rectangle to be ignored during visual testing", + // "type": "string" + // }, + // "type": "array" + // }, + // "ScreenshotName": { + // "description": "Name of the screenshot to be used as base reference for visual testing", + // "type": "string" + // } + // }, + // "required": [ + // "ScreenshotName" + // ], + // "type": "object" + // }, + // "type": "array" + // } + // }, + // "required": [ + // "BaseCanaryRunId" + // ], + // "type": "object" + // } + "visual_reference": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: BaseCanaryRunId + "base_canary_run_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Canary run id to be used as base reference for visual testing", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: BaseScreenshots + "base_screenshots": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: IgnoreCoordinates + "ignore_coordinates": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Description: "List of coordinates of rectangles to be ignored during visual testing", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ScreenshotName + "screenshot_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the screenshot to be used as base reference for visual testing", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Description: "List of screenshots used as base reference for visual testing", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Description: "Visual reference configuration for visual testing", + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::Synthetics::Canary", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Synthetics::Canary").WithTerraformTypeName("awscc_synthetics_canary") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "active_tracing": "ActiveTracing", + "artifact_config": "ArtifactConfig", + "artifact_s3_location": "ArtifactS3Location", + "base_canary_run_id": "BaseCanaryRunId", + "base_screenshots": "BaseScreenshots", + "canary_id": "Id", + "code": "Code", + "delete_lambda_resources_on_canary_deletion": "DeleteLambdaResourcesOnCanaryDeletion", + "duration_in_seconds": "DurationInSeconds", + "encryption_mode": "EncryptionMode", + "environment_variables": "EnvironmentVariables", + "execution_role_arn": "ExecutionRoleArn", + "expression": "Expression", + "failure_retention_period": "FailureRetentionPeriod", + "handler": "Handler", + "ignore_coordinates": "IgnoreCoordinates", + "key": "Key", + "kms_key_arn": "KmsKeyArn", + "memory_in_mb": "MemoryInMB", + "name": "Name", + "run_config": "RunConfig", + "runtime_version": "RuntimeVersion", + "s3_bucket": "S3Bucket", + "s3_encryption": "S3Encryption", + "s3_key": "S3Key", + "s3_object_version": "S3ObjectVersion", + "schedule": "Schedule", + "screenshot_name": "ScreenshotName", + "script": "Script", + "security_group_ids": "SecurityGroupIds", + "source_location_arn": "SourceLocationArn", + "start_canary_after_creation": "StartCanaryAfterCreation", + "state": "State", + "subnet_ids": "SubnetIds", + "success_retention_period": "SuccessRetentionPeriod", + "tags": "Tags", + "timeout_in_seconds": "TimeoutInSeconds", + "value": "Value", + "visual_reference": "VisualReference", + "vpc_config": "VPCConfig", + "vpc_id": "VpcId", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/synthetics/canary_singular_data_source_gen_test.go b/internal/aws/synthetics/canary_singular_data_source_gen_test.go new file mode 100644 index 000000000..a7c69474e --- /dev/null +++ b/internal/aws/synthetics/canary_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package synthetics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSyntheticsCanaryDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Canary", "awscc_synthetics_canary", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSSyntheticsCanaryDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Canary", "awscc_synthetics_canary", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/synthetics/group_plural_data_source_gen.go b/internal/aws/synthetics/group_plural_data_source_gen.go new file mode 100644 index 000000000..ea55911e6 --- /dev/null +++ b/internal/aws/synthetics/group_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package synthetics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_synthetics_groups", groupsDataSource) +} + +// groupsDataSource returns the Terraform awscc_synthetics_groups data source. +// This Terraform data source corresponds to the CloudFormation AWS::Synthetics::Group resource. +func groupsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::Synthetics::Group", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Synthetics::Group").WithTerraformTypeName("awscc_synthetics_groups") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/synthetics/group_plural_data_source_gen_test.go b/internal/aws/synthetics/group_plural_data_source_gen_test.go new file mode 100644 index 000000000..ca40d0599 --- /dev/null +++ b/internal/aws/synthetics/group_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package synthetics_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSyntheticsGroupsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Group", "awscc_synthetics_groups", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/synthetics/group_resource_gen.go b/internal/aws/synthetics/group_resource_gen.go new file mode 100644 index 000000000..036a5a4aa --- /dev/null +++ b/internal/aws/synthetics/group_resource_gen.go @@ -0,0 +1,198 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package synthetics + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_synthetics_group", groupResource) +} + +// groupResource returns the Terraform awscc_synthetics_group resource. +// This Terraform resource corresponds to the CloudFormation AWS::Synthetics::Group resource. +func groupResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "Id of the group.", + // "type": "string" + // } + "group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Id of the group.", + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "Name of the group.", + // "pattern": "^[0-9a-z_\\-]{1,64}$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the group.", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.RegexMatches(regexp.MustCompile("^[0-9a-z_\\-]{1,64}$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ResourceArns + // CloudFormation resource type schema: + // + // { + // "items": { + // "description": "Provide Canary Arn associated with the group.", + // "pattern": "arn:(aws[a-zA-Z-]*)?:synthetics:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:canary:[0-9a-z_\\-]", + // "type": "string" + // }, + // "maxItems": 10, + // "type": "array", + // "uniqueItems": true + // } + "resource_arns": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeAtMost(10), + listvalidator.UniqueValues(), + listvalidator.ValueStringsAre( + stringvalidator.RegexMatches(regexp.MustCompile("arn:(aws[a-zA-Z-]*)?:synthetics:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:canary:[0-9a-z_\\-]"), ""), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 0, + // "pattern": "^([a-zA-Z\\d\\s_.:/=+\\-@]*)$", + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 256), + stringvalidator.RegexMatches(regexp.MustCompile("^([a-zA-Z\\d\\s_.:/=+\\-@]*)$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeAtLeast(0), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Resource Type definition for AWS::Synthetics::Group", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Synthetics::Group").WithTerraformTypeName("awscc_synthetics_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "group_id": "Id", + "key": "Key", + "name": "Name", + "resource_arns": "ResourceArns", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/synthetics/group_resource_gen_test.go b/internal/aws/synthetics/group_resource_gen_test.go new file mode 100644 index 000000000..65b9b9274 --- /dev/null +++ b/internal/aws/synthetics/group_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package synthetics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSyntheticsGroup_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Group", "awscc_synthetics_group", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/synthetics/group_singular_data_source_gen.go b/internal/aws/synthetics/group_singular_data_source_gen.go new file mode 100644 index 000000000..50943b197 --- /dev/null +++ b/internal/aws/synthetics/group_singular_data_source_gen.go @@ -0,0 +1,148 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package synthetics + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_synthetics_group", groupDataSource) +} + +// groupDataSource returns the Terraform awscc_synthetics_group data source. +// This Terraform data source corresponds to the CloudFormation AWS::Synthetics::Group resource. +func groupDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "description": "Id of the group.", + // "type": "string" + // } + "group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Id of the group.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "description": "Name of the group.", + // "pattern": "^[0-9a-z_\\-]{1,64}$", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "Name of the group.", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceArns + // CloudFormation resource type schema: + // + // { + // "items": { + // "description": "Provide Canary Arn associated with the group.", + // "pattern": "arn:(aws[a-zA-Z-]*)?:synthetics:[a-z]{2}((-gov)|(-iso(b?)))?-[a-z]+-\\d{1}:\\d{12}:canary:[0-9a-z_\\-]", + // "type": "string" + // }, + // "maxItems": 10, + // "type": "array", + // "uniqueItems": true + // } + "resource_arns": schema.ListAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "items": { + // "additionalProperties": false, + // "description": "A key-value pair to associate with a resource.", + // "properties": { + // "Key": { + // "description": "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 128, + // "minLength": 1, + // "pattern": "", + // "type": "string" + // }, + // "Value": { + // "description": "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + // "maxLength": 256, + // "minLength": 0, + // "pattern": "^([a-zA-Z\\d\\s_.:/=+\\-@]*)$", + // "type": "string" + // } + // }, + // "required": [ + // "Value", + // "Key" + // ], + // "type": "object" + // }, + // "minItems": 0, + // "type": "array", + // "uniqueItems": false + // } + "tags": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The key name of the tag. You can specify a value that is 1 to 127 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Description: "The value for the tag. You can specify a value that is 1 to 255 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. ", + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::Synthetics::Group", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::Synthetics::Group").WithTerraformTypeName("awscc_synthetics_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "group_id": "Id", + "key": "Key", + "name": "Name", + "resource_arns": "ResourceArns", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/synthetics/group_singular_data_source_gen_test.go b/internal/aws/synthetics/group_singular_data_source_gen_test.go new file mode 100644 index 000000000..cd041c59f --- /dev/null +++ b/internal/aws/synthetics/group_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package synthetics_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSSyntheticsGroupDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Group", "awscc_synthetics_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSSyntheticsGroupDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::Synthetics::Group", "awscc_synthetics_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/systemsmanagersap/application_resource_gen.go b/internal/aws/systemsmanagersap/application_resource_gen.go index 44500e7c4..dcd0178dd 100644 --- a/internal/aws/systemsmanagersap/application_resource_gen.go +++ b/internal/aws/systemsmanagersap/application_resource_gen.go @@ -275,6 +275,7 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -293,7 +294,6 @@ func applicationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::SystemsManagerSAP::Application").WithTerraformTypeName("awscc_systemsmanagersap_application") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "application_id": "ApplicationId", "application_type": "ApplicationType", diff --git a/internal/aws/timestream/database_resource_gen.go b/internal/aws/timestream/database_resource_gen.go index 0a8731cda..86e6a9880 100644 --- a/internal/aws/timestream/database_resource_gen.go +++ b/internal/aws/timestream/database_resource_gen.go @@ -147,6 +147,7 @@ func databaseResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -165,7 +166,6 @@ func databaseResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Timestream::Database").WithTerraformTypeName("awscc_timestream_database") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "database_name": "DatabaseName", diff --git a/internal/aws/timestream/scheduled_query_resource_gen.go b/internal/aws/timestream/scheduled_query_resource_gen.go index 2ab61fdb2..b2f8aabd1 100644 --- a/internal/aws/timestream/scheduled_query_resource_gen.go +++ b/internal/aws/timestream/scheduled_query_resource_gen.go @@ -943,6 +943,7 @@ func scheduledQueryResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -961,7 +962,6 @@ func scheduledQueryResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Timestream::ScheduledQuery").WithTerraformTypeName("awscc_timestream_scheduled_query") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket_name": "BucketName", diff --git a/internal/aws/timestream/table_resource_gen.go b/internal/aws/timestream/table_resource_gen.go index 7e8bf9133..afc11514c 100644 --- a/internal/aws/timestream/table_resource_gen.go +++ b/internal/aws/timestream/table_resource_gen.go @@ -434,6 +434,7 @@ func tableResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -452,7 +453,6 @@ func tableResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Timestream::Table").WithTerraformTypeName("awscc_timestream_table") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket_name": "BucketName", diff --git a/internal/aws/transfer/agreement_resource_gen.go b/internal/aws/transfer/agreement_resource_gen.go index d33fc8513..d9c1183dd 100644 --- a/internal/aws/transfer/agreement_resource_gen.go +++ b/internal/aws/transfer/agreement_resource_gen.go @@ -268,6 +268,7 @@ func agreementResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -286,7 +287,6 @@ func agreementResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Transfer::Agreement").WithTerraformTypeName("awscc_transfer_agreement") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_role": "AccessRole", "agreement_id": "AgreementId", diff --git a/internal/aws/transfer/certificate_resource_gen.go b/internal/aws/transfer/certificate_resource_gen.go index e64030d02..08a2d861a 100644 --- a/internal/aws/transfer/certificate_resource_gen.go +++ b/internal/aws/transfer/certificate_resource_gen.go @@ -352,6 +352,7 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -370,7 +371,6 @@ func certificateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Transfer::Certificate").WithTerraformTypeName("awscc_transfer_certificate") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "active_date": "ActiveDate", "arn": "Arn", diff --git a/internal/aws/transfer/connector_resource_gen.go b/internal/aws/transfer/connector_resource_gen.go index ae43593d1..d485e7767 100644 --- a/internal/aws/transfer/connector_resource_gen.go +++ b/internal/aws/transfer/connector_resource_gen.go @@ -486,6 +486,7 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -504,7 +505,6 @@ func connectorResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Transfer::Connector").WithTerraformTypeName("awscc_transfer_connector") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "access_role": "AccessRole", "arn": "Arn", diff --git a/internal/aws/transfer/profile_resource_gen.go b/internal/aws/transfer/profile_resource_gen.go index f6c104bce..9bebef53c 100644 --- a/internal/aws/transfer/profile_resource_gen.go +++ b/internal/aws/transfer/profile_resource_gen.go @@ -203,6 +203,7 @@ func profileResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -221,7 +222,6 @@ func profileResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Transfer::Profile").WithTerraformTypeName("awscc_transfer_profile") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "as_2_id": "As2Id", diff --git a/internal/aws/transfer/workflow_resource_gen.go b/internal/aws/transfer/workflow_resource_gen.go index bb2b00c68..01596a200 100644 --- a/internal/aws/transfer/workflow_resource_gen.go +++ b/internal/aws/transfer/workflow_resource_gen.go @@ -1611,6 +1611,7 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -1629,7 +1630,6 @@ func workflowResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Transfer::Workflow").WithTerraformTypeName("awscc_transfer_workflow") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "bucket": "Bucket", diff --git a/internal/aws/verifiedpermissions/identity_source_resource_gen.go b/internal/aws/verifiedpermissions/identity_source_resource_gen.go index 7e8456e1f..5b76c0bca 100644 --- a/internal/aws/verifiedpermissions/identity_source_resource_gen.go +++ b/internal/aws/verifiedpermissions/identity_source_resource_gen.go @@ -229,6 +229,7 @@ func identitySourceResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -247,7 +248,6 @@ func identitySourceResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VerifiedPermissions::IdentitySource").WithTerraformTypeName("awscc_verifiedpermissions_identity_source") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "client_ids": "ClientIds", "cognito_user_pool_configuration": "CognitoUserPoolConfiguration", diff --git a/internal/aws/verifiedpermissions/policy_resource_gen.go b/internal/aws/verifiedpermissions/policy_resource_gen.go index 492adc391..b7dc0225b 100644 --- a/internal/aws/verifiedpermissions/policy_resource_gen.go +++ b/internal/aws/verifiedpermissions/policy_resource_gen.go @@ -269,6 +269,7 @@ func policyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -287,7 +288,6 @@ func policyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VerifiedPermissions::Policy").WithTerraformTypeName("awscc_verifiedpermissions_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "definition": "Definition", "description": "Description", diff --git a/internal/aws/verifiedpermissions/policy_store_resource_gen.go b/internal/aws/verifiedpermissions/policy_store_resource_gen.go index cf9f0560d..0448b7f2f 100644 --- a/internal/aws/verifiedpermissions/policy_store_resource_gen.go +++ b/internal/aws/verifiedpermissions/policy_store_resource_gen.go @@ -140,6 +140,7 @@ func policyStoreResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -158,7 +159,6 @@ func policyStoreResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VerifiedPermissions::PolicyStore").WithTerraformTypeName("awscc_verifiedpermissions_policy_store") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "cedar_json": "CedarJson", diff --git a/internal/aws/verifiedpermissions/policy_template_resource_gen.go b/internal/aws/verifiedpermissions/policy_template_resource_gen.go index 9b4cfdd09..2d91d156f 100644 --- a/internal/aws/verifiedpermissions/policy_template_resource_gen.go +++ b/internal/aws/verifiedpermissions/policy_template_resource_gen.go @@ -95,6 +95,7 @@ func policyTemplateResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -113,7 +114,6 @@ func policyTemplateResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VerifiedPermissions::PolicyTemplate").WithTerraformTypeName("awscc_verifiedpermissions_policy_template") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "policy_store_id": "PolicyStoreId", diff --git a/internal/aws/voiceid/domain_resource_gen.go b/internal/aws/voiceid/domain_resource_gen.go index 09294c4cf..b67cf37d5 100644 --- a/internal/aws/voiceid/domain_resource_gen.go +++ b/internal/aws/voiceid/domain_resource_gen.go @@ -176,6 +176,7 @@ func domainResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -194,7 +195,6 @@ func domainResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VoiceID::Domain").WithTerraformTypeName("awscc_voiceid_domain") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "description": "Description", "domain_id": "DomainId", diff --git a/internal/aws/vpclattice/access_log_subscription_plural_data_source_gen.go b/internal/aws/vpclattice/access_log_subscription_plural_data_source_gen.go new file mode 100644 index 000000000..03cf72d6a --- /dev/null +++ b/internal/aws/vpclattice/access_log_subscription_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_access_log_subscriptions", accessLogSubscriptionsDataSource) +} + +// accessLogSubscriptionsDataSource returns the Terraform awscc_vpclattice_access_log_subscriptions data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::AccessLogSubscription resource. +func accessLogSubscriptionsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::AccessLogSubscription", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::AccessLogSubscription").WithTerraformTypeName("awscc_vpclattice_access_log_subscriptions") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/access_log_subscription_plural_data_source_gen_test.go b/internal/aws/vpclattice/access_log_subscription_plural_data_source_gen_test.go new file mode 100644 index 000000000..cac8f38fd --- /dev/null +++ b/internal/aws/vpclattice/access_log_subscription_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeAccessLogSubscriptionsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::AccessLogSubscription", "awscc_vpclattice_access_log_subscriptions", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/access_log_subscription_resource_gen.go b/internal/aws/vpclattice/access_log_subscription_resource_gen.go new file mode 100644 index 000000000..98c3c81b7 --- /dev/null +++ b/internal/aws/vpclattice/access_log_subscription_resource_gen.go @@ -0,0 +1,235 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_access_log_subscription", accessLogSubscriptionResource) +} + +// accessLogSubscriptionResource returns the Terraform awscc_vpclattice_access_log_subscription resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::AccessLogSubscription resource. +func accessLogSubscriptionResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:accesslogsubscription/als-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DestinationArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$", + // "type": "string" + // } + "destination_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^als-[0-9a-z]{17}$", + // "type": "string" + // } + "access_log_subscription_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ResourceArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)|(service/svc))-[0-9a-z]{17}$", + // "type": "string" + // } + "resource_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ResourceId + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((sn)|(svc))-[0-9a-z]{17}$", + // "type": "string" + // } + "resource_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ResourceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((((sn)|(svc))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)|(service/svc))-[0-9a-z]{17}))$", + // "type": "string" + // } + "resource_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((((sn)|(svc))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)|(service/svc))-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ResourceIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Enables access logs to be sent to Amazon CloudWatch, Amazon S3, and Amazon Kinesis Data Firehose. The service network owner can use the access logs to audit the services in the network. The service network owner will only see access logs from clients and services that are associated with their service network. Access log entries represent traffic originated from VPCs associated with that network.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::AccessLogSubscription").WithTerraformTypeName("awscc_vpclattice_access_log_subscription") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_log_subscription_id": "Id", + "arn": "Arn", + "destination_arn": "DestinationArn", + "key": "Key", + "resource_arn": "ResourceArn", + "resource_id": "ResourceId", + "resource_identifier": "ResourceIdentifier", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/ResourceIdentifier", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/access_log_subscription_resource_gen_test.go b/internal/aws/vpclattice/access_log_subscription_resource_gen_test.go new file mode 100644 index 000000000..1ea22409d --- /dev/null +++ b/internal/aws/vpclattice/access_log_subscription_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeAccessLogSubscription_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::AccessLogSubscription", "awscc_vpclattice_access_log_subscription", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/vpclattice/access_log_subscription_singular_data_source_gen.go b/internal/aws/vpclattice/access_log_subscription_singular_data_source_gen.go new file mode 100644 index 000000000..139887f62 --- /dev/null +++ b/internal/aws/vpclattice/access_log_subscription_singular_data_source_gen.go @@ -0,0 +1,177 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_access_log_subscription", accessLogSubscriptionDataSource) +} + +// accessLogSubscriptionDataSource returns the Terraform awscc_vpclattice_access_log_subscription data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::AccessLogSubscription resource. +func accessLogSubscriptionDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:accesslogsubscription/als-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DestinationArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?$", + // "type": "string" + // } + "destination_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^als-[0-9a-z]{17}$", + // "type": "string" + // } + "access_log_subscription_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)|(service/svc))-[0-9a-z]{17}$", + // "type": "string" + // } + "resource_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceId + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((sn)|(svc))-[0-9a-z]{17}$", + // "type": "string" + // } + "resource_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ResourceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((((sn)|(svc))-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:((servicenetwork/sn)|(service/svc))-[0-9a-z]{17}))$", + // "type": "string" + // } + "resource_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::AccessLogSubscription", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::AccessLogSubscription").WithTerraformTypeName("awscc_vpclattice_access_log_subscription") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "access_log_subscription_id": "Id", + "arn": "Arn", + "destination_arn": "DestinationArn", + "key": "Key", + "resource_arn": "ResourceArn", + "resource_id": "ResourceId", + "resource_identifier": "ResourceIdentifier", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/access_log_subscription_singular_data_source_gen_test.go b/internal/aws/vpclattice/access_log_subscription_singular_data_source_gen_test.go new file mode 100644 index 000000000..14ee54738 --- /dev/null +++ b/internal/aws/vpclattice/access_log_subscription_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeAccessLogSubscriptionDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::AccessLogSubscription", "awscc_vpclattice_access_log_subscription", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSVpcLatticeAccessLogSubscriptionDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::AccessLogSubscription", "awscc_vpclattice_access_log_subscription", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/auth_policy_resource_gen.go b/internal/aws/vpclattice/auth_policy_resource_gen.go index dbe91c0fe..91eba3336 100644 --- a/internal/aws/vpclattice/auth_policy_resource_gen.go +++ b/internal/aws/vpclattice/auth_policy_resource_gen.go @@ -75,6 +75,7 @@ func authPolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -93,7 +94,6 @@ func authPolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::AuthPolicy").WithTerraformTypeName("awscc_vpclattice_auth_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy": "Policy", "resource_identifier": "ResourceIdentifier", diff --git a/internal/aws/vpclattice/listener_plural_data_source_gen.go b/internal/aws/vpclattice/listener_plural_data_source_gen.go new file mode 100644 index 000000000..ff2413764 --- /dev/null +++ b/internal/aws/vpclattice/listener_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_listeners", listenersDataSource) +} + +// listenersDataSource returns the Terraform awscc_vpclattice_listeners data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::Listener resource. +func listenersDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::Listener", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Listener").WithTerraformTypeName("awscc_vpclattice_listeners") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/listener_plural_data_source_gen_test.go b/internal/aws/vpclattice/listener_plural_data_source_gen_test.go new file mode 100644 index 000000000..9a253dfa2 --- /dev/null +++ b/internal/aws/vpclattice/listener_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeListenersDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Listener", "awscc_vpclattice_listeners", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/listener_resource_gen.go b/internal/aws/vpclattice/listener_resource_gen.go new file mode 100644 index 000000000..87ee24db1 --- /dev/null +++ b/internal/aws/vpclattice/listener_resource_gen.go @@ -0,0 +1,416 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_listener", listenerResource) +} + +// listenerResource returns the Terraform awscc_vpclattice_listener resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::Listener resource. +func listenerResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DefaultAction + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "FixedResponse": { + // "additionalProperties": false, + // "properties": { + // "StatusCode": { + // "maximum": 599, + // "minimum": 100, + // "type": "integer" + // } + // }, + // "required": [ + // "StatusCode" + // ], + // "type": "object" + // }, + // "Forward": { + // "additionalProperties": false, + // "properties": { + // "TargetGroups": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "TargetGroupIdentifier": { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$", + // "type": "string" + // }, + // "Weight": { + // "maximum": 999, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "TargetGroupIdentifier" + // ], + // "type": "object" + // }, + // "maxItems": 2, + // "minItems": 1, + // "type": "array" + // } + // }, + // "required": [ + // "TargetGroups" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + "default_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FixedResponse + "fixed_response": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: StatusCode + "status_code": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(100, 599), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Forward + "forward": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroups + "target_groups": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroupIdentifier + "target_group_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Weight + "weight": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 999), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 2), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 26, + // "minLength": 26, + // "pattern": "^listener-[0-9a-z]{17}$", + // "type": "string" + // } + "listener_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 63), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Port + // CloudFormation resource type schema: + // + // { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // } + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 65535), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + int64planmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Protocol + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "HTTP", + // "HTTPS" + // ], + // "type": "string" + // } + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "HTTP", + "HTTPS", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 21, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceId + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 21, + // "pattern": "^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(21, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ServiceIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Creates a listener for a service. Before you start using your Amazon VPC Lattice service, you must add one or more listeners. A listener is a process that checks for connection requests to your services.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Listener").WithTerraformTypeName("awscc_vpclattice_listener") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "default_action": "DefaultAction", + "fixed_response": "FixedResponse", + "forward": "Forward", + "key": "Key", + "listener_id": "Id", + "name": "Name", + "port": "Port", + "protocol": "Protocol", + "service_arn": "ServiceArn", + "service_id": "ServiceId", + "service_identifier": "ServiceIdentifier", + "status_code": "StatusCode", + "tags": "Tags", + "target_group_identifier": "TargetGroupIdentifier", + "target_groups": "TargetGroups", + "value": "Value", + "weight": "Weight", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/ServiceIdentifier", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/listener_resource_gen_test.go b/internal/aws/vpclattice/listener_resource_gen_test.go new file mode 100644 index 000000000..de01be9d0 --- /dev/null +++ b/internal/aws/vpclattice/listener_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeListener_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Listener", "awscc_vpclattice_listener", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/vpclattice/listener_singular_data_source_gen.go b/internal/aws/vpclattice/listener_singular_data_source_gen.go new file mode 100644 index 000000000..6d619cb76 --- /dev/null +++ b/internal/aws/vpclattice/listener_singular_data_source_gen.go @@ -0,0 +1,305 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_listener", listenerDataSource) +} + +// listenerDataSource returns the Terraform awscc_vpclattice_listener data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::Listener resource. +func listenerDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DefaultAction + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "FixedResponse": { + // "additionalProperties": false, + // "properties": { + // "StatusCode": { + // "maximum": 599, + // "minimum": 100, + // "type": "integer" + // } + // }, + // "required": [ + // "StatusCode" + // ], + // "type": "object" + // }, + // "Forward": { + // "additionalProperties": false, + // "properties": { + // "TargetGroups": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "TargetGroupIdentifier": { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$", + // "type": "string" + // }, + // "Weight": { + // "maximum": 999, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "TargetGroupIdentifier" + // ], + // "type": "object" + // }, + // "maxItems": 2, + // "minItems": 1, + // "type": "array" + // } + // }, + // "required": [ + // "TargetGroups" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + "default_action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FixedResponse + "fixed_response": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: StatusCode + "status_code": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Forward + "forward": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroups + "target_groups": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroupIdentifier + "target_group_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Weight + "weight": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 26, + // "minLength": 26, + // "pattern": "^listener-[0-9a-z]{17}$", + // "type": "string" + // } + "listener_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Port + // CloudFormation resource type schema: + // + // { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // } + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Protocol + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "HTTP", + // "HTTPS" + // ], + // "type": "string" + // } + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 21, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceId + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 21, + // "pattern": "^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::Listener", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Listener").WithTerraformTypeName("awscc_vpclattice_listener") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "default_action": "DefaultAction", + "fixed_response": "FixedResponse", + "forward": "Forward", + "key": "Key", + "listener_id": "Id", + "name": "Name", + "port": "Port", + "protocol": "Protocol", + "service_arn": "ServiceArn", + "service_id": "ServiceId", + "service_identifier": "ServiceIdentifier", + "status_code": "StatusCode", + "tags": "Tags", + "target_group_identifier": "TargetGroupIdentifier", + "target_groups": "TargetGroups", + "value": "Value", + "weight": "Weight", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/listener_singular_data_source_gen_test.go b/internal/aws/vpclattice/listener_singular_data_source_gen_test.go new file mode 100644 index 000000000..81ea9d6e4 --- /dev/null +++ b/internal/aws/vpclattice/listener_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeListenerDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Listener", "awscc_vpclattice_listener", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSVpcLatticeListenerDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Listener", "awscc_vpclattice_listener", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/resource_policy_resource_gen.go b/internal/aws/vpclattice/resource_policy_resource_gen.go index 15ebe7aa1..7eaf494d2 100644 --- a/internal/aws/vpclattice/resource_policy_resource_gen.go +++ b/internal/aws/vpclattice/resource_policy_resource_gen.go @@ -59,6 +59,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -77,7 +78,6 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ResourcePolicy").WithTerraformTypeName("awscc_vpclattice_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "policy": "Policy", "resource_arn": "ResourceArn", diff --git a/internal/aws/vpclattice/rule_plural_data_source_gen.go b/internal/aws/vpclattice/rule_plural_data_source_gen.go new file mode 100644 index 000000000..e3fdda740 --- /dev/null +++ b/internal/aws/vpclattice/rule_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_rules", rulesDataSource) +} + +// rulesDataSource returns the Terraform awscc_vpclattice_rules data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::Rule resource. +func rulesDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::Rule", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Rule").WithTerraformTypeName("awscc_vpclattice_rules") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/rule_plural_data_source_gen_test.go b/internal/aws/vpclattice/rule_plural_data_source_gen_test.go new file mode 100644 index 000000000..49b7fbbcf --- /dev/null +++ b/internal/aws/vpclattice/rule_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeRulesDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Rule", "awscc_vpclattice_rules", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/rule_resource_gen.go b/internal/aws/vpclattice/rule_resource_gen.go new file mode 100644 index 000000000..ceea14fe5 --- /dev/null +++ b/internal/aws/vpclattice/rule_resource_gen.go @@ -0,0 +1,649 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_rule", ruleResource) +} + +// ruleResource returns the Terraform awscc_vpclattice_rule resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::Rule resource. +func ruleResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Action + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "FixedResponse": { + // "additionalProperties": false, + // "properties": { + // "StatusCode": { + // "maximum": 599, + // "minimum": 100, + // "type": "integer" + // } + // }, + // "required": [ + // "StatusCode" + // ], + // "type": "object" + // }, + // "Forward": { + // "additionalProperties": false, + // "properties": { + // "TargetGroups": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "TargetGroupIdentifier": { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$", + // "type": "string" + // }, + // "Weight": { + // "maximum": 999, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "TargetGroupIdentifier" + // ], + // "type": "object" + // }, + // "maxItems": 2, + // "minItems": 1, + // "type": "array" + // } + // }, + // "required": [ + // "TargetGroups" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + "action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FixedResponse + "fixed_response": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: StatusCode + "status_code": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(100, 599), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Forward + "forward": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroups + "target_groups": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroupIdentifier + "target_group_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Weight + "weight": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 999), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Required: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(1, 2), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}/rule/((rule-[0-9a-z]{17})|(default))$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 22, + // "minLength": 7, + // "pattern": "^((rule-[0-9a-z]{17})|(default))$", + // "type": "string" + // } + "rule_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ListenerIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((listener-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}))$", + // "type": "string" + // } + "listener_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((listener-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ListenerIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Match + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "HttpMatch": { + // "additionalProperties": false, + // "properties": { + // "HeaderMatches": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "CaseSensitive": { + // "default": false, + // "type": "boolean" + // }, + // "Match": { + // "additionalProperties": false, + // "properties": { + // "Contains": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Exact": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Prefix": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "Name": { + // "maxLength": 40, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Match", + // "Name" + // ], + // "type": "object" + // }, + // "maxItems": 5, + // "type": "array" + // }, + // "Method": { + // "enum": [ + // "CONNECT", + // "DELETE", + // "GET", + // "HEAD", + // "OPTIONS", + // "POST", + // "PUT", + // "TRACE" + // ], + // "type": "string" + // }, + // "PathMatch": { + // "additionalProperties": false, + // "properties": { + // "CaseSensitive": { + // "default": false, + // "type": "boolean" + // }, + // "Match": { + // "additionalProperties": false, + // "properties": { + // "Exact": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^\\/[a-zA-Z0-9@:%_+.~#?\u0026\\/=-]*$", + // "type": "string" + // }, + // "Prefix": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^\\/[a-zA-Z0-9@:%_+.~#?\u0026\\/=-]*$", + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "required": [ + // "Match" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + // }, + // "required": [ + // "HttpMatch" + // ], + // "type": "object" + // } + "match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HttpMatch + "http_match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HeaderMatches + "header_matches": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CaseSensitive + "case_sensitive": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + generic.BoolDefaultValue(false), + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Match + "match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Contains + "contains": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Exact + "exact": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Prefix + "prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 40), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeAtMost(5), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Method + "method": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "CONNECT", + "DELETE", + "GET", + "HEAD", + "OPTIONS", + "POST", + "PUT", + "TRACE", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: PathMatch + "path_match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CaseSensitive + "case_sensitive": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + generic.BoolDefaultValue(false), + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Match + "match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Exact + "exact": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^\\/[a-zA-Z0-9@:%_+.~#?&\\/=-]*$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Prefix + "prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + stringvalidator.RegexMatches(regexp.MustCompile("^\\/[a-zA-Z0-9@:%_+.~#?&\\/=-]*$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 63), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Priority + // CloudFormation resource type schema: + // + // { + // "maximum": 100, + // "minimum": 1, + // "type": "integer" + // } + "priority": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 100), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((svc-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((svc-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ServiceIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Creates a listener rule. Each listener has a default rule for checking connection requests, but you can define additional rules. Each rule consists of a priority, one or more actions, and one or more conditions.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Rule").WithTerraformTypeName("awscc_vpclattice_rule") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "action": "Action", + "arn": "Arn", + "case_sensitive": "CaseSensitive", + "contains": "Contains", + "exact": "Exact", + "fixed_response": "FixedResponse", + "forward": "Forward", + "header_matches": "HeaderMatches", + "http_match": "HttpMatch", + "key": "Key", + "listener_identifier": "ListenerIdentifier", + "match": "Match", + "method": "Method", + "name": "Name", + "path_match": "PathMatch", + "prefix": "Prefix", + "priority": "Priority", + "rule_id": "Id", + "service_identifier": "ServiceIdentifier", + "status_code": "StatusCode", + "tags": "Tags", + "target_group_identifier": "TargetGroupIdentifier", + "target_groups": "TargetGroups", + "value": "Value", + "weight": "Weight", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/ListenerIdentifier", + "/properties/ServiceIdentifier", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/rule_resource_gen_test.go b/internal/aws/vpclattice/rule_resource_gen_test.go new file mode 100644 index 000000000..9c3962cbd --- /dev/null +++ b/internal/aws/vpclattice/rule_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeRule_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Rule", "awscc_vpclattice_rule", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/vpclattice/rule_singular_data_source_gen.go b/internal/aws/vpclattice/rule_singular_data_source_gen.go new file mode 100644 index 000000000..459cfe607 --- /dev/null +++ b/internal/aws/vpclattice/rule_singular_data_source_gen.go @@ -0,0 +1,467 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_rule", ruleDataSource) +} + +// ruleDataSource returns the Terraform awscc_vpclattice_rule data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::Rule resource. +func ruleDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Action + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "FixedResponse": { + // "additionalProperties": false, + // "properties": { + // "StatusCode": { + // "maximum": 599, + // "minimum": 100, + // "type": "integer" + // } + // }, + // "required": [ + // "StatusCode" + // ], + // "type": "object" + // }, + // "Forward": { + // "additionalProperties": false, + // "properties": { + // "TargetGroups": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "TargetGroupIdentifier": { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((tg-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}))$", + // "type": "string" + // }, + // "Weight": { + // "maximum": 999, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "TargetGroupIdentifier" + // ], + // "type": "object" + // }, + // "maxItems": 2, + // "minItems": 1, + // "type": "array" + // } + // }, + // "required": [ + // "TargetGroups" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + "action": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: FixedResponse + "fixed_response": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: StatusCode + "status_code": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Forward + "forward": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroups + "target_groups": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: TargetGroupIdentifier + "target_group_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Weight + "weight": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}/rule/((rule-[0-9a-z]{17})|(default))$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 22, + // "minLength": 7, + // "pattern": "^((rule-[0-9a-z]{17})|(default))$", + // "type": "string" + // } + "rule_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ListenerIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((listener-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}/listener/listener-[0-9a-z]{17}))$", + // "type": "string" + // } + "listener_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Match + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "HttpMatch": { + // "additionalProperties": false, + // "properties": { + // "HeaderMatches": { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "CaseSensitive": { + // "default": false, + // "type": "boolean" + // }, + // "Match": { + // "additionalProperties": false, + // "properties": { + // "Contains": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Exact": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Prefix": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // } + // }, + // "type": "object" + // }, + // "Name": { + // "maxLength": 40, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Match", + // "Name" + // ], + // "type": "object" + // }, + // "maxItems": 5, + // "type": "array" + // }, + // "Method": { + // "enum": [ + // "CONNECT", + // "DELETE", + // "GET", + // "HEAD", + // "OPTIONS", + // "POST", + // "PUT", + // "TRACE" + // ], + // "type": "string" + // }, + // "PathMatch": { + // "additionalProperties": false, + // "properties": { + // "CaseSensitive": { + // "default": false, + // "type": "boolean" + // }, + // "Match": { + // "additionalProperties": false, + // "properties": { + // "Exact": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^\\/[a-zA-Z0-9@:%_+.~#?\u0026\\/=-]*$", + // "type": "string" + // }, + // "Prefix": { + // "maxLength": 128, + // "minLength": 1, + // "pattern": "^\\/[a-zA-Z0-9@:%_+.~#?\u0026\\/=-]*$", + // "type": "string" + // } + // }, + // "type": "object" + // } + // }, + // "required": [ + // "Match" + // ], + // "type": "object" + // } + // }, + // "type": "object" + // } + // }, + // "required": [ + // "HttpMatch" + // ], + // "type": "object" + // } + "match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HttpMatch + "http_match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HeaderMatches + "header_matches": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CaseSensitive + "case_sensitive": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Match + "match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Contains + "contains": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Exact + "exact": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Prefix + "prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Method + "method": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: PathMatch + "path_match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: CaseSensitive + "case_sensitive": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Match + "match": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Exact + "exact": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Prefix + "prefix": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Priority + // CloudFormation resource type schema: + // + // { + // "maximum": 100, + // "minimum": 1, + // "type": "integer" + // } + "priority": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((svc-[0-9a-z]{17})|(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:service/svc-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::Rule", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Rule").WithTerraformTypeName("awscc_vpclattice_rule") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "action": "Action", + "arn": "Arn", + "case_sensitive": "CaseSensitive", + "contains": "Contains", + "exact": "Exact", + "fixed_response": "FixedResponse", + "forward": "Forward", + "header_matches": "HeaderMatches", + "http_match": "HttpMatch", + "key": "Key", + "listener_identifier": "ListenerIdentifier", + "match": "Match", + "method": "Method", + "name": "Name", + "path_match": "PathMatch", + "prefix": "Prefix", + "priority": "Priority", + "rule_id": "Id", + "service_identifier": "ServiceIdentifier", + "status_code": "StatusCode", + "tags": "Tags", + "target_group_identifier": "TargetGroupIdentifier", + "target_groups": "TargetGroups", + "value": "Value", + "weight": "Weight", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/rule_singular_data_source_gen_test.go b/internal/aws/vpclattice/rule_singular_data_source_gen_test.go new file mode 100644 index 000000000..5a2dd06b3 --- /dev/null +++ b/internal/aws/vpclattice/rule_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeRuleDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Rule", "awscc_vpclattice_rule", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSVpcLatticeRuleDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Rule", "awscc_vpclattice_rule", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_plural_data_source_gen.go b/internal/aws/vpclattice/service_network_plural_data_source_gen.go new file mode 100644 index 000000000..8884d00b9 --- /dev/null +++ b/internal/aws/vpclattice/service_network_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service_networks", serviceNetworksDataSource) +} + +// serviceNetworksDataSource returns the Terraform awscc_vpclattice_service_networks data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::ServiceNetwork resource. +func serviceNetworksDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::ServiceNetwork", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetwork").WithTerraformTypeName("awscc_vpclattice_service_networks") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_plural_data_source_gen_test.go b/internal/aws/vpclattice/service_network_plural_data_source_gen_test.go new file mode 100644 index 000000000..963f2a4e9 --- /dev/null +++ b/internal/aws/vpclattice/service_network_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworksDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetwork", "awscc_vpclattice_service_networks", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_resource_gen.go b/internal/aws/vpclattice/service_network_resource_gen.go new file mode 100644 index 000000000..5a8e1318d --- /dev/null +++ b/internal/aws/vpclattice/service_network_resource_gen.go @@ -0,0 +1,232 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_service_network", serviceNetworkResource) +} + +// serviceNetworkResource returns the Terraform awscc_vpclattice_service_network resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::ServiceNetwork resource. +func serviceNetworkResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AuthType + // CloudFormation resource type schema: + // + // { + // "default": "NONE", + // "enum": [ + // "NONE", + // "AWS_IAM" + // ], + // "type": "string" + // } + "auth_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "NONE", + "AWS_IAM", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + generic.StringDefaultValue("NONE"), + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LastUpdatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "last_updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 63), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "A service network is a logical boundary for a collection of services. You can associate services and VPCs with a service network.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetwork").WithTerraformTypeName("awscc_vpclattice_service_network") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "auth_type": "AuthType", + "created_at": "CreatedAt", + "key": "Key", + "last_updated_at": "LastUpdatedAt", + "name": "Name", + "service_network_id": "Id", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_resource_gen_test.go b/internal/aws/vpclattice/service_network_resource_gen_test.go new file mode 100644 index 000000000..97a4faee3 --- /dev/null +++ b/internal/aws/vpclattice/service_network_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetwork_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetwork", "awscc_vpclattice_service_network", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSVpcLatticeServiceNetwork_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetwork", "awscc_vpclattice_service_network", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_service_association_plural_data_source_gen.go b/internal/aws/vpclattice/service_network_service_association_plural_data_source_gen.go new file mode 100644 index 000000000..5c0aa7ac5 --- /dev/null +++ b/internal/aws/vpclattice/service_network_service_association_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service_network_service_associations", serviceNetworkServiceAssociationsDataSource) +} + +// serviceNetworkServiceAssociationsDataSource returns the Terraform awscc_vpclattice_service_network_service_associations data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::ServiceNetworkServiceAssociation resource. +func serviceNetworkServiceAssociationsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::ServiceNetworkServiceAssociation", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetworkServiceAssociation").WithTerraformTypeName("awscc_vpclattice_service_network_service_associations") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_service_association_plural_data_source_gen_test.go b/internal/aws/vpclattice/service_network_service_association_plural_data_source_gen_test.go new file mode 100644 index 000000000..37fa7f272 --- /dev/null +++ b/internal/aws/vpclattice/service_network_service_association_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkServiceAssociationsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkServiceAssociation", "awscc_vpclattice_service_network_service_associations", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_service_association_resource_gen.go b/internal/aws/vpclattice/service_network_service_association_resource_gen.go new file mode 100644 index 000000000..7f0411f63 --- /dev/null +++ b/internal/aws/vpclattice/service_network_service_association_resource_gen.go @@ -0,0 +1,381 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_service_network_service_association", serviceNetworkServiceAssociationResource) +} + +// serviceNetworkServiceAssociationResource returns the Terraform awscc_vpclattice_service_network_service_association resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::ServiceNetworkServiceAssociation resource. +func serviceNetworkServiceAssociationResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DnsEntry + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "DomainName": { + // "type": "string" + // }, + // "HostedZoneId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "dns_entry": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DomainName + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HostedZoneId + "hosted_zone_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 17, + // "pattern": "^snsa-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_service_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceId + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ServiceIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ServiceName + // CloudFormation resource type schema: + // + // { + // "maxLength": 40, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "service_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkId + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((sn-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_network_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((sn-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ServiceNetworkIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkName + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "service_network_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATE_IN_PROGRESS", + // "ACTIVE", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Associates a service with a service network.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetworkServiceAssociation").WithTerraformTypeName("awscc_vpclattice_service_network_service_association") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "created_at": "CreatedAt", + "dns_entry": "DnsEntry", + "domain_name": "DomainName", + "hosted_zone_id": "HostedZoneId", + "key": "Key", + "service_arn": "ServiceArn", + "service_id": "ServiceId", + "service_identifier": "ServiceIdentifier", + "service_name": "ServiceName", + "service_network_arn": "ServiceNetworkArn", + "service_network_id": "ServiceNetworkId", + "service_network_identifier": "ServiceNetworkIdentifier", + "service_network_name": "ServiceNetworkName", + "service_network_service_association_id": "Id", + "status": "Status", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/ServiceNetworkIdentifier", + "/properties/ServiceIdentifier", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_service_association_resource_gen_test.go b/internal/aws/vpclattice/service_network_service_association_resource_gen_test.go new file mode 100644 index 000000000..e82bf7567 --- /dev/null +++ b/internal/aws/vpclattice/service_network_service_association_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkServiceAssociation_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkServiceAssociation", "awscc_vpclattice_service_network_service_association", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSVpcLatticeServiceNetworkServiceAssociation_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkServiceAssociation", "awscc_vpclattice_service_network_service_association", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_service_association_singular_data_source_gen.go b/internal/aws/vpclattice/service_network_service_association_singular_data_source_gen.go new file mode 100644 index 000000000..8f55985eb --- /dev/null +++ b/internal/aws/vpclattice/service_network_service_association_singular_data_source_gen.go @@ -0,0 +1,287 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service_network_service_association", serviceNetworkServiceAssociationDataSource) +} + +// serviceNetworkServiceAssociationDataSource returns the Terraform awscc_vpclattice_service_network_service_association data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::ServiceNetworkServiceAssociation resource. +func serviceNetworkServiceAssociationDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetworkserviceassociation/snsa-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DnsEntry + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "DomainName": { + // "type": "string" + // }, + // "HostedZoneId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "dns_entry": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DomainName + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HostedZoneId + "hosted_zone_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 17, + // "pattern": "^snsa-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_service_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceId + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((svc-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceName + // CloudFormation resource type schema: + // + // { + // "maxLength": 40, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "service_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkId + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((sn-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_network_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkName + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "service_network_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATE_IN_PROGRESS", + // "ACTIVE", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::ServiceNetworkServiceAssociation", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetworkServiceAssociation").WithTerraformTypeName("awscc_vpclattice_service_network_service_association") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "created_at": "CreatedAt", + "dns_entry": "DnsEntry", + "domain_name": "DomainName", + "hosted_zone_id": "HostedZoneId", + "key": "Key", + "service_arn": "ServiceArn", + "service_id": "ServiceId", + "service_identifier": "ServiceIdentifier", + "service_name": "ServiceName", + "service_network_arn": "ServiceNetworkArn", + "service_network_id": "ServiceNetworkId", + "service_network_identifier": "ServiceNetworkIdentifier", + "service_network_name": "ServiceNetworkName", + "service_network_service_association_id": "Id", + "status": "Status", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_service_association_singular_data_source_gen_test.go b/internal/aws/vpclattice/service_network_service_association_singular_data_source_gen_test.go new file mode 100644 index 000000000..53b35a142 --- /dev/null +++ b/internal/aws/vpclattice/service_network_service_association_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkServiceAssociationDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkServiceAssociation", "awscc_vpclattice_service_network_service_association", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSVpcLatticeServiceNetworkServiceAssociationDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkServiceAssociation", "awscc_vpclattice_service_network_service_association", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_singular_data_source_gen.go b/internal/aws/vpclattice/service_network_singular_data_source_gen.go new file mode 100644 index 000000000..5cb2b482a --- /dev/null +++ b/internal/aws/vpclattice/service_network_singular_data_source_gen.go @@ -0,0 +1,173 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service_network", serviceNetworkDataSource) +} + +// serviceNetworkDataSource returns the Terraform awscc_vpclattice_service_network data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::ServiceNetwork resource. +func serviceNetworkDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AuthType + // CloudFormation resource type schema: + // + // { + // "default": "NONE", + // "enum": [ + // "NONE", + // "AWS_IAM" + // ], + // "type": "string" + // } + "auth_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LastUpdatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "last_updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::ServiceNetwork", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetwork").WithTerraformTypeName("awscc_vpclattice_service_network") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "auth_type": "AuthType", + "created_at": "CreatedAt", + "key": "Key", + "last_updated_at": "LastUpdatedAt", + "name": "Name", + "service_network_id": "Id", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_singular_data_source_gen_test.go b/internal/aws/vpclattice/service_network_singular_data_source_gen_test.go new file mode 100644 index 000000000..2b9b4d799 --- /dev/null +++ b/internal/aws/vpclattice/service_network_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetwork", "awscc_vpclattice_service_network", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSVpcLatticeServiceNetworkDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetwork", "awscc_vpclattice_service_network", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_vpc_association_plural_data_source_gen.go b/internal/aws/vpclattice/service_network_vpc_association_plural_data_source_gen.go new file mode 100644 index 000000000..6a1518f48 --- /dev/null +++ b/internal/aws/vpclattice/service_network_vpc_association_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service_network_vpc_associations", serviceNetworkVpcAssociationsDataSource) +} + +// serviceNetworkVpcAssociationsDataSource returns the Terraform awscc_vpclattice_service_network_vpc_associations data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::ServiceNetworkVpcAssociation resource. +func serviceNetworkVpcAssociationsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::ServiceNetworkVpcAssociation", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetworkVpcAssociation").WithTerraformTypeName("awscc_vpclattice_service_network_vpc_associations") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_vpc_association_plural_data_source_gen_test.go b/internal/aws/vpclattice/service_network_vpc_association_plural_data_source_gen_test.go new file mode 100644 index 000000000..57a2ffb2c --- /dev/null +++ b/internal/aws/vpclattice/service_network_vpc_association_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkVpcAssociationsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkVpcAssociation", "awscc_vpclattice_service_network_vpc_associations", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_vpc_association_resource_gen.go b/internal/aws/vpclattice/service_network_vpc_association_resource_gen.go new file mode 100644 index 000000000..f58553a36 --- /dev/null +++ b/internal/aws/vpclattice/service_network_vpc_association_resource_gen.go @@ -0,0 +1,338 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_service_network_vpc_association", serviceNetworkVpcAssociationResource) +} + +// serviceNetworkVpcAssociationResource returns the Terraform awscc_vpclattice_service_network_vpc_association resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::ServiceNetworkVpcAssociation resource. +func serviceNetworkVpcAssociationResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 22, + // "minLength": 22, + // "pattern": "^snva-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_vpc_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: SecurityGroupIds + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "maxLength": 200, + // "minLength": 0, + // "pattern": "^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": true + // } + "security_group_ids": schema.SetAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.ValueStringsAre( + stringvalidator.LengthBetween(0, 200), + stringvalidator.RegexMatches(regexp.MustCompile("^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$"), ""), + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkId + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((sn-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_network_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(20, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^((sn-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // ServiceNetworkIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkName + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "service_network_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATE_IN_PROGRESS", + // "ACTIVE", + // "UPDATE_IN_PROGRESS", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VpcId + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 5, + // "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // } + "vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VpcIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 5, + // "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // } + "vpc_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(5, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + // VpcIdentifier is a write-only property. + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "Associates a VPC with a service network.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetworkVpcAssociation").WithTerraformTypeName("awscc_vpclattice_service_network_vpc_association") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "created_at": "CreatedAt", + "key": "Key", + "security_group_ids": "SecurityGroupIds", + "service_network_arn": "ServiceNetworkArn", + "service_network_id": "ServiceNetworkId", + "service_network_identifier": "ServiceNetworkIdentifier", + "service_network_name": "ServiceNetworkName", + "service_network_vpc_association_id": "Id", + "status": "Status", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", + "vpc_identifier": "VpcIdentifier", + }) + + opts = opts.WithWriteOnlyPropertyPaths([]string{ + "/properties/ServiceNetworkIdentifier", + "/properties/VpcIdentifier", + }) + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_vpc_association_resource_gen_test.go b/internal/aws/vpclattice/service_network_vpc_association_resource_gen_test.go new file mode 100644 index 000000000..08fdd1db1 --- /dev/null +++ b/internal/aws/vpclattice/service_network_vpc_association_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkVpcAssociation_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkVpcAssociation", "awscc_vpclattice_service_network_vpc_association", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSVpcLatticeServiceNetworkVpcAssociation_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkVpcAssociation", "awscc_vpclattice_service_network_vpc_association", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/vpclattice/service_network_vpc_association_singular_data_source_gen.go b/internal/aws/vpclattice/service_network_vpc_association_singular_data_source_gen.go new file mode 100644 index 000000000..0cd9746a8 --- /dev/null +++ b/internal/aws/vpclattice/service_network_vpc_association_singular_data_source_gen.go @@ -0,0 +1,251 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service_network_vpc_association", serviceNetworkVpcAssociationDataSource) +} + +// serviceNetworkVpcAssociationDataSource returns the Terraform awscc_vpclattice_service_network_vpc_association data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::ServiceNetworkVpcAssociation resource. +func serviceNetworkVpcAssociationDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetworkvpcassociation/snva-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 22, + // "minLength": 22, + // "pattern": "^snva-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_vpc_association_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: SecurityGroupIds + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "maxLength": 200, + // "minLength": 0, + // "pattern": "^sg-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // }, + // "type": "array", + // "uniqueItems": true + // } + "security_group_ids": schema.SetAttribute{ /*START ATTRIBUTE*/ + ElementType: types.StringType, + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkId + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^sn-[0-9a-z]{17}$", + // "type": "string" + // } + "service_network_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^((sn-[0-9a-z]{17})|(arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:servicenetwork/sn-[0-9a-z]{17}))$", + // "type": "string" + // } + "service_network_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ServiceNetworkName + // CloudFormation resource type schema: + // + // { + // "maxLength": 63, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "service_network_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATE_IN_PROGRESS", + // "ACTIVE", + // "UPDATE_IN_PROGRESS", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VpcId + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 5, + // "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // } + "vpc_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VpcIdentifier + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 5, + // "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // } + "vpc_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::ServiceNetworkVpcAssociation", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::ServiceNetworkVpcAssociation").WithTerraformTypeName("awscc_vpclattice_service_network_vpc_association") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "created_at": "CreatedAt", + "key": "Key", + "security_group_ids": "SecurityGroupIds", + "service_network_arn": "ServiceNetworkArn", + "service_network_id": "ServiceNetworkId", + "service_network_identifier": "ServiceNetworkIdentifier", + "service_network_name": "ServiceNetworkName", + "service_network_vpc_association_id": "Id", + "status": "Status", + "tags": "Tags", + "value": "Value", + "vpc_id": "VpcId", + "vpc_identifier": "VpcIdentifier", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_network_vpc_association_singular_data_source_gen_test.go b/internal/aws/vpclattice/service_network_vpc_association_singular_data_source_gen_test.go new file mode 100644 index 000000000..6d51b6e7c --- /dev/null +++ b/internal/aws/vpclattice/service_network_vpc_association_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceNetworkVpcAssociationDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkVpcAssociation", "awscc_vpclattice_service_network_vpc_association", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSVpcLatticeServiceNetworkVpcAssociationDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::ServiceNetworkVpcAssociation", "awscc_vpclattice_service_network_vpc_association", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/service_plural_data_source_gen.go b/internal/aws/vpclattice/service_plural_data_source_gen.go new file mode 100644 index 000000000..9e9909e1c --- /dev/null +++ b/internal/aws/vpclattice/service_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_services", servicesDataSource) +} + +// servicesDataSource returns the Terraform awscc_vpclattice_services data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::Service resource. +func servicesDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::Service", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Service").WithTerraformTypeName("awscc_vpclattice_services") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_plural_data_source_gen_test.go b/internal/aws/vpclattice/service_plural_data_source_gen_test.go new file mode 100644 index 000000000..589a46134 --- /dev/null +++ b/internal/aws/vpclattice/service_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServicesDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Service", "awscc_vpclattice_services", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/service_resource_gen.go b/internal/aws/vpclattice/service_resource_gen.go new file mode 100644 index 000000000..c772e0bfc --- /dev/null +++ b/internal/aws/vpclattice/service_resource_gen.go @@ -0,0 +1,335 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_service", serviceResource) +} + +// serviceResource returns the Terraform awscc_vpclattice_service resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::Service resource. +func serviceResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: AuthType + // CloudFormation resource type schema: + // + // { + // "default": "NONE", + // "enum": [ + // "NONE", + // "AWS_IAM" + // ], + // "type": "string" + // } + "auth_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "NONE", + "AWS_IAM", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + generic.StringDefaultValue("NONE"), + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CertificateArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "pattern": "^(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:certificate/[0-9a-z-]+)?$", + // "type": "string" + // } + "certificate_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthAtMost(2048), + stringvalidator.RegexMatches(regexp.MustCompile("^(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:certificate/[0-9a-z-]+)?$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CustomDomainName + // CloudFormation resource type schema: + // + // { + // "maxLength": 255, + // "minLength": 3, + // "type": "string" + // } + "custom_domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 255), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: DnsEntry + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "DomainName": { + // "type": "string" + // }, + // "HostedZoneId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "dns_entry": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DomainName + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HostedZoneId + "hosted_zone_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LastUpdatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "last_updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 40, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 40), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "ACTIVE", + // "CREATE_IN_PROGRESS", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "A service is any software application that can run on instances containers, or serverless functions within an account or virtual private cloud (VPC).", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Service").WithTerraformTypeName("awscc_vpclattice_service") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "auth_type": "AuthType", + "certificate_arn": "CertificateArn", + "created_at": "CreatedAt", + "custom_domain_name": "CustomDomainName", + "dns_entry": "DnsEntry", + "domain_name": "DomainName", + "hosted_zone_id": "HostedZoneId", + "key": "Key", + "last_updated_at": "LastUpdatedAt", + "name": "Name", + "service_id": "Id", + "status": "Status", + "tags": "Tags", + "value": "Value", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_resource_gen_test.go b/internal/aws/vpclattice/service_resource_gen_test.go new file mode 100644 index 000000000..241282fe4 --- /dev/null +++ b/internal/aws/vpclattice/service_resource_gen_test.go @@ -0,0 +1,46 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeService_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Service", "awscc_vpclattice_service", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + ), + }, + { + ResourceName: td.ResourceName, + ImportState: true, + ImportStateVerify: true, + }, + }) +} + +func TestAccAWSVpcLatticeService_disappears(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Service", "awscc_vpclattice_service", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + Check: resource.ComposeTestCheckFunc( + td.CheckExistsInAWS(), + td.DeleteResource(), + ), + ExpectNonEmptyPlan: true, + }, + }) +} diff --git a/internal/aws/vpclattice/service_singular_data_source_gen.go b/internal/aws/vpclattice/service_singular_data_source_gen.go new file mode 100644 index 000000000..08cb64925 --- /dev/null +++ b/internal/aws/vpclattice/service_singular_data_source_gen.go @@ -0,0 +1,245 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_service", serviceDataSource) +} + +// serviceDataSource returns the Terraform awscc_vpclattice_service data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::Service resource. +func serviceDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:service/svc-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: AuthType + // CloudFormation resource type schema: + // + // { + // "default": "NONE", + // "enum": [ + // "NONE", + // "AWS_IAM" + // ], + // "type": "string" + // } + "auth_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CertificateArn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "pattern": "^(arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:certificate/[0-9a-z-]+)?$", + // "type": "string" + // } + "certificate_arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CustomDomainName + // CloudFormation resource type schema: + // + // { + // "maxLength": 255, + // "minLength": 3, + // "type": "string" + // } + "custom_domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: DnsEntry + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "DomainName": { + // "type": "string" + // }, + // "HostedZoneId": { + // "type": "string" + // } + // }, + // "type": "object" + // } + "dns_entry": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: DomainName + "domain_name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HostedZoneId + "hosted_zone_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 21, + // "minLength": 21, + // "pattern": "^svc-[0-9a-z]{17}$", + // "type": "string" + // } + "service_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LastUpdatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "last_updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 40, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "ACTIVE", + // "CREATE_IN_PROGRESS", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::Service", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::Service").WithTerraformTypeName("awscc_vpclattice_service") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "auth_type": "AuthType", + "certificate_arn": "CertificateArn", + "created_at": "CreatedAt", + "custom_domain_name": "CustomDomainName", + "dns_entry": "DnsEntry", + "domain_name": "DomainName", + "hosted_zone_id": "HostedZoneId", + "key": "Key", + "last_updated_at": "LastUpdatedAt", + "name": "Name", + "service_id": "Id", + "status": "Status", + "tags": "Tags", + "value": "Value", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/service_singular_data_source_gen_test.go b/internal/aws/vpclattice/service_singular_data_source_gen_test.go new file mode 100644 index 000000000..f5c753e82 --- /dev/null +++ b/internal/aws/vpclattice/service_singular_data_source_gen_test.go @@ -0,0 +1,40 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeServiceDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Service", "awscc_vpclattice_service", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithEmptyResourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "id", td.ResourceName, "id"), + resource.TestCheckResourceAttrPair(fmt.Sprintf("data.%s", td.ResourceName), "arn", td.ResourceName, "arn"), + ), + }, + }) +} + +func TestAccAWSVpcLatticeServiceDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::Service", "awscc_vpclattice_service", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/vpclattice/target_group_plural_data_source_gen.go b/internal/aws/vpclattice/target_group_plural_data_source_gen.go new file mode 100644 index 000000000..79e730d8b --- /dev/null +++ b/internal/aws/vpclattice/target_group_plural_data_source_gen.go @@ -0,0 +1,54 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-plugin-framework/types" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_target_groups", targetGroupsDataSource) +} + +// targetGroupsDataSource returns the Terraform awscc_vpclattice_target_groups data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::TargetGroup resource. +func targetGroupsDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ + "id": schema.StringAttribute{ + Description: "Uniquely identifies the data source.", + Computed: true, + }, + "ids": schema.SetAttribute{ + Description: "Set of Resource Identifiers.", + ElementType: types.StringType, + Computed: true, + }, + } + + schema := schema.Schema{ + Description: "Plural Data Source schema for AWS::VpcLattice::TargetGroup", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::TargetGroup").WithTerraformTypeName("awscc_vpclattice_target_groups") + opts = opts.WithTerraformSchema(schema) + + v, err := generic.NewPluralDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/target_group_plural_data_source_gen_test.go b/internal/aws/vpclattice/target_group_plural_data_source_gen_test.go new file mode 100644 index 000000000..56eb359fe --- /dev/null +++ b/internal/aws/vpclattice/target_group_plural_data_source_gen_test.go @@ -0,0 +1,27 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/plural-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeTargetGroupsDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::TargetGroup", "awscc_vpclattice_target_groups", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(fmt.Sprintf("data.%s", td.ResourceName), "ids.#"), + ), + }, + }) +} diff --git a/internal/aws/vpclattice/target_group_resource_gen.go b/internal/aws/vpclattice/target_group_resource_gen.go new file mode 100644 index 000000000..86289ae82 --- /dev/null +++ b/internal/aws/vpclattice/target_group_resource_gen.go @@ -0,0 +1,686 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + "regexp" + + "github.com/hashicorp/terraform-plugin-framework-validators/int64validator" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/setvalidator" + "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" + "github.com/hashicorp/terraform-plugin-framework/resource" + "github.com/hashicorp/terraform-plugin-framework/resource/schema" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier" + "github.com/hashicorp/terraform-plugin-framework/schema/validator" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddResourceFactory("awscc_vpclattice_target_group", targetGroupResource) +} + +// targetGroupResource returns the Terraform awscc_vpclattice_target_group resource. +// This Terraform resource corresponds to the CloudFormation AWS::VpcLattice::TargetGroup resource. +func targetGroupResource(ctx context.Context) (resource.Resource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Config + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "HealthCheck": { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "HealthCheckIntervalSeconds": { + // "maximum": 300, + // "minimum": 5, + // "type": "integer" + // }, + // "HealthCheckTimeoutSeconds": { + // "maximum": 120, + // "minimum": 1, + // "type": "integer" + // }, + // "HealthyThresholdCount": { + // "maximum": 10, + // "minimum": 2, + // "type": "integer" + // }, + // "Matcher": { + // "additionalProperties": false, + // "properties": { + // "HttpCode": { + // "maxLength": 2000, + // "minLength": 3, + // "pattern": "^[0-9-,]+$", + // "type": "string" + // } + // }, + // "required": [ + // "HttpCode" + // ], + // "type": "object" + // }, + // "Path": { + // "maxLength": 2048, + // "minLength": 0, + // "pattern": "(^/[a-zA-Z0-9@:%_+.~#?\u0026/=-]*$|(^$))", + // "type": "string" + // }, + // "Port": { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // }, + // "Protocol": { + // "enum": [ + // "HTTP", + // "HTTPS" + // ], + // "type": "string" + // }, + // "ProtocolVersion": { + // "enum": [ + // "HTTP1", + // "HTTP2", + // "GRPC" + // ], + // "type": "string" + // }, + // "UnhealthyThresholdCount": { + // "maximum": 10, + // "minimum": 2, + // "type": "integer" + // } + // }, + // "type": "object" + // }, + // "IpAddressType": { + // "default": "IPV4", + // "enum": [ + // "IPV4", + // "IPV6" + // ], + // "type": "string" + // }, + // "LambdaEventStructureVersion": { + // "enum": [ + // "V1", + // "V2" + // ], + // "type": "string" + // }, + // "Port": { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // }, + // "Protocol": { + // "enum": [ + // "HTTP", + // "HTTPS" + // ], + // "type": "string" + // }, + // "ProtocolVersion": { + // "default": "HTTP1", + // "enum": [ + // "HTTP1", + // "HTTP2", + // "GRPC" + // ], + // "type": "string" + // }, + // "VpcIdentifier": { + // "maxLength": 2048, + // "minLength": 5, + // "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // } + // }, + // "type": "object" + // } + "config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HealthCheck + "health_check": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Bool{ /*START PLAN MODIFIERS*/ + boolplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HealthCheckIntervalSeconds + "health_check_interval_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(5, 300), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HealthCheckTimeoutSeconds + "health_check_timeout_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 120), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: HealthyThresholdCount + "healthy_threshold_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(2, 10), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Matcher + "matcher": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HttpCode + "http_code": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 2000), + stringvalidator.RegexMatches(regexp.MustCompile("^[0-9-,]+$"), ""), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Path + "path": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(0, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("(^/[a-zA-Z0-9@:%_+.~#?&/=-]*$|(^$))"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 65535), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "HTTP", + "HTTPS", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ProtocolVersion + "protocol_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "HTTP1", + "HTTP2", + "GRPC", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: UnhealthyThresholdCount + "unhealthy_threshold_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(2, 10), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: IpAddressType + "ip_address_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "IPV4", + "IPV6", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + generic.StringDefaultValue("IPV4"), + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LambdaEventStructureVersion + "lambda_event_structure_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "V1", + "V2", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 65535), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + int64planmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "HTTP", + "HTTPS", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: ProtocolVersion + "protocol_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "HTTP1", + "HTTP2", + "GRPC", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + generic.StringDefaultValue("HTTP1"), + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: VpcIdentifier + "vpc_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(5, 2048), + stringvalidator.RegexMatches(regexp.MustCompile("^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$"), ""), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Optional: true, + Computed: true, + PlanModifiers: []planmodifier.Object{ /*START PLAN MODIFIERS*/ + objectplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^tg-[0-9a-z]{17}$", + // "type": "string" + // } + "target_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: LastUpdatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "last_updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(3, 128), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATE_IN_PROGRESS", + // "ACTIVE", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 128), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.LengthBetween(1, 256), + }, /*END VALIDATORS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.Set{ /*START VALIDATORS*/ + setvalidator.SizeBetween(0, 50), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Set{ /*START PLAN MODIFIERS*/ + setplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Targets + // CloudFormation resource type schema: + // + // { + // "default": [], + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Id": { + // "type": "string" + // }, + // "Port": { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "Id" + // ], + // "type": "object" + // }, + // "maxItems": 100, + // "minItems": 0, + // "type": "array" + // } + "targets": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Optional: true, + Computed: true, + Validators: []validator.Int64{ /*START VALIDATORS*/ + int64validator.Between(1, 65535), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.Int64{ /*START PLAN MODIFIERS*/ + int64planmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Optional: true, + Computed: true, + Validators: []validator.List{ /*START VALIDATORS*/ + listvalidator.SizeBetween(0, 100), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.List{ /*START PLAN MODIFIERS*/ + generic.Multiset(), + generic.ListOfStringDefaultValue(), + listplanmodifier.UseStateForUnknown(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + // Property: Type + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "IP", + // "LAMBDA", + // "INSTANCE", + // "ALB" + // ], + // "type": "string" + // } + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Required: true, + Validators: []validator.String{ /*START VALIDATORS*/ + stringvalidator.OneOf( + "IP", + "LAMBDA", + "INSTANCE", + "ALB", + ), + }, /*END VALIDATORS*/ + PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ + stringplanmodifier.RequiresReplace(), + }, /*END PLAN MODIFIERS*/ + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + + schema := schema.Schema{ + Description: "A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service.", + Version: 1, + Attributes: attributes, + } + + var opts generic.ResourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::TargetGroup").WithTerraformTypeName("awscc_vpclattice_target_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "config": "Config", + "created_at": "CreatedAt", + "enabled": "Enabled", + "health_check": "HealthCheck", + "health_check_interval_seconds": "HealthCheckIntervalSeconds", + "health_check_timeout_seconds": "HealthCheckTimeoutSeconds", + "healthy_threshold_count": "HealthyThresholdCount", + "http_code": "HttpCode", + "id": "Id", + "ip_address_type": "IpAddressType", + "key": "Key", + "lambda_event_structure_version": "LambdaEventStructureVersion", + "last_updated_at": "LastUpdatedAt", + "matcher": "Matcher", + "name": "Name", + "path": "Path", + "port": "Port", + "protocol": "Protocol", + "protocol_version": "ProtocolVersion", + "status": "Status", + "tags": "Tags", + "target_group_id": "Id", + "targets": "Targets", + "type": "Type", + "unhealthy_threshold_count": "UnhealthyThresholdCount", + "value": "Value", + "vpc_identifier": "VpcIdentifier", + }) + + opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) + + opts = opts.WithUpdateTimeoutInMinutes(0) + + v, err := generic.NewResource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/target_group_resource_gen_test.go b/internal/aws/vpclattice/target_group_resource_gen_test.go new file mode 100644 index 000000000..6f6dbdb68 --- /dev/null +++ b/internal/aws/vpclattice/target_group_resource_gen_test.go @@ -0,0 +1,25 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/resource/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeTargetGroup_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::TargetGroup", "awscc_vpclattice_target_group", "test") + + td.ResourceTest(t, []resource.TestStep{ + { + Config: td.EmptyConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} diff --git a/internal/aws/vpclattice/target_group_singular_data_source_gen.go b/internal/aws/vpclattice/target_group_singular_data_source_gen.go new file mode 100644 index 000000000..fbc330162 --- /dev/null +++ b/internal/aws/vpclattice/target_group_singular_data_source_gen.go @@ -0,0 +1,453 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice + +import ( + "context" + + "github.com/hashicorp/terraform-plugin-framework/datasource" + "github.com/hashicorp/terraform-plugin-framework/datasource/schema" + "github.com/hashicorp/terraform-provider-awscc/internal/generic" + "github.com/hashicorp/terraform-provider-awscc/internal/registry" +) + +func init() { + registry.AddDataSourceFactory("awscc_vpclattice_target_group", targetGroupDataSource) +} + +// targetGroupDataSource returns the Terraform awscc_vpclattice_target_group data source. +// This Terraform data source corresponds to the CloudFormation AWS::VpcLattice::TargetGroup resource. +func targetGroupDataSource(ctx context.Context) (datasource.DataSource, error) { + attributes := map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Arn + // CloudFormation resource type schema: + // + // { + // "maxLength": 2048, + // "minLength": 20, + // "pattern": "^arn:[a-z0-9\\-]+:vpc-lattice:[a-zA-Z0-9\\-]+:\\d{12}:targetgroup/tg-[0-9a-z]{17}$", + // "type": "string" + // } + "arn": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Config + // CloudFormation resource type schema: + // + // { + // "additionalProperties": false, + // "properties": { + // "HealthCheck": { + // "additionalProperties": false, + // "properties": { + // "Enabled": { + // "type": "boolean" + // }, + // "HealthCheckIntervalSeconds": { + // "maximum": 300, + // "minimum": 5, + // "type": "integer" + // }, + // "HealthCheckTimeoutSeconds": { + // "maximum": 120, + // "minimum": 1, + // "type": "integer" + // }, + // "HealthyThresholdCount": { + // "maximum": 10, + // "minimum": 2, + // "type": "integer" + // }, + // "Matcher": { + // "additionalProperties": false, + // "properties": { + // "HttpCode": { + // "maxLength": 2000, + // "minLength": 3, + // "pattern": "^[0-9-,]+$", + // "type": "string" + // } + // }, + // "required": [ + // "HttpCode" + // ], + // "type": "object" + // }, + // "Path": { + // "maxLength": 2048, + // "minLength": 0, + // "pattern": "(^/[a-zA-Z0-9@:%_+.~#?\u0026/=-]*$|(^$))", + // "type": "string" + // }, + // "Port": { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // }, + // "Protocol": { + // "enum": [ + // "HTTP", + // "HTTPS" + // ], + // "type": "string" + // }, + // "ProtocolVersion": { + // "enum": [ + // "HTTP1", + // "HTTP2", + // "GRPC" + // ], + // "type": "string" + // }, + // "UnhealthyThresholdCount": { + // "maximum": 10, + // "minimum": 2, + // "type": "integer" + // } + // }, + // "type": "object" + // }, + // "IpAddressType": { + // "default": "IPV4", + // "enum": [ + // "IPV4", + // "IPV6" + // ], + // "type": "string" + // }, + // "LambdaEventStructureVersion": { + // "enum": [ + // "V1", + // "V2" + // ], + // "type": "string" + // }, + // "Port": { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // }, + // "Protocol": { + // "enum": [ + // "HTTP", + // "HTTPS" + // ], + // "type": "string" + // }, + // "ProtocolVersion": { + // "default": "HTTP1", + // "enum": [ + // "HTTP1", + // "HTTP2", + // "GRPC" + // ], + // "type": "string" + // }, + // "VpcIdentifier": { + // "maxLength": 2048, + // "minLength": 5, + // "pattern": "^vpc-(([0-9a-z]{8})|([0-9a-z]{17}))$", + // "type": "string" + // } + // }, + // "type": "object" + // } + "config": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HealthCheck + "health_check": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Enabled + "enabled": schema.BoolAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HealthCheckIntervalSeconds + "health_check_interval_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HealthCheckTimeoutSeconds + "health_check_timeout_seconds": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: HealthyThresholdCount + "healthy_threshold_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Matcher + "matcher": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: HttpCode + "http_code": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Path + "path": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ProtocolVersion + "protocol_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: UnhealthyThresholdCount + "unhealthy_threshold_count": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: IpAddressType + "ip_address_type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LambdaEventStructureVersion + "lambda_event_structure_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Protocol + "protocol": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: ProtocolVersion + "protocol_version": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: VpcIdentifier + "vpc_identifier": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: CreatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "created_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Id + // CloudFormation resource type schema: + // + // { + // "maxLength": 20, + // "minLength": 20, + // "pattern": "^tg-[0-9a-z]{17}$", + // "type": "string" + // } + "target_group_id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: LastUpdatedAt + // CloudFormation resource type schema: + // + // { + // "type": "string" + // } + "last_updated_at": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Name + // CloudFormation resource type schema: + // + // { + // "maxLength": 128, + // "minLength": 3, + // "pattern": "", + // "type": "string" + // } + "name": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Status + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "CREATE_IN_PROGRESS", + // "ACTIVE", + // "DELETE_IN_PROGRESS", + // "CREATE_FAILED", + // "DELETE_FAILED" + // ], + // "type": "string" + // } + "status": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Tags + // CloudFormation resource type schema: + // + // { + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Key": { + // "maxLength": 128, + // "minLength": 1, + // "type": "string" + // }, + // "Value": { + // "maxLength": 256, + // "minLength": 1, + // "type": "string" + // } + // }, + // "required": [ + // "Key", + // "Value" + // ], + // "type": "object" + // }, + // "maxItems": 50, + // "minItems": 0, + // "type": "array", + // "uniqueItems": true + // } + "tags": schema.SetNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Key + "key": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Value + "value": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Targets + // CloudFormation resource type schema: + // + // { + // "default": [], + // "insertionOrder": false, + // "items": { + // "additionalProperties": false, + // "properties": { + // "Id": { + // "type": "string" + // }, + // "Port": { + // "maximum": 65535, + // "minimum": 1, + // "type": "integer" + // } + // }, + // "required": [ + // "Id" + // ], + // "type": "object" + // }, + // "maxItems": 100, + // "minItems": 0, + // "type": "array" + // } + "targets": schema.ListNestedAttribute{ /*START ATTRIBUTE*/ + NestedObject: schema.NestedAttributeObject{ /*START NESTED OBJECT*/ + Attributes: map[string]schema.Attribute{ /*START SCHEMA*/ + // Property: Id + "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Port + "port": schema.Int64Attribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + }, /*END SCHEMA*/ + }, /*END NESTED OBJECT*/ + Computed: true, + }, /*END ATTRIBUTE*/ + // Property: Type + // CloudFormation resource type schema: + // + // { + // "enum": [ + // "IP", + // "LAMBDA", + // "INSTANCE", + // "ALB" + // ], + // "type": "string" + // } + "type": schema.StringAttribute{ /*START ATTRIBUTE*/ + Computed: true, + }, /*END ATTRIBUTE*/ + } /*END SCHEMA*/ + + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Required: true, + } + + schema := schema.Schema{ + Description: "Data Source schema for AWS::VpcLattice::TargetGroup", + Attributes: attributes, + } + + var opts generic.DataSourceOptions + + opts = opts.WithCloudFormationTypeName("AWS::VpcLattice::TargetGroup").WithTerraformTypeName("awscc_vpclattice_target_group") + opts = opts.WithTerraformSchema(schema) + opts = opts.WithAttributeNameMap(map[string]string{ + "arn": "Arn", + "config": "Config", + "created_at": "CreatedAt", + "enabled": "Enabled", + "health_check": "HealthCheck", + "health_check_interval_seconds": "HealthCheckIntervalSeconds", + "health_check_timeout_seconds": "HealthCheckTimeoutSeconds", + "healthy_threshold_count": "HealthyThresholdCount", + "http_code": "HttpCode", + "id": "Id", + "ip_address_type": "IpAddressType", + "key": "Key", + "lambda_event_structure_version": "LambdaEventStructureVersion", + "last_updated_at": "LastUpdatedAt", + "matcher": "Matcher", + "name": "Name", + "path": "Path", + "port": "Port", + "protocol": "Protocol", + "protocol_version": "ProtocolVersion", + "status": "Status", + "tags": "Tags", + "target_group_id": "Id", + "targets": "Targets", + "type": "Type", + "unhealthy_threshold_count": "UnhealthyThresholdCount", + "value": "Value", + "vpc_identifier": "VpcIdentifier", + }) + + v, err := generic.NewSingularDataSource(ctx, opts...) + + if err != nil { + return nil, err + } + + return v, nil +} diff --git a/internal/aws/vpclattice/target_group_singular_data_source_gen_test.go b/internal/aws/vpclattice/target_group_singular_data_source_gen_test.go new file mode 100644 index 000000000..bc3324483 --- /dev/null +++ b/internal/aws/vpclattice/target_group_singular_data_source_gen_test.go @@ -0,0 +1,36 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. + +package vpclattice_test + +import ( + "regexp" + "testing" + + "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/hashicorp/terraform-provider-awscc/internal/acctest" +) + +func TestAccAWSVpcLatticeTargetGroupDataSource_basic(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::TargetGroup", "awscc_vpclattice_target_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.EmptyDataSourceConfig(), + ExpectError: regexp.MustCompile("Missing required argument"), + }, + }) +} + +func TestAccAWSVpcLatticeTargetGroupDataSource_NonExistent(t *testing.T) { + td := acctest.NewTestData(t, "AWS::VpcLattice::TargetGroup", "awscc_vpclattice_target_group", "test") + + td.DataSourceTest(t, []resource.TestStep{ + { + Config: td.DataSourceWithNonExistentIDConfig(), + ExpectError: regexp.MustCompile("Not Found"), + }, + }) +} diff --git a/internal/aws/wafv2/ip_set_resource_gen.go b/internal/aws/wafv2/ip_set_resource_gen.go index 63eac66f2..e3acc8929 100644 --- a/internal/aws/wafv2/ip_set_resource_gen.go +++ b/internal/aws/wafv2/ip_set_resource_gen.go @@ -115,7 +115,7 @@ func iPSetResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "ip_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the IPSet", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -227,6 +227,15 @@ func iPSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Contains a list of IP addresses. This can be either IPV4 or IPV6. The list will be mutually", Version: 1, @@ -237,13 +246,12 @@ func iPSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::WAFv2::IPSet").WithTerraformTypeName("awscc_wafv2_ip_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "addresses": "Addresses", "arn": "Arn", "description": "Description", - "id": "Id", "ip_address_version": "IPAddressVersion", + "ip_set_id": "Id", "key": "Key", "name": "Name", "scope": "Scope", diff --git a/internal/aws/wafv2/ip_set_singular_data_source_gen.go b/internal/aws/wafv2/ip_set_singular_data_source_gen.go index 6e66a6d2d..e145a0b74 100644 --- a/internal/aws/wafv2/ip_set_singular_data_source_gen.go +++ b/internal/aws/wafv2/ip_set_singular_data_source_gen.go @@ -87,7 +87,7 @@ func iPSetDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "ip_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the IPSet", Computed: true, }, /*END ATTRIBUTE*/ @@ -176,8 +176,8 @@ func iPSetDataSource(ctx context.Context) (datasource.DataSource, error) { "addresses": "Addresses", "arn": "Arn", "description": "Description", - "id": "Id", "ip_address_version": "IPAddressVersion", + "ip_set_id": "Id", "key": "Key", "name": "Name", "scope": "Scope", diff --git a/internal/aws/wafv2/logging_configuration_resource_gen.go b/internal/aws/wafv2/logging_configuration_resource_gen.go index c97e181f3..2e7e03107 100644 --- a/internal/aws/wafv2/logging_configuration_resource_gen.go +++ b/internal/aws/wafv2/logging_configuration_resource_gen.go @@ -387,6 +387,7 @@ func loggingConfigurationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -405,7 +406,6 @@ func loggingConfigurationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::WAFv2::LoggingConfiguration").WithTerraformTypeName("awscc_wafv2_logging_configuration") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "action": "Action", "action_condition": "ActionCondition", diff --git a/internal/aws/wafv2/regex_pattern_set_resource_gen.go b/internal/aws/wafv2/regex_pattern_set_resource_gen.go index 315ebb2d5..b085eef56 100644 --- a/internal/aws/wafv2/regex_pattern_set_resource_gen.go +++ b/internal/aws/wafv2/regex_pattern_set_resource_gen.go @@ -71,7 +71,7 @@ func regexPatternSetResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "regex_pattern_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the RegexPatternSet", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -196,6 +196,15 @@ func regexPatternSetResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Contains a list of Regular expressions based on the provided inputs. RegexPatternSet can be used with other WAF entities with RegexPatternSetReferenceStatement to perform other actions .", Version: 1, @@ -206,13 +215,12 @@ func regexPatternSetResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::WAFv2::RegexPatternSet").WithTerraformTypeName("awscc_wafv2_regex_pattern_set") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", + "regex_pattern_set_id": "Id", "regular_expression_list": "RegularExpressionList", "scope": "Scope", "tags": "Tags", diff --git a/internal/aws/wafv2/regex_pattern_set_singular_data_source_gen.go b/internal/aws/wafv2/regex_pattern_set_singular_data_source_gen.go index 2819494ab..cd613bdd1 100644 --- a/internal/aws/wafv2/regex_pattern_set_singular_data_source_gen.go +++ b/internal/aws/wafv2/regex_pattern_set_singular_data_source_gen.go @@ -54,7 +54,7 @@ func regexPatternSetDataSource(ctx context.Context) (datasource.DataSource, erro // "pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "regex_pattern_set_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Id of the RegexPatternSet", Computed: true, }, /*END ATTRIBUTE*/ @@ -155,9 +155,9 @@ func regexPatternSetDataSource(ctx context.Context) (datasource.DataSource, erro opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "description": "Description", - "id": "Id", "key": "Key", "name": "Name", + "regex_pattern_set_id": "Id", "regular_expression_list": "RegularExpressionList", "scope": "Scope", "tags": "Tags", diff --git a/internal/aws/wafv2/web_acl_association_resource_gen.go b/internal/aws/wafv2/web_acl_association_resource_gen.go index 752b0fca8..4c4c230a8 100644 --- a/internal/aws/wafv2/web_acl_association_resource_gen.go +++ b/internal/aws/wafv2/web_acl_association_resource_gen.go @@ -62,6 +62,7 @@ func webACLAssociationResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -80,7 +81,6 @@ func webACLAssociationResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::WAFv2::WebACLAssociation").WithTerraformTypeName("awscc_wafv2_web_acl_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "resource_arn": "ResourceArn", "web_acl_arn": "WebACLArn", diff --git a/internal/aws/wisdom/assistant_association_resource_gen.go b/internal/aws/wisdom/assistant_association_resource_gen.go index e5be0e6c0..8bff074d0 100644 --- a/internal/aws/wisdom/assistant_association_resource_gen.go +++ b/internal/aws/wisdom/assistant_association_resource_gen.go @@ -192,6 +192,7 @@ func assistantAssociationResource(ctx context.Context) (resource.Resource, error }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -210,7 +211,6 @@ func assistantAssociationResource(ctx context.Context) (resource.Resource, error opts = opts.WithCloudFormationTypeName("AWS::Wisdom::AssistantAssociation").WithTerraformTypeName("awscc_wisdom_assistant_association") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "assistant_arn": "AssistantArn", "assistant_association_arn": "AssistantAssociationArn", diff --git a/internal/aws/wisdom/assistant_resource_gen.go b/internal/aws/wisdom/assistant_resource_gen.go index 2901d0bf7..c8e6464b9 100644 --- a/internal/aws/wisdom/assistant_resource_gen.go +++ b/internal/aws/wisdom/assistant_resource_gen.go @@ -202,6 +202,7 @@ func assistantResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -220,7 +221,6 @@ func assistantResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Wisdom::Assistant").WithTerraformTypeName("awscc_wisdom_assistant") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "assistant_arn": "AssistantArn", "assistant_id": "AssistantId", diff --git a/internal/aws/wisdom/knowledge_base_resource_gen.go b/internal/aws/wisdom/knowledge_base_resource_gen.go index 83e27689e..5ce5d3329 100644 --- a/internal/aws/wisdom/knowledge_base_resource_gen.go +++ b/internal/aws/wisdom/knowledge_base_resource_gen.go @@ -328,6 +328,7 @@ func knowledgeBaseResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -346,7 +347,6 @@ func knowledgeBaseResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::Wisdom::KnowledgeBase").WithTerraformTypeName("awscc_wisdom_knowledge_base") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "app_integration_arn": "AppIntegrationArn", "app_integrations": "AppIntegrations", diff --git a/internal/aws/workspaces/connection_alias_resource_gen.go b/internal/aws/workspaces/connection_alias_resource_gen.go index 68ff3d104..042ccce8c 100644 --- a/internal/aws/workspaces/connection_alias_resource_gen.go +++ b/internal/aws/workspaces/connection_alias_resource_gen.go @@ -189,6 +189,7 @@ func connectionAliasResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -207,7 +208,6 @@ func connectionAliasResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::WorkSpaces::ConnectionAlias").WithTerraformTypeName("awscc_workspaces_connection_alias") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "alias_id": "AliasId", "associated_account_id": "AssociatedAccountId", diff --git a/internal/aws/workspacesthinclient/environment_resource_gen.go b/internal/aws/workspacesthinclient/environment_resource_gen.go index a97ab26f2..077c5507d 100644 --- a/internal/aws/workspacesthinclient/environment_resource_gen.go +++ b/internal/aws/workspacesthinclient/environment_resource_gen.go @@ -168,7 +168,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { // "pattern": "^[a-z0-9]{9}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "environment_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique identifier of the environment.", Computed: true, PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/ @@ -594,6 +594,15 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. + attributes["id"] = schema.StringAttribute{ + Description: "Uniquely identifies the resource.", + Computed: true, + PlanModifiers: []planmodifier.String{ + stringplanmodifier.UseStateForUnknown(), + }, + } + schema := schema.Schema{ Description: "Resource type definition for AWS::WorkSpacesThinClient::Environment.", Version: 1, @@ -604,7 +613,6 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::WorkSpacesThinClient::Environment").WithTerraformTypeName("awscc_workspacesthinclient_environment") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "activation_code": "ActivationCode", "apply_time_of": "ApplyTimeOf", @@ -617,7 +625,7 @@ func environmentResource(ctx context.Context) (resource.Resource, error) { "desktop_type": "DesktopType", "end_time_hour": "EndTimeHour", "end_time_minute": "EndTimeMinute", - "id": "Id", + "environment_id": "Id", "key": "Key", "kms_key_arn": "KmsKeyArn", "maintenance_window": "MaintenanceWindow", diff --git a/internal/aws/workspacesthinclient/environment_singular_data_source_gen.go b/internal/aws/workspacesthinclient/environment_singular_data_source_gen.go index 377d7f0ba..c887cbf84 100644 --- a/internal/aws/workspacesthinclient/environment_singular_data_source_gen.go +++ b/internal/aws/workspacesthinclient/environment_singular_data_source_gen.go @@ -124,7 +124,7 @@ func environmentDataSource(ctx context.Context) (datasource.DataSource, error) { // "pattern": "^[a-z0-9]{9}$", // "type": "string" // } - "id": schema.StringAttribute{ /*START ATTRIBUTE*/ + "environment_id": schema.StringAttribute{ /*START ATTRIBUTE*/ Description: "Unique identifier of the environment.", Computed: true, }, /*END ATTRIBUTE*/ @@ -442,7 +442,7 @@ func environmentDataSource(ctx context.Context) (datasource.DataSource, error) { "desktop_type": "DesktopType", "end_time_hour": "EndTimeHour", "end_time_minute": "EndTimeMinute", - "id": "Id", + "environment_id": "Id", "key": "Key", "kms_key_arn": "KmsKeyArn", "maintenance_window": "MaintenanceWindow", diff --git a/internal/aws/xray/group_resource_gen.go b/internal/aws/xray/group_resource_gen.go index dac26f96d..64771ec13 100644 --- a/internal/aws/xray/group_resource_gen.go +++ b/internal/aws/xray/group_resource_gen.go @@ -171,6 +171,7 @@ func groupResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -189,7 +190,6 @@ func groupResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::XRay::Group").WithTerraformTypeName("awscc_xray_group") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "filter_expression": "FilterExpression", "group_arn": "GroupARN", diff --git a/internal/aws/xray/resource_policy_resource_gen.go b/internal/aws/xray/resource_policy_resource_gen.go index a38acc67b..11c435351 100644 --- a/internal/aws/xray/resource_policy_resource_gen.go +++ b/internal/aws/xray/resource_policy_resource_gen.go @@ -83,6 +83,7 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -101,7 +102,6 @@ func resourcePolicyResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::XRay::ResourcePolicy").WithTerraformTypeName("awscc_xray_resource_policy") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "bypass_policy_lockout_check": "BypassPolicyLockoutCheck", "policy_document": "PolicyDocument", diff --git a/internal/aws/xray/sampling_rule_resource_gen.go b/internal/aws/xray/sampling_rule_resource_gen.go index 6e205896a..dacfd5384 100644 --- a/internal/aws/xray/sampling_rule_resource_gen.go +++ b/internal/aws/xray/sampling_rule_resource_gen.go @@ -824,6 +824,7 @@ func samplingRuleResource(ctx context.Context) (resource.Resource, error) { }, /*END ATTRIBUTE*/ } /*END SCHEMA*/ + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -842,7 +843,6 @@ func samplingRuleResource(ctx context.Context) (resource.Resource, error) { opts = opts.WithCloudFormationTypeName("AWS::XRay::SamplingRule").WithTerraformTypeName("awscc_xray_sampling_rule") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attributes": "Attributes", "created_at": "CreatedAt", diff --git a/internal/generic/resource.go b/internal/generic/resource.go index 35b54abed..368749d34 100644 --- a/internal/generic/resource.go +++ b/internal/generic/resource.go @@ -105,18 +105,6 @@ func resourceIsImmutableType(v bool) ResourceOptionsFunc { } } -// resourceWithSyntheticIDAttribute is a helper function to construct functional options -// that set a resource type's synthetic ID attribute flag. -// If multiple resourceWithSyntheticIDAttribute calls are made, the last call overrides -// the previous calls' values. -func resourceWithSyntheticIDAttribute(v bool) ResourceOptionsFunc { - return func(o *genericResource) error { - o.syntheticIDAttribute = v - - return nil - } -} - // resourceWithWriteOnlyPropertyPaths is a helper function to construct functional options // that set a resource type's write-only property paths (JSON Pointer). // If multiple resourceWithWriteOnlyPropertyPaths calls are made, the last call overrides @@ -251,14 +239,6 @@ func (opts ResourceOptions) IsImmutableType(v bool) ResourceOptions { return append(opts, resourceIsImmutableType(v)) } -// WithSyntheticIDAttribute is a helper function to construct functional options -// that set a resource type's synthetic ID attribute flag, append that function to the -// current slice of functional options and return the new slice of options. -// It is intended to be chained with other similar helper functions in a builder pattern. -func (opts ResourceOptions) WithSyntheticIDAttribute(v bool) ResourceOptions { - return append(opts, resourceWithSyntheticIDAttribute(v)) -} - // WithWriteOnlyPropertyPaths is a helper function to construct functional options // that set a resource type's write-only property paths, append that function to the // current slice of functional options and return the new slice of options. @@ -330,7 +310,6 @@ type genericResource struct { tfToCfNameMap map[string]string // Map of Terraform attribute name to CloudFormation property name cfToTfNameMap map[string]string // Map of CloudFormation property name to Terraform attribute name isImmutableType bool // Resources cannot be updated and must be recreated - syntheticIDAttribute bool // Resource type has a synthetic ID attribute writeOnlyAttributePaths []*path.Path // Paths to any write-only attributes createTimeout time.Duration // Maximum wait time for resource creation updateTimeout time.Duration // Maximum wait time for resource update @@ -432,13 +411,11 @@ func (r *genericResource) Create(ctx context.Context, request resource.CreateReq // Produce a wholly-known new State by determining the final values for any attributes left unknown in the planned state. response.State.Raw = request.Plan.Raw - // Set the synthetic "id" attribute. - if r.syntheticIDAttribute { - if err = r.setId(ctx, id, &response.State); err != nil { - response.Diagnostics.Append(ResourceIdentifierNotSetDiag(err)) + // Set the "id" attribute. + if err = r.setId(ctx, id, &response.State); err != nil { + response.Diagnostics.Append(ResourceIdentifierNotSetDiag(err)) - return - } + return } response.Diagnostics.Append(r.populateUnknownValues(ctx, id, &response.State)...) @@ -516,12 +493,10 @@ func (r *genericResource) Read(ctx context.Context, request resource.ReadRequest } // Set the "id" attribute. - if r.syntheticIDAttribute { - if err := r.setId(ctx, id, &response.State); err != nil { - response.Diagnostics.Append(ResourceIdentifierNotSetDiag(err)) + if err := r.setId(ctx, id, &response.State); err != nil { + response.Diagnostics.Append(ResourceIdentifierNotSetDiag(err)) - return - } + return } tflog.Debug(ctx, "Response.State.Raw", map[string]interface{}{ diff --git a/internal/provider/all_schemas.hcl b/internal/provider/all_schemas.hcl index 7736e0421..1ba4fac7b 100644 --- a/internal/provider/all_schemas.hcl +++ b/internal/provider/all_schemas.hcl @@ -105,11 +105,6 @@ resource_schema "aws_apigateway_authorizer" { resource_schema "aws_apigateway_base_path_mapping" { cloudformation_type_name = "AWS::ApiGateway::BasePathMapping" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_apigateway_client_certificate" { @@ -274,11 +269,6 @@ resource_schema "aws_appflow_flow" { resource_schema "aws_appintegrations_application" { cloudformation_type_name = "AWS::AppIntegrations::Application" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_appintegrations_data_integration" { @@ -296,11 +286,6 @@ resource_schema "aws_appintegrations_event_integration" { resource_schema "aws_applicationautoscaling_scalable_target" { cloudformation_type_name = "AWS::ApplicationAutoScaling::ScalableTarget" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_applicationautoscaling_scaling_policy" { @@ -665,11 +650,6 @@ resource_schema "aws_cloudfront_key_group" { resource_schema "aws_cloudfront_key_value_store" { cloudformation_type_name = "AWS::CloudFront::KeyValueStore" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_cloudfront_monitoring_subscription" { @@ -892,11 +872,6 @@ resource_schema "aws_connect_hours_of_operation" { resource_schema "aws_connect_instance" { cloudformation_type_name = "AWS::Connect::Instance" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_connect_instance_storage_config" { @@ -1491,11 +1466,6 @@ resource_schema "aws_ec2_vpc_cidr_block" { resource_schema "aws_ec2_vpcdhcp_options_association" { cloudformation_type_name = "AWS::EC2::VPCDHCPOptionsAssociation" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_ec2_vpc_endpoint" { @@ -1972,11 +1942,6 @@ resource_schema "aws_greengrassv2_deployment" { resource_schema "aws_groundstation_config" { cloudformation_type_name = "AWS::GroundStation::Config" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_groundstation_dataflow_endpoint_group" { @@ -2098,20 +2063,10 @@ resource_schema "aws_ivs_stream_key" { resource_schema "aws_ivschat_logging_configuration" { cloudformation_type_name = "AWS::IVSChat::LoggingConfiguration" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_ivschat_room" { cloudformation_type_name = "AWS::IVSChat::Room" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_identitystore_group" { @@ -2197,11 +2152,6 @@ resource_schema "aws_iot_authorizer" { resource_schema "aws_iot_billing_group" { cloudformation_type_name = "AWS::IoT::BillingGroup" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iot_ca_certificate" { @@ -2279,29 +2229,14 @@ resource_schema "aws_iot_software_package_version" { resource_schema "aws_iot_thing" { cloudformation_type_name = "AWS::IoT::Thing" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iot_thing_group" { cloudformation_type_name = "AWS::IoT::ThingGroup" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iot_thing_type" { cloudformation_type_name = "AWS::IoT::ThingType" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iot_topic_rule" { @@ -2314,38 +2249,18 @@ resource_schema "aws_iot_topic_rule_destination" { resource_schema "aws_iotanalytics_channel" { cloudformation_type_name = "AWS::IoTAnalytics::Channel" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iotanalytics_dataset" { cloudformation_type_name = "AWS::IoTAnalytics::Dataset" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iotanalytics_datastore" { cloudformation_type_name = "AWS::IoTAnalytics::Datastore" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iotanalytics_pipeline" { cloudformation_type_name = "AWS::IoTAnalytics::Pipeline" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_iotcoredeviceadvisor_suite_definition" { @@ -3142,11 +3057,6 @@ resource_schema "aws_omics_sequence_store" { resource_schema "aws_omics_variant_store" { cloudformation_type_name = "AWS::Omics::VariantStore" - - # "top-level property Id is not a primary identifier". - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_omics_workflow" { @@ -3181,20 +3091,10 @@ resource_schema "aws_opensearchserverless_vpc_endpoint" { resource_schema "aws_opensearchservice_domain" { cloudformation_type_name = "AWS::OpenSearchService::Domain" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_opsworkscm_server" { cloudformation_type_name = "AWS::OpsWorksCM::Server" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_organizations_account" { @@ -3283,11 +3183,6 @@ resource_schema "aws_pipes_pipe" { resource_schema "aws_proton_environment_account_connection" { cloudformation_type_name = "AWS::Proton::EnvironmentAccountConnection" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_proton_environment_template" { @@ -3411,11 +3306,6 @@ resource_schema "aws_rum_app_monitor" { resource_schema "aws_redshift_cluster" { cloudformation_type_name = "AWS::Redshift::Cluster" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_redshift_cluster_parameter_group" { @@ -3717,11 +3607,6 @@ resource_schema "aws_s3outposts_bucket_policy" { resource_schema "aws_s3outposts_endpoint" { cloudformation_type_name = "AWS::S3Outposts::Endpoint" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_ses_configuration_set" { @@ -3756,11 +3641,6 @@ resource_schema "aws_ses_vdm_attributes" { resource_schema "aws_sns_topic" { cloudformation_type_name = "AWS::SNS::Topic" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_sns_topic_inline_policy" { @@ -4082,20 +3962,10 @@ resource_schema "aws_supportapp_slack_workspace_configuration" { resource_schema "aws_synthetics_canary" { cloudformation_type_name = "AWS::Synthetics::Canary" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_synthetics_group" { cloudformation_type_name = "AWS::Synthetics::Group" - - # Top-level "Id" property is not a primary identifier. - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_systemsmanagersap_application" { @@ -4160,11 +4030,6 @@ resource_schema "aws_verifiedpermissions_policy_template" { resource_schema "aws_vpclattice_access_log_subscription" { cloudformation_type_name = "AWS::VpcLattice::AccessLogSubscription" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_auth_policy" { @@ -4174,11 +4039,6 @@ resource_schema "aws_vpclattice_auth_policy" { resource_schema "aws_vpclattice_listener" { cloudformation_type_name = "AWS::VpcLattice::Listener" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_resource_policy" { @@ -4188,56 +4048,26 @@ resource_schema "aws_vpclattice_resource_policy" { resource_schema "aws_vpclattice_rule" { cloudformation_type_name = "AWS::VpcLattice::Rule" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_service" { cloudformation_type_name = "AWS::VpcLattice::Service" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_service_network" { cloudformation_type_name = "AWS::VpcLattice::ServiceNetwork" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_service_network_service_association" { cloudformation_type_name = "AWS::VpcLattice::ServiceNetworkServiceAssociation" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_service_network_vpc_association" { cloudformation_type_name = "AWS::VpcLattice::ServiceNetworkVpcAssociation" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_vpclattice_target_group" { cloudformation_type_name = "AWS::VpcLattice::TargetGroup" - - # top-level property Id is not a primary identifier - suppress_resource_generation = true - suppress_singular_data_source_generation = true - suppress_plural_data_source_generation = true } resource_schema "aws_wafv2_ip_set" { diff --git a/internal/provider/generators/resource/schema.tmpl b/internal/provider/generators/resource/schema.tmpl index 649df578f..e9baba396 100644 --- a/internal/provider/generators/resource/schema.tmpl +++ b/internal/provider/generators/resource/schema.tmpl @@ -47,7 +47,7 @@ func init() { func {{ .FactoryFunctionName }}(ctx context.Context) (resource.Resource, error) { attributes := {{ .RootPropertiesSchema }} -{{ if .SyntheticIDAttribute }} + // Corresponds to CloudFormation primaryIdentifier. attributes["id"] = schema.StringAttribute{ Description: "Uniquely identifies the resource.", Computed: true, @@ -55,7 +55,6 @@ func {{ .FactoryFunctionName }}(ctx context.Context) (resource.Resource, error) stringplanmodifier.UseStateForUnknown(), }, } -{{- end }} schema := schema.Schema{ Description: {{ .SchemaDescription | printf "%q" }}, @@ -67,7 +66,6 @@ func {{ .FactoryFunctionName }}(ctx context.Context) (resource.Resource, error) opts = opts.WithCloudFormationTypeName("{{ .CloudFormationTypeName }}").WithTerraformTypeName("{{ .TerraformTypeName }}") opts = opts.WithTerraformSchema(schema) - opts = opts.WithSyntheticIDAttribute({{ .SyntheticIDAttribute }}) opts = opts.WithAttributeNameMap(map[string]string{ {{- range $key, $value := .AttributeNameMap }} "{{ $key }}": "{{ $value }}", diff --git a/internal/provider/generators/shared/codegen/emitter.go b/internal/provider/generators/shared/codegen/emitter.go index 4c993b091..646b9935e 100644 --- a/internal/provider/generators/shared/codegen/emitter.go +++ b/internal/provider/generators/shared/codegen/emitter.go @@ -19,7 +19,6 @@ import ( // Features of the emitted code. type Features struct { - HasIDRootProperty bool // Has a root property named "id". HasRequiredRootProperty bool // At least one root property is required. HasUpdatableProperty bool // At least one property can be updated. HasValidator bool // At least one validator. @@ -39,7 +38,6 @@ func (f Features) LogicalOr(features Features) Features { result.FrameworkPlanModifierPackages = append(result.FrameworkPlanModifierPackages, features.FrameworkPlanModifierPackages...) result.FrameworkValidatorsPackages = slices.Clone(f.FrameworkValidatorsPackages) result.FrameworkValidatorsPackages = append(result.FrameworkValidatorsPackages, features.FrameworkValidatorsPackages...) - result.HasIDRootProperty = f.HasIDRootProperty || features.HasIDRootProperty result.HasRequiredRootProperty = f.HasRequiredRootProperty || features.HasRequiredRootProperty result.HasUpdatableProperty = f.HasUpdatableProperty || features.HasUpdatableProperty result.HasValidator = f.HasValidator || features.HasValidator @@ -79,30 +77,17 @@ type parent struct { // EmitRootPropertiesSchema generates the Terraform Plugin SDK code for a CloudFormation root schema // and emits the generated code to the emitter's Writer. Code features are returned. // The root schema is the map of root property names to Attributes. -func (e Emitter) EmitRootPropertiesSchema(attributeNameMap map[string]string) (Features, error) { +func (e Emitter) EmitRootPropertiesSchema(tfType string, attributeNameMap map[string]string) (Features, error) { var features Features cfResource := e.CfResource - features, err := e.emitSchema(attributeNameMap, parent{reqd: cfResource}, cfResource.Properties) + features, err := e.emitSchema(tfType, attributeNameMap, parent{reqd: cfResource}, cfResource.Properties) if err != nil { return features, err } - for name, property := range cfResource.Properties { - if naming.CloudFormationPropertyToTerraformAttribute(name) == "id" { - // Ensure that any schema-declared top-level ID property is of type String and is the primary identifier. - if propertyType := property.Type.String(); propertyType != cfschema.PropertyTypeString { - return features, fmt.Errorf("top-level property %s has type: %s", name, propertyType) - } - - if !cfResource.PrimaryIdentifier.ContainsPath([]string{name}) { - return features, fmt.Errorf("top-level property %s is not a primary identifier", name) - } - - features.HasIDRootProperty = true - } - + for name := range cfResource.Properties { for _, tfMetaArgument := range tfMetaArguments { if naming.CloudFormationPropertyToTerraformAttribute(name) == tfMetaArgument { return features, fmt.Errorf("top-level property %s conflicts with Terraform meta-argument: %s", name, tfMetaArgument) @@ -119,7 +104,7 @@ func (e Emitter) EmitRootPropertiesSchema(attributeNameMap map[string]string) (F // emitAttribute generates the Terraform Plugin SDK code for a CloudFormation property's Attributes // and emits the generated code to the emitter's Writer. Code features are returned. -func (e Emitter) emitAttribute(attributeNameMap map[string]string, path []string, name string, property *cfschema.Property, required, parentComputedOnly bool) (Features, error) { +func (e Emitter) emitAttribute(tfType string, attributeNameMap map[string]string, path []string, name string, property *cfschema.Property, required, parentComputedOnly bool) (Features, error) { var features Features var validators []string var planModifiers []string @@ -284,6 +269,7 @@ func (e Emitter) emitAttribute(attributeNameMap map[string]string, path []string e.printf("Attributes:") f, err := e.emitSchema( + tfType, attributeNameMap, parent{ computedOnly: computedOnly, @@ -399,6 +385,7 @@ func (e Emitter) emitAttribute(attributeNameMap map[string]string, path []string e.printf("Attributes:") f, err := e.emitSchema( + tfType, attributeNameMap, parent{ computedOnly: computedOnly, @@ -611,6 +598,7 @@ func (e Emitter) emitAttribute(attributeNameMap map[string]string, path []string e.printf("Attributes:") f, err := e.emitSchema( + tfType, attributeNameMap, parent{ computedOnly: computedOnly, @@ -672,6 +660,7 @@ func (e Emitter) emitAttribute(attributeNameMap map[string]string, path []string e.printf("schema.SingleNestedAttribute{/*START ATTRIBUTE*/\n") e.printf("Attributes:") f, err := e.emitSchema( + tfType, attributeNameMap, parent{ computedOnly: computedOnly, @@ -775,7 +764,7 @@ func (e Emitter) emitAttribute(attributeNameMap map[string]string, path []string // and emits the generated code to the emitter's Writer. Code features are returned. // A schema is a map of property names to Attributes. // Property names are sorted prior to code generation to reduce diffs. -func (e Emitter) emitSchema(attributeNameMap map[string]string, parent parent, properties map[string]*cfschema.Property) (Features, error) { +func (e Emitter) emitSchema(tfType string, attributeNameMap map[string]string, parent parent, properties map[string]*cfschema.Property) (Features, error) { names := make([]string, 0) for name := range properties { names = append(names, name) @@ -787,13 +776,30 @@ func (e Emitter) emitSchema(attributeNameMap map[string]string, parent parent, p e.printf("map[string]schema.Attribute{/*START SCHEMA*/\n") for _, name := range names { tfAttributeName := naming.CloudFormationPropertyToTerraformAttribute(name) - cfPropertyName, ok := attributeNameMap[tfAttributeName] - if ok { - if cfPropertyName != name { - return features, fmt.Errorf("%s overwrites %s for Terraform attribute %s", name, cfPropertyName, tfAttributeName) + + if len(parent.path) == 0 && tfAttributeName == "id" { + // Terraform uses "id" as the attribute name for the resource's primary identifier. + // If the resource has its own "Id" property, swap in a new Terraform attribute name. + const ( + partCount = 3 + ) + parts := strings.SplitN(tfType, "_", partCount) + // "awscc_wafv2_regex_pattern_set" -> "regex_pattern_set" + relativeTfType := parts[2] + tfAttributeName = relativeTfType + "_id" + if _, ok := attributeNameMap[tfAttributeName]; ok { + return features, fmt.Errorf("top-level property %s conflicts with id", tfAttributeName) } - } else { attributeNameMap[tfAttributeName] = name + } else { + cfPropertyName, ok := attributeNameMap[tfAttributeName] + if ok { + if cfPropertyName != name { + return features, fmt.Errorf("%s overwrites %s for Terraform attribute %s", name, cfPropertyName, tfAttributeName) + } + } else { + attributeNameMap[tfAttributeName] = name + } } e.printf("// Property: %s\n", name) @@ -808,6 +814,7 @@ func (e Emitter) emitSchema(attributeNameMap map[string]string, parent parent, p e.printf("%q:", tfAttributeName) f, err := e.emitAttribute( + tfType, attributeNameMap, append(parent.path, name), name, diff --git a/internal/provider/generators/shared/template_data.go b/internal/provider/generators/shared/template_data.go index e1a10e8e6..65739264b 100644 --- a/internal/provider/generators/shared/template_data.go +++ b/internal/provider/generators/shared/template_data.go @@ -53,7 +53,7 @@ func GenerateTemplateData(ui cli.Ui, cfTypeSchemaFile, resType, tfResourceType, // Generate code for the CloudFormation root properties schema. attributeNameMap := make(map[string]string) // Terraform attribute name to CloudFormation property name. - codeFeatures, err := codeEmitter.EmitRootPropertiesSchema(attributeNameMap) + codeFeatures, err := codeEmitter.EmitRootPropertiesSchema(resource.TfType, attributeNameMap) if err != nil { return nil, fmt.Errorf("emitting schema code: %w", err) @@ -97,7 +97,6 @@ func GenerateTemplateData(ui cli.Ui, cfTypeSchemaFile, resType, tfResourceType, } templateData.HasUpdateMethod = true - templateData.SyntheticIDAttribute = true if !codeFeatures.HasUpdatableProperty { templateData.HasUpdateMethod = false @@ -105,9 +104,6 @@ func GenerateTemplateData(ui cli.Ui, cfTypeSchemaFile, resType, tfResourceType, if codeFeatures.UsesRegexpInValidation { templateData.ImportRegexp = true } - if codeFeatures.HasIDRootProperty { - templateData.SyntheticIDAttribute = false - } if description := resource.CfResource.Description; description != nil { templateData.SchemaDescription = *description @@ -127,9 +123,7 @@ func GenerateTemplateData(ui cli.Ui, cfTypeSchemaFile, resType, tfResourceType, templateData.DeleteTimeoutInMinutes = v.TimeoutInMinutes } - if templateData.SyntheticIDAttribute { - templateData.FrameworkPlanModifierPackages = []string{"stringplanmodifier"} - } + templateData.FrameworkPlanModifierPackages = []string{"stringplanmodifier"} // For the 'id' attribute. for _, v := range codeFeatures.FrameworkPlanModifierPackages { if !slices.Contains(templateData.FrameworkPlanModifierPackages, v) { templateData.FrameworkPlanModifierPackages = append(templateData.FrameworkPlanModifierPackages, v) @@ -164,7 +158,6 @@ type TemplateData struct { RootPropertiesSchema string SchemaDescription string SchemaVersion int64 - SyntheticIDAttribute bool TerraformTypeName string UpdateTimeoutInMinutes int WriteOnlyPropertyPaths []string diff --git a/internal/provider/plural_data_sources.go b/internal/provider/plural_data_sources.go index 7b55e2d70..ed7f70524 100644 --- a/internal/provider/plural_data_sources.go +++ b/internal/provider/plural_data_sources.go @@ -8,6 +8,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_accessanalyzer_analyzers -cftype AWS::AccessAnalyzer::Analyzer -package accessanalyzer ../aws/accessanalyzer/analyzer_plural_data_source_gen.go ../aws/accessanalyzer/analyzer_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_amplify_apps -cftype AWS::Amplify::App -package amplify ../aws/amplify/app_plural_data_source_gen.go ../aws/amplify/app_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apigateway_api_keys -cftype AWS::ApiGateway::ApiKey -package apigateway ../aws/apigateway/api_key_plural_data_source_gen.go ../aws/apigateway/api_key_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_apigateway_base_path_mappings -cftype AWS::ApiGateway::BasePathMapping -package apigateway ../aws/apigateway/base_path_mapping_plural_data_source_gen.go ../aws/apigateway/base_path_mapping_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apigateway_client_certificates -cftype AWS::ApiGateway::ClientCertificate -package apigateway ../aws/apigateway/client_certificate_plural_data_source_gen.go ../aws/apigateway/client_certificate_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apigateway_domain_names -cftype AWS::ApiGateway::DomainName -package apigateway ../aws/apigateway/domain_name_plural_data_source_gen.go ../aws/apigateway/domain_name_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apigateway_rest_apis -cftype AWS::ApiGateway::RestApi -package apigateway ../aws/apigateway/rest_api_plural_data_source_gen.go ../aws/apigateway/rest_api_plural_data_source_gen_test.go @@ -21,7 +22,9 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_appflow_connectors -cftype AWS::AppFlow::Connector -package appflow ../aws/appflow/connector_plural_data_source_gen.go ../aws/appflow/connector_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_appflow_connector_profiles -cftype AWS::AppFlow::ConnectorProfile -package appflow ../aws/appflow/connector_profile_plural_data_source_gen.go ../aws/appflow/connector_profile_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_appflow_flows -cftype AWS::AppFlow::Flow -package appflow ../aws/appflow/flow_plural_data_source_gen.go ../aws/appflow/flow_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_appintegrations_applications -cftype AWS::AppIntegrations::Application -package appintegrations ../aws/appintegrations/application_plural_data_source_gen.go ../aws/appintegrations/application_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_appintegrations_event_integrations -cftype AWS::AppIntegrations::EventIntegration -package appintegrations ../aws/appintegrations/event_integration_plural_data_source_gen.go ../aws/appintegrations/event_integration_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_applicationautoscaling_scalable_targets -cftype AWS::ApplicationAutoScaling::ScalableTarget -package applicationautoscaling ../aws/applicationautoscaling/scalable_target_plural_data_source_gen.go ../aws/applicationautoscaling/scalable_target_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apprunner_auto_scaling_configurations -cftype AWS::AppRunner::AutoScalingConfiguration -package apprunner ../aws/apprunner/auto_scaling_configuration_plural_data_source_gen.go ../aws/apprunner/auto_scaling_configuration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apprunner_observability_configurations -cftype AWS::AppRunner::ObservabilityConfiguration -package apprunner ../aws/apprunner/observability_configuration_plural_data_source_gen.go ../aws/apprunner/observability_configuration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_apprunner_services -cftype AWS::AppRunner::Service -package apprunner ../aws/apprunner/service_plural_data_source_gen.go ../aws/apprunner/service_plural_data_source_gen_test.go @@ -77,6 +80,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_distributions -cftype AWS::CloudFront::Distribution -package cloudfront ../aws/cloudfront/distribution_plural_data_source_gen.go ../aws/cloudfront/distribution_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_functions -cftype AWS::CloudFront::Function -package cloudfront ../aws/cloudfront/function_plural_data_source_gen.go ../aws/cloudfront/function_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_key_groups -cftype AWS::CloudFront::KeyGroup -package cloudfront ../aws/cloudfront/key_group_plural_data_source_gen.go ../aws/cloudfront/key_group_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_key_value_stores -cftype AWS::CloudFront::KeyValueStore -package cloudfront ../aws/cloudfront/key_value_store_plural_data_source_gen.go ../aws/cloudfront/key_value_store_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_origin_access_controls -cftype AWS::CloudFront::OriginAccessControl -package cloudfront ../aws/cloudfront/origin_access_control_plural_data_source_gen.go ../aws/cloudfront/origin_access_control_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_origin_request_policies -cftype AWS::CloudFront::OriginRequestPolicy -package cloudfront ../aws/cloudfront/origin_request_policy_plural_data_source_gen.go ../aws/cloudfront/origin_request_policy_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_cloudfront_public_keys -cftype AWS::CloudFront::PublicKey -package cloudfront ../aws/cloudfront/public_key_plural_data_source_gen.go ../aws/cloudfront/public_key_plural_data_source_gen_test.go @@ -106,6 +110,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_config_conformance_packs -cftype AWS::Config::ConformancePack -package config ../aws/config/conformance_pack_plural_data_source_gen.go ../aws/config/conformance_pack_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_config_organization_conformance_packs -cftype AWS::Config::OrganizationConformancePack -package config ../aws/config/organization_conformance_pack_plural_data_source_gen.go ../aws/config/organization_conformance_pack_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_config_stored_queries -cftype AWS::Config::StoredQuery -package config ../aws/config/stored_query_plural_data_source_gen.go ../aws/config/stored_query_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_connect_instances -cftype AWS::Connect::Instance -package connect ../aws/connect/instance_plural_data_source_gen.go ../aws/connect/instance_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_connectcampaigns_campaigns -cftype AWS::ConnectCampaigns::Campaign -package connectcampaigns ../aws/connectcampaigns/campaign_plural_data_source_gen.go ../aws/connectcampaigns/campaign_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_cur_report_definitions -cftype AWS::CUR::ReportDefinition -package cur ../aws/cur/report_definition_plural_data_source_gen.go ../aws/cur/report_definition_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_customerprofiles_calculated_attribute_definitions -cftype AWS::CustomerProfiles::CalculatedAttributeDefinition -package customerprofiles ../aws/customerprofiles/calculated_attribute_definition_plural_data_source_gen.go ../aws/customerprofiles/calculated_attribute_definition_plural_data_source_gen_test.go @@ -195,6 +200,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_vpc_endpoint_connection_notifications -cftype AWS::EC2::VPCEndpointConnectionNotification -package ec2 ../aws/ec2/vpc_endpoint_connection_notification_plural_data_source_gen.go ../aws/ec2/vpc_endpoint_connection_notification_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_transit_gateway_vpc_attachments -cftype AWS::EC2::TransitGatewayVpcAttachment -package ec2 ../aws/ec2/transit_gateway_vpc_attachment_plural_data_source_gen.go ../aws/ec2/transit_gateway_vpc_attachment_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_vpcs -cftype AWS::EC2::VPC -package ec2 ../aws/ec2/vpc_plural_data_source_gen.go ../aws/ec2/vpc_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_vpcdhcp_options_associations -cftype AWS::EC2::VPCDHCPOptionsAssociation -package ec2 ../aws/ec2/vpcdhcp_options_association_plural_data_source_gen.go ../aws/ec2/vpcdhcp_options_association_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_vpc_endpoints -cftype AWS::EC2::VPCEndpoint -package ec2 ../aws/ec2/vpc_endpoint_plural_data_source_gen.go ../aws/ec2/vpc_endpoint_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_vpc_endpoint_services -cftype AWS::EC2::VPCEndpointService -package ec2 ../aws/ec2/vpc_endpoint_service_plural_data_source_gen.go ../aws/ec2/vpc_endpoint_service_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ec2_vpc_endpoint_service_permissions_plural -cftype AWS::EC2::VPCEndpointServicePermissions -package ec2 ../aws/ec2/vpc_endpoint_service_permissions_plural_data_source_gen.go ../aws/ec2/vpc_endpoint_service_permissions_plural_data_source_gen_test.go @@ -275,6 +281,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_grafana_workspaces -cftype AWS::Grafana::Workspace -package grafana ../aws/grafana/workspace_plural_data_source_gen.go ../aws/grafana/workspace_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_greengrassv2_component_versions -cftype AWS::GreengrassV2::ComponentVersion -package greengrassv2 ../aws/greengrassv2/component_version_plural_data_source_gen.go ../aws/greengrassv2/component_version_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_greengrassv2_deployments -cftype AWS::GreengrassV2::Deployment -package greengrassv2 ../aws/greengrassv2/deployment_plural_data_source_gen.go ../aws/greengrassv2/deployment_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_groundstation_configs -cftype AWS::GroundStation::Config -package groundstation ../aws/groundstation/config_plural_data_source_gen.go ../aws/groundstation/config_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_groundstation_dataflow_endpoint_groups -cftype AWS::GroundStation::DataflowEndpointGroup -package groundstation ../aws/groundstation/dataflow_endpoint_group_plural_data_source_gen.go ../aws/groundstation/dataflow_endpoint_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_groundstation_mission_profiles -cftype AWS::GroundStation::MissionProfile -package groundstation ../aws/groundstation/mission_profile_plural_data_source_gen.go ../aws/groundstation/mission_profile_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_guardduty_detectors -cftype AWS::GuardDuty::Detector -package guardduty ../aws/guardduty/detector_plural_data_source_gen.go ../aws/guardduty/detector_plural_data_source_gen_test.go @@ -293,6 +300,8 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_ivs_recording_configurations -cftype AWS::IVS::RecordingConfiguration -package ivs ../aws/ivs/recording_configuration_plural_data_source_gen.go ../aws/ivs/recording_configuration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ivs_stages -cftype AWS::IVS::Stage -package ivs ../aws/ivs/stage_plural_data_source_gen.go ../aws/ivs/stage_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ivs_stream_keys -cftype AWS::IVS::StreamKey -package ivs ../aws/ivs/stream_key_plural_data_source_gen.go ../aws/ivs/stream_key_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_ivschat_logging_configurations -cftype AWS::IVSChat::LoggingConfiguration -package ivschat ../aws/ivschat/logging_configuration_plural_data_source_gen.go ../aws/ivschat/logging_configuration_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_ivschat_rooms -cftype AWS::IVSChat::Room -package ivschat ../aws/ivschat/room_plural_data_source_gen.go ../aws/ivschat/room_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_inspector_assessment_targets -cftype AWS::Inspector::AssessmentTarget -package inspector ../aws/inspector/assessment_target_plural_data_source_gen.go ../aws/inspector/assessment_target_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_inspector_assessment_templates -cftype AWS::Inspector::AssessmentTemplate -package inspector ../aws/inspector/assessment_template_plural_data_source_gen.go ../aws/inspector/assessment_template_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_imagebuilder_container_recipes -cftype AWS::ImageBuilder::ContainerRecipe -package imagebuilder ../aws/imagebuilder/container_recipe_plural_data_source_gen.go ../aws/imagebuilder/container_recipe_plural_data_source_gen_test.go @@ -306,6 +315,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_internetmonitor_monitors -cftype AWS::InternetMonitor::Monitor -package internetmonitor ../aws/internetmonitor/monitor_plural_data_source_gen.go ../aws/internetmonitor/monitor_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_account_audit_configurations -cftype AWS::IoT::AccountAuditConfiguration -package iot ../aws/iot/account_audit_configuration_plural_data_source_gen.go ../aws/iot/account_audit_configuration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_authorizers -cftype AWS::IoT::Authorizer -package iot ../aws/iot/authorizer_plural_data_source_gen.go ../aws/iot/authorizer_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_billing_groups -cftype AWS::IoT::BillingGroup -package iot ../aws/iot/billing_group_plural_data_source_gen.go ../aws/iot/billing_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_ca_certificates -cftype AWS::IoT::CACertificate -package iot ../aws/iot/ca_certificate_plural_data_source_gen.go ../aws/iot/ca_certificate_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_certificates -cftype AWS::IoT::Certificate -package iot ../aws/iot/certificate_plural_data_source_gen.go ../aws/iot/certificate_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_certificate_providers -cftype AWS::IoT::CertificateProvider -package iot ../aws/iot/certificate_provider_plural_data_source_gen.go ../aws/iot/certificate_provider_plural_data_source_gen_test.go @@ -323,8 +333,15 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_scheduled_audits -cftype AWS::IoT::ScheduledAudit -package iot ../aws/iot/scheduled_audit_plural_data_source_gen.go ../aws/iot/scheduled_audit_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_security_profiles -cftype AWS::IoT::SecurityProfile -package iot ../aws/iot/security_profile_plural_data_source_gen.go ../aws/iot/security_profile_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_software_packages -cftype AWS::IoT::SoftwarePackage -package iot ../aws/iot/software_package_plural_data_source_gen.go ../aws/iot/software_package_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_things -cftype AWS::IoT::Thing -package iot ../aws/iot/thing_plural_data_source_gen.go ../aws/iot/thing_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_thing_groups -cftype AWS::IoT::ThingGroup -package iot ../aws/iot/thing_group_plural_data_source_gen.go ../aws/iot/thing_group_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_thing_types -cftype AWS::IoT::ThingType -package iot ../aws/iot/thing_type_plural_data_source_gen.go ../aws/iot/thing_type_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_topic_rules -cftype AWS::IoT::TopicRule -package iot ../aws/iot/topic_rule_plural_data_source_gen.go ../aws/iot/topic_rule_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iot_topic_rule_destinations -cftype AWS::IoT::TopicRuleDestination -package iot ../aws/iot/topic_rule_destination_plural_data_source_gen.go ../aws/iot/topic_rule_destination_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iotanalytics_channels -cftype AWS::IoTAnalytics::Channel -package iotanalytics ../aws/iotanalytics/channel_plural_data_source_gen.go ../aws/iotanalytics/channel_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iotanalytics_datasets -cftype AWS::IoTAnalytics::Dataset -package iotanalytics ../aws/iotanalytics/dataset_plural_data_source_gen.go ../aws/iotanalytics/dataset_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iotanalytics_datastores -cftype AWS::IoTAnalytics::Datastore -package iotanalytics ../aws/iotanalytics/datastore_plural_data_source_gen.go ../aws/iotanalytics/datastore_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_iotanalytics_pipelines -cftype AWS::IoTAnalytics::Pipeline -package iotanalytics ../aws/iotanalytics/pipeline_plural_data_source_gen.go ../aws/iotanalytics/pipeline_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iotcoredeviceadvisor_suite_definitions -cftype AWS::IoTCoreDeviceAdvisor::SuiteDefinition -package iotcoredeviceadvisor ../aws/iotcoredeviceadvisor/suite_definition_plural_data_source_gen.go ../aws/iotcoredeviceadvisor/suite_definition_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iotevents_alarm_models -cftype AWS::IoTEvents::AlarmModel -package iotevents ../aws/iotevents/alarm_model_plural_data_source_gen.go ../aws/iotevents/alarm_model_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_iotevents_detector_models -cftype AWS::IoTEvents::DetectorModel -package iotevents ../aws/iotevents/detector_model_plural_data_source_gen.go ../aws/iotevents/detector_model_plural_data_source_gen_test.go @@ -442,12 +459,15 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_omics_reference_stores -cftype AWS::Omics::ReferenceStore -package omics ../aws/omics/reference_store_plural_data_source_gen.go ../aws/omics/reference_store_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_omics_run_groups -cftype AWS::Omics::RunGroup -package omics ../aws/omics/run_group_plural_data_source_gen.go ../aws/omics/run_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_omics_sequence_stores -cftype AWS::Omics::SequenceStore -package omics ../aws/omics/sequence_store_plural_data_source_gen.go ../aws/omics/sequence_store_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_omics_variant_stores -cftype AWS::Omics::VariantStore -package omics ../aws/omics/variant_store_plural_data_source_gen.go ../aws/omics/variant_store_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_omics_workflows -cftype AWS::Omics::Workflow -package omics ../aws/omics/workflow_plural_data_source_gen.go ../aws/omics/workflow_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_opensearchserverless_access_policies -cftype AWS::OpenSearchServerless::AccessPolicy -package opensearchserverless ../aws/opensearchserverless/access_policy_plural_data_source_gen.go ../aws/opensearchserverless/access_policy_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_opensearchserverless_collections -cftype AWS::OpenSearchServerless::Collection -package opensearchserverless ../aws/opensearchserverless/collection_plural_data_source_gen.go ../aws/opensearchserverless/collection_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_opensearchserverless_security_configs -cftype AWS::OpenSearchServerless::SecurityConfig -package opensearchserverless ../aws/opensearchserverless/security_config_plural_data_source_gen.go ../aws/opensearchserverless/security_config_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_opensearchserverless_security_policies -cftype AWS::OpenSearchServerless::SecurityPolicy -package opensearchserverless ../aws/opensearchserverless/security_policy_plural_data_source_gen.go ../aws/opensearchserverless/security_policy_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_opensearchserverless_vpc_endpoints -cftype AWS::OpenSearchServerless::VpcEndpoint -package opensearchserverless ../aws/opensearchserverless/vpc_endpoint_plural_data_source_gen.go ../aws/opensearchserverless/vpc_endpoint_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_opensearchservice_domains -cftype AWS::OpenSearchService::Domain -package opensearchservice ../aws/opensearchservice/domain_plural_data_source_gen.go ../aws/opensearchservice/domain_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_opsworkscm_servers -cftype AWS::OpsWorksCM::Server -package opsworkscm ../aws/opsworkscm/server_plural_data_source_gen.go ../aws/opsworkscm/server_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_organizations_organizations -cftype AWS::Organizations::Organization -package organizations ../aws/organizations/organization_plural_data_source_gen.go ../aws/organizations/organization_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_pcaconnectorad_connectors -cftype AWS::PCAConnectorAD::Connector -package pcaconnectorad ../aws/pcaconnectorad/connector_plural_data_source_gen.go ../aws/pcaconnectorad/connector_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_pcaconnectorad_directory_registrations -cftype AWS::PCAConnectorAD::DirectoryRegistration -package pcaconnectorad ../aws/pcaconnectorad/directory_registration_plural_data_source_gen.go ../aws/pcaconnectorad/directory_registration_plural_data_source_gen_test.go @@ -459,6 +479,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_personalize_solutions -cftype AWS::Personalize::Solution -package personalize ../aws/personalize/solution_plural_data_source_gen.go ../aws/personalize/solution_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_pinpoint_in_app_templates -cftype AWS::Pinpoint::InAppTemplate -package pinpoint ../aws/pinpoint/in_app_template_plural_data_source_gen.go ../aws/pinpoint/in_app_template_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_pipes_pipes -cftype AWS::Pipes::Pipe -package pipes ../aws/pipes/pipe_plural_data_source_gen.go ../aws/pipes/pipe_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_proton_environment_account_connections -cftype AWS::Proton::EnvironmentAccountConnection -package proton ../aws/proton/environment_account_connection_plural_data_source_gen.go ../aws/proton/environment_account_connection_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_proton_environment_templates -cftype AWS::Proton::EnvironmentTemplate -package proton ../aws/proton/environment_template_plural_data_source_gen.go ../aws/proton/environment_template_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_proton_service_templates -cftype AWS::Proton::ServiceTemplate -package proton ../aws/proton/service_template_plural_data_source_gen.go ../aws/proton/service_template_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ram_permissions -cftype AWS::RAM::Permission -package ram ../aws/ram/permission_plural_data_source_gen.go ../aws/ram/permission_plural_data_source_gen_test.go @@ -475,6 +496,7 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_rds_integrations -cftype AWS::RDS::Integration -package rds ../aws/rds/integration_plural_data_source_gen.go ../aws/rds/integration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_rds_option_groups -cftype AWS::RDS::OptionGroup -package rds ../aws/rds/option_group_plural_data_source_gen.go ../aws/rds/option_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_rum_app_monitors -cftype AWS::RUM::AppMonitor -package rum ../aws/rum/app_monitor_plural_data_source_gen.go ../aws/rum/app_monitor_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_redshift_clusters -cftype AWS::Redshift::Cluster -package redshift ../aws/redshift/cluster_plural_data_source_gen.go ../aws/redshift/cluster_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_redshift_cluster_parameter_groups -cftype AWS::Redshift::ClusterParameterGroup -package redshift ../aws/redshift/cluster_parameter_group_plural_data_source_gen.go ../aws/redshift/cluster_parameter_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_redshift_cluster_subnet_groups -cftype AWS::Redshift::ClusterSubnetGroup -package redshift ../aws/redshift/cluster_subnet_group_plural_data_source_gen.go ../aws/redshift/cluster_subnet_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_redshift_endpoint_accesses -cftype AWS::Redshift::EndpointAccess -package redshift ../aws/redshift/endpoint_access_plural_data_source_gen.go ../aws/redshift/endpoint_access_plural_data_source_gen_test.go @@ -527,11 +549,13 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_s3express_bucket_policies -cftype AWS::S3Express::BucketPolicy -package s3express ../aws/s3express/bucket_policy_plural_data_source_gen.go ../aws/s3express/bucket_policy_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_s3express_directory_buckets -cftype AWS::S3Express::DirectoryBucket -package s3express ../aws/s3express/directory_bucket_plural_data_source_gen.go ../aws/s3express/directory_bucket_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_s3objectlambda_access_points -cftype AWS::S3ObjectLambda::AccessPoint -package s3objectlambda ../aws/s3objectlambda/access_point_plural_data_source_gen.go ../aws/s3objectlambda/access_point_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_s3outposts_endpoints -cftype AWS::S3Outposts::Endpoint -package s3outposts ../aws/s3outposts/endpoint_plural_data_source_gen.go ../aws/s3outposts/endpoint_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ses_configuration_sets -cftype AWS::SES::ConfigurationSet -package ses ../aws/ses/configuration_set_plural_data_source_gen.go ../aws/ses/configuration_set_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ses_contact_lists -cftype AWS::SES::ContactList -package ses ../aws/ses/contact_list_plural_data_source_gen.go ../aws/ses/contact_list_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ses_dedicated_ip_pools -cftype AWS::SES::DedicatedIpPool -package ses ../aws/ses/dedicated_ip_pool_plural_data_source_gen.go ../aws/ses/dedicated_ip_pool_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ses_email_identities -cftype AWS::SES::EmailIdentity -package ses ../aws/ses/email_identity_plural_data_source_gen.go ../aws/ses/email_identity_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ses_templates -cftype AWS::SES::Template -package ses ../aws/ses/template_plural_data_source_gen.go ../aws/ses/template_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_sns_topics -cftype AWS::SNS::Topic -package sns ../aws/sns/topic_plural_data_source_gen.go ../aws/sns/topic_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ssm_documents -cftype AWS::SSM::Document -package ssm ../aws/ssm/document_plural_data_source_gen.go ../aws/ssm/document_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ssm_patch_baselines -cftype AWS::SSM::PatchBaseline -package ssm ../aws/ssm/patch_baseline_plural_data_source_gen.go ../aws/ssm/patch_baseline_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_ssm_resource_data_syncs -cftype AWS::SSM::ResourceDataSync -package ssm ../aws/ssm/resource_data_sync_plural_data_source_gen.go ../aws/ssm/resource_data_sync_plural_data_source_gen_test.go @@ -574,6 +598,8 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_supportapp_account_aliases -cftype AWS::SupportApp::AccountAlias -package supportapp ../aws/supportapp/account_alias_plural_data_source_gen.go ../aws/supportapp/account_alias_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_supportapp_slack_channel_configurations -cftype AWS::SupportApp::SlackChannelConfiguration -package supportapp ../aws/supportapp/slack_channel_configuration_plural_data_source_gen.go ../aws/supportapp/slack_channel_configuration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_supportapp_slack_workspace_configurations -cftype AWS::SupportApp::SlackWorkspaceConfiguration -package supportapp ../aws/supportapp/slack_workspace_configuration_plural_data_source_gen.go ../aws/supportapp/slack_workspace_configuration_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_synthetics_canaries -cftype AWS::Synthetics::Canary -package synthetics ../aws/synthetics/canary_plural_data_source_gen.go ../aws/synthetics/canary_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_synthetics_groups -cftype AWS::Synthetics::Group -package synthetics ../aws/synthetics/group_plural_data_source_gen.go ../aws/synthetics/group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_systemsmanagersap_applications -cftype AWS::SystemsManagerSAP::Application -package systemsmanagersap ../aws/systemsmanagersap/application_plural_data_source_gen.go ../aws/systemsmanagersap/application_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_timestream_databases -cftype AWS::Timestream::Database -package timestream ../aws/timestream/database_plural_data_source_gen.go ../aws/timestream/database_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_timestream_scheduled_queries -cftype AWS::Timestream::ScheduledQuery -package timestream ../aws/timestream/scheduled_query_plural_data_source_gen.go ../aws/timestream/scheduled_query_plural_data_source_gen_test.go @@ -584,6 +610,14 @@ //go:generate go run generators/plural-data-source/main.go -data-source awscc_transfer_workflows -cftype AWS::Transfer::Workflow -package transfer ../aws/transfer/workflow_plural_data_source_gen.go ../aws/transfer/workflow_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_voiceid_domains -cftype AWS::VoiceID::Domain -package voiceid ../aws/voiceid/domain_plural_data_source_gen.go ../aws/voiceid/domain_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_verifiedpermissions_policy_stores -cftype AWS::VerifiedPermissions::PolicyStore -package verifiedpermissions ../aws/verifiedpermissions/policy_store_plural_data_source_gen.go ../aws/verifiedpermissions/policy_store_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_access_log_subscriptions -cftype AWS::VpcLattice::AccessLogSubscription -package vpclattice ../aws/vpclattice/access_log_subscription_plural_data_source_gen.go ../aws/vpclattice/access_log_subscription_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_listeners -cftype AWS::VpcLattice::Listener -package vpclattice ../aws/vpclattice/listener_plural_data_source_gen.go ../aws/vpclattice/listener_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_rules -cftype AWS::VpcLattice::Rule -package vpclattice ../aws/vpclattice/rule_plural_data_source_gen.go ../aws/vpclattice/rule_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_services -cftype AWS::VpcLattice::Service -package vpclattice ../aws/vpclattice/service_plural_data_source_gen.go ../aws/vpclattice/service_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_service_networks -cftype AWS::VpcLattice::ServiceNetwork -package vpclattice ../aws/vpclattice/service_network_plural_data_source_gen.go ../aws/vpclattice/service_network_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_service_network_service_associations -cftype AWS::VpcLattice::ServiceNetworkServiceAssociation -package vpclattice ../aws/vpclattice/service_network_service_association_plural_data_source_gen.go ../aws/vpclattice/service_network_service_association_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_service_network_vpc_associations -cftype AWS::VpcLattice::ServiceNetworkVpcAssociation -package vpclattice ../aws/vpclattice/service_network_vpc_association_plural_data_source_gen.go ../aws/vpclattice/service_network_vpc_association_plural_data_source_gen_test.go +//go:generate go run generators/plural-data-source/main.go -data-source awscc_vpclattice_target_groups -cftype AWS::VpcLattice::TargetGroup -package vpclattice ../aws/vpclattice/target_group_plural_data_source_gen.go ../aws/vpclattice/target_group_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_wafv2_logging_configurations -cftype AWS::WAFv2::LoggingConfiguration -package wafv2 ../aws/wafv2/logging_configuration_plural_data_source_gen.go ../aws/wafv2/logging_configuration_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_wisdom_assistants -cftype AWS::Wisdom::Assistant -package wisdom ../aws/wisdom/assistant_plural_data_source_gen.go ../aws/wisdom/assistant_plural_data_source_gen_test.go //go:generate go run generators/plural-data-source/main.go -data-source awscc_wisdom_knowledge_bases -cftype AWS::Wisdom::KnowledgeBase -package wisdom ../aws/wisdom/knowledge_base_plural_data_source_gen.go ../aws/wisdom/knowledge_base_plural_data_source_gen_test.go @@ -602,6 +636,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/appconfig" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/appflow" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/appintegrations" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/applicationautoscaling" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/applicationinsights" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/apprunner" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/appstream" @@ -632,6 +667,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/cognito" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/comprehend" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/config" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/connect" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/connectcampaigns" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/cur" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/customerprofiles" @@ -679,6 +715,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/inspectorv2" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/internetmonitor" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iot" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotanalytics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotcoredeviceadvisor" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotevents" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotfleethub" @@ -687,6 +724,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iottwinmaker" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotwireless" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ivs" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ivschat" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kafkaconnect" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kendra" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kendraranking" @@ -723,6 +761,8 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/oam" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/omics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opensearchserverless" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opensearchservice" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opsworkscm" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/organizations" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/osis" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/panorama" @@ -750,6 +790,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/s3" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/s3express" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/s3objectlambda" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/s3outposts" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/sagemaker" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/scheduler" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/secretsmanager" @@ -760,17 +801,20 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/shield" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/signer" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/simspaceweaver" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/sns" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/sqs" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ssm" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ssmcontacts" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ssmincidents" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/stepfunctions" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/supportapp" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/synthetics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/systemsmanagersap" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/timestream" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/transfer" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/verifiedpermissions" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/voiceid" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/vpclattice" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/wafv2" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/wisdom" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/workspacesthinclient" diff --git a/internal/provider/resources.go b/internal/provider/resources.go index f187a5bf2..44b147c54 100644 --- a/internal/provider/resources.go +++ b/internal/provider/resources.go @@ -16,6 +16,7 @@ //go:generate go run generators/resource/main.go -resource awscc_apigateway_account -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_Account.json -package apigateway -- ../aws/apigateway/account_resource_gen.go ../aws/apigateway/account_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apigateway_api_key -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_ApiKey.json -package apigateway -- ../aws/apigateway/api_key_resource_gen.go ../aws/apigateway/api_key_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apigateway_authorizer -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_Authorizer.json -package apigateway -- ../aws/apigateway/authorizer_resource_gen.go ../aws/apigateway/authorizer_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_apigateway_base_path_mapping -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_BasePathMapping.json -package apigateway -- ../aws/apigateway/base_path_mapping_resource_gen.go ../aws/apigateway/base_path_mapping_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apigateway_client_certificate -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_ClientCertificate.json -package apigateway -- ../aws/apigateway/client_certificate_resource_gen.go ../aws/apigateway/client_certificate_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apigateway_deployment -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_Deployment.json -package apigateway -- ../aws/apigateway/deployment_resource_gen.go ../aws/apigateway/deployment_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apigateway_documentation_part -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_DocumentationPart.json -package apigateway -- ../aws/apigateway/documentation_part_resource_gen.go ../aws/apigateway/documentation_part_resource_gen_test.go @@ -47,7 +48,9 @@ //go:generate go run generators/resource/main.go -resource awscc_appflow_connector -cfschema ../service/cloudformation/schemas/AWS_AppFlow_Connector.json -package appflow -- ../aws/appflow/connector_resource_gen.go ../aws/appflow/connector_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_appflow_connector_profile -cfschema ../service/cloudformation/schemas/AWS_AppFlow_ConnectorProfile.json -package appflow -- ../aws/appflow/connector_profile_resource_gen.go ../aws/appflow/connector_profile_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_appflow_flow -cfschema ../service/cloudformation/schemas/AWS_AppFlow_Flow.json -package appflow -- ../aws/appflow/flow_resource_gen.go ../aws/appflow/flow_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_appintegrations_application -cfschema ../service/cloudformation/schemas/AWS_AppIntegrations_Application.json -package appintegrations -- ../aws/appintegrations/application_resource_gen.go ../aws/appintegrations/application_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_appintegrations_event_integration -cfschema ../service/cloudformation/schemas/AWS_AppIntegrations_EventIntegration.json -package appintegrations -- ../aws/appintegrations/event_integration_resource_gen.go ../aws/appintegrations/event_integration_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_applicationautoscaling_scalable_target -cfschema ../service/cloudformation/schemas/AWS_ApplicationAutoScaling_ScalableTarget.json -package applicationautoscaling -- ../aws/applicationautoscaling/scalable_target_resource_gen.go ../aws/applicationautoscaling/scalable_target_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_applicationautoscaling_scaling_policy -cfschema ../service/cloudformation/schemas/AWS_ApplicationAutoScaling_ScalingPolicy.json -package applicationautoscaling -- ../aws/applicationautoscaling/scaling_policy_resource_gen.go ../aws/applicationautoscaling/scaling_policy_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apprunner_auto_scaling_configuration -cfschema ../service/cloudformation/schemas/AWS_AppRunner_AutoScalingConfiguration.json -package apprunner -- ../aws/apprunner/auto_scaling_configuration_resource_gen.go ../aws/apprunner/auto_scaling_configuration_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_apprunner_observability_configuration -cfschema ../service/cloudformation/schemas/AWS_AppRunner_ObservabilityConfiguration.json -package apprunner -- ../aws/apprunner/observability_configuration_resource_gen.go ../aws/apprunner/observability_configuration_resource_gen_test.go @@ -131,6 +134,7 @@ //go:generate go run generators/resource/main.go -resource awscc_cloudfront_distribution -cfschema ../service/cloudformation/schemas/AWS_CloudFront_Distribution.json -package cloudfront -- ../aws/cloudfront/distribution_resource_gen.go ../aws/cloudfront/distribution_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_cloudfront_function -cfschema ../service/cloudformation/schemas/AWS_CloudFront_Function.json -package cloudfront -- ../aws/cloudfront/function_resource_gen.go ../aws/cloudfront/function_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_cloudfront_key_group -cfschema ../service/cloudformation/schemas/AWS_CloudFront_KeyGroup.json -package cloudfront -- ../aws/cloudfront/key_group_resource_gen.go ../aws/cloudfront/key_group_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_cloudfront_key_value_store -cfschema ../service/cloudformation/schemas/AWS_CloudFront_KeyValueStore.json -package cloudfront -- ../aws/cloudfront/key_value_store_resource_gen.go ../aws/cloudfront/key_value_store_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_cloudfront_monitoring_subscription -cfschema ../service/cloudformation/schemas/AWS_CloudFront_MonitoringSubscription.json -package cloudfront -- ../aws/cloudfront/monitoring_subscription_resource_gen.go ../aws/cloudfront/monitoring_subscription_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_cloudfront_origin_access_control -cfschema ../service/cloudformation/schemas/AWS_CloudFront_OriginAccessControl.json -package cloudfront -- ../aws/cloudfront/origin_access_control_resource_gen.go ../aws/cloudfront/origin_access_control_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_cloudfront_origin_request_policy -cfschema ../service/cloudformation/schemas/AWS_CloudFront_OriginRequestPolicy.json -package cloudfront -- ../aws/cloudfront/origin_request_policy_resource_gen.go ../aws/cloudfront/origin_request_policy_resource_gen_test.go @@ -173,6 +177,7 @@ //go:generate go run generators/resource/main.go -resource awscc_connect_contact_flow -cfschema ../service/cloudformation/schemas/AWS_Connect_ContactFlow.json -package connect -- ../aws/connect/contact_flow_resource_gen.go ../aws/connect/contact_flow_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_connect_contact_flow_module -cfschema ../service/cloudformation/schemas/AWS_Connect_ContactFlowModule.json -package connect -- ../aws/connect/contact_flow_module_resource_gen.go ../aws/connect/contact_flow_module_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_connect_hours_of_operation -cfschema ../service/cloudformation/schemas/AWS_Connect_HoursOfOperation.json -package connect -- ../aws/connect/hours_of_operation_resource_gen.go ../aws/connect/hours_of_operation_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_connect_instance -cfschema ../service/cloudformation/schemas/AWS_Connect_Instance.json -package connect -- ../aws/connect/instance_resource_gen.go ../aws/connect/instance_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_connect_instance_storage_config -cfschema ../service/cloudformation/schemas/AWS_Connect_InstanceStorageConfig.json -package connect -- ../aws/connect/instance_storage_config_resource_gen.go ../aws/connect/instance_storage_config_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_connect_integration_association -cfschema ../service/cloudformation/schemas/AWS_Connect_IntegrationAssociation.json -package connect -- ../aws/connect/integration_association_resource_gen.go ../aws/connect/integration_association_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_connect_phone_number -cfschema ../service/cloudformation/schemas/AWS_Connect_PhoneNumber.json -package connect -- ../aws/connect/phone_number_resource_gen.go ../aws/connect/phone_number_resource_gen_test.go @@ -298,6 +303,7 @@ //go:generate go run generators/resource/main.go -resource awscc_ec2_transit_gateway_vpc_attachment -cfschema ../service/cloudformation/schemas/AWS_EC2_TransitGatewayVpcAttachment.json -package ec2 -- ../aws/ec2/transit_gateway_vpc_attachment_resource_gen.go ../aws/ec2/transit_gateway_vpc_attachment_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ec2_vpc -cfschema ../service/cloudformation/schemas/AWS_EC2_VPC.json -package ec2 -- ../aws/ec2/vpc_resource_gen.go ../aws/ec2/vpc_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ec2_vpc_cidr_block -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCCidrBlock.json -package ec2 -- ../aws/ec2/vpc_cidr_block_resource_gen.go ../aws/ec2/vpc_cidr_block_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_ec2_vpcdhcp_options_association -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCDHCPOptionsAssociation.json -package ec2 -- ../aws/ec2/vpcdhcp_options_association_resource_gen.go ../aws/ec2/vpcdhcp_options_association_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ec2_vpc_endpoint -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCEndpoint.json -package ec2 -- ../aws/ec2/vpc_endpoint_resource_gen.go ../aws/ec2/vpc_endpoint_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ec2_vpc_endpoint_service -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCEndpointService.json -package ec2 -- ../aws/ec2/vpc_endpoint_service_resource_gen.go ../aws/ec2/vpc_endpoint_service_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ec2_vpc_endpoint_service_permissions -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCEndpointServicePermissions.json -package ec2 -- ../aws/ec2/vpc_endpoint_service_permissions_resource_gen.go ../aws/ec2/vpc_endpoint_service_permissions_resource_gen_test.go @@ -403,6 +409,7 @@ //go:generate go run generators/resource/main.go -resource awscc_grafana_workspace -cfschema ../service/cloudformation/schemas/AWS_Grafana_Workspace.json -package grafana -- ../aws/grafana/workspace_resource_gen.go ../aws/grafana/workspace_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_greengrassv2_component_version -cfschema ../service/cloudformation/schemas/AWS_GreengrassV2_ComponentVersion.json -package greengrassv2 -- ../aws/greengrassv2/component_version_resource_gen.go ../aws/greengrassv2/component_version_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_greengrassv2_deployment -cfschema ../service/cloudformation/schemas/AWS_GreengrassV2_Deployment.json -package greengrassv2 -- ../aws/greengrassv2/deployment_resource_gen.go ../aws/greengrassv2/deployment_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_groundstation_config -cfschema ../service/cloudformation/schemas/AWS_GroundStation_Config.json -package groundstation -- ../aws/groundstation/config_resource_gen.go ../aws/groundstation/config_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_groundstation_dataflow_endpoint_group -cfschema ../service/cloudformation/schemas/AWS_GroundStation_DataflowEndpointGroup.json -package groundstation -- ../aws/groundstation/dataflow_endpoint_group_resource_gen.go ../aws/groundstation/dataflow_endpoint_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_groundstation_mission_profile -cfschema ../service/cloudformation/schemas/AWS_GroundStation_MissionProfile.json -package groundstation -- ../aws/groundstation/mission_profile_resource_gen.go ../aws/groundstation/mission_profile_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_guardduty_detector -cfschema ../service/cloudformation/schemas/AWS_GuardDuty_Detector.json -package guardduty -- ../aws/guardduty/detector_resource_gen.go ../aws/guardduty/detector_resource_gen_test.go @@ -430,6 +437,8 @@ //go:generate go run generators/resource/main.go -resource awscc_ivs_recording_configuration -cfschema ../service/cloudformation/schemas/AWS_IVS_RecordingConfiguration.json -package ivs -- ../aws/ivs/recording_configuration_resource_gen.go ../aws/ivs/recording_configuration_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ivs_stage -cfschema ../service/cloudformation/schemas/AWS_IVS_Stage.json -package ivs -- ../aws/ivs/stage_resource_gen.go ../aws/ivs/stage_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ivs_stream_key -cfschema ../service/cloudformation/schemas/AWS_IVS_StreamKey.json -package ivs -- ../aws/ivs/stream_key_resource_gen.go ../aws/ivs/stream_key_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_ivschat_logging_configuration -cfschema ../service/cloudformation/schemas/AWS_IVSChat_LoggingConfiguration.json -package ivschat -- ../aws/ivschat/logging_configuration_resource_gen.go ../aws/ivschat/logging_configuration_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_ivschat_room -cfschema ../service/cloudformation/schemas/AWS_IVSChat_Room.json -package ivschat -- ../aws/ivschat/room_resource_gen.go ../aws/ivschat/room_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_identitystore_group -cfschema ../service/cloudformation/schemas/AWS_IdentityStore_Group.json -package identitystore -- ../aws/identitystore/group_resource_gen.go ../aws/identitystore/group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_identitystore_group_membership -cfschema ../service/cloudformation/schemas/AWS_IdentityStore_GroupMembership.json -package identitystore -- ../aws/identitystore/group_membership_resource_gen.go ../aws/identitystore/group_membership_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_inspector_assessment_target -cfschema ../service/cloudformation/schemas/AWS_Inspector_AssessmentTarget.json -package inspector -- ../aws/inspector/assessment_target_resource_gen.go ../aws/inspector/assessment_target_resource_gen_test.go @@ -447,6 +456,7 @@ //go:generate go run generators/resource/main.go -resource awscc_internetmonitor_monitor -cfschema ../service/cloudformation/schemas/AWS_InternetMonitor_Monitor.json -package internetmonitor -- ../aws/internetmonitor/monitor_resource_gen.go ../aws/internetmonitor/monitor_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_account_audit_configuration -cfschema ../service/cloudformation/schemas/AWS_IoT_AccountAuditConfiguration.json -package iot -- ../aws/iot/account_audit_configuration_resource_gen.go ../aws/iot/account_audit_configuration_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_authorizer -cfschema ../service/cloudformation/schemas/AWS_IoT_Authorizer.json -package iot -- ../aws/iot/authorizer_resource_gen.go ../aws/iot/authorizer_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iot_billing_group -cfschema ../service/cloudformation/schemas/AWS_IoT_BillingGroup.json -package iot -- ../aws/iot/billing_group_resource_gen.go ../aws/iot/billing_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_ca_certificate -cfschema ../service/cloudformation/schemas/AWS_IoT_CACertificate.json -package iot -- ../aws/iot/ca_certificate_resource_gen.go ../aws/iot/ca_certificate_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_certificate -cfschema ../service/cloudformation/schemas/AWS_IoT_Certificate.json -package iot -- ../aws/iot/certificate_resource_gen.go ../aws/iot/certificate_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_certificate_provider -cfschema ../service/cloudformation/schemas/AWS_IoT_CertificateProvider.json -package iot -- ../aws/iot/certificate_provider_resource_gen.go ../aws/iot/certificate_provider_resource_gen_test.go @@ -465,8 +475,15 @@ //go:generate go run generators/resource/main.go -resource awscc_iot_security_profile -cfschema ../service/cloudformation/schemas/AWS_IoT_SecurityProfile.json -package iot -- ../aws/iot/security_profile_resource_gen.go ../aws/iot/security_profile_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_software_package -cfschema ../service/cloudformation/schemas/AWS_IoT_SoftwarePackage.json -package iot -- ../aws/iot/software_package_resource_gen.go ../aws/iot/software_package_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_software_package_version -cfschema ../service/cloudformation/schemas/AWS_IoT_SoftwarePackageVersion.json -package iot -- ../aws/iot/software_package_version_resource_gen.go ../aws/iot/software_package_version_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iot_thing -cfschema ../service/cloudformation/schemas/AWS_IoT_Thing.json -package iot -- ../aws/iot/thing_resource_gen.go ../aws/iot/thing_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iot_thing_group -cfschema ../service/cloudformation/schemas/AWS_IoT_ThingGroup.json -package iot -- ../aws/iot/thing_group_resource_gen.go ../aws/iot/thing_group_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iot_thing_type -cfschema ../service/cloudformation/schemas/AWS_IoT_ThingType.json -package iot -- ../aws/iot/thing_type_resource_gen.go ../aws/iot/thing_type_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_topic_rule -cfschema ../service/cloudformation/schemas/AWS_IoT_TopicRule.json -package iot -- ../aws/iot/topic_rule_resource_gen.go ../aws/iot/topic_rule_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iot_topic_rule_destination -cfschema ../service/cloudformation/schemas/AWS_IoT_TopicRuleDestination.json -package iot -- ../aws/iot/topic_rule_destination_resource_gen.go ../aws/iot/topic_rule_destination_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iotanalytics_channel -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Channel.json -package iotanalytics -- ../aws/iotanalytics/channel_resource_gen.go ../aws/iotanalytics/channel_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iotanalytics_dataset -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Dataset.json -package iotanalytics -- ../aws/iotanalytics/dataset_resource_gen.go ../aws/iotanalytics/dataset_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iotanalytics_datastore -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Datastore.json -package iotanalytics -- ../aws/iotanalytics/datastore_resource_gen.go ../aws/iotanalytics/datastore_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_iotanalytics_pipeline -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Pipeline.json -package iotanalytics -- ../aws/iotanalytics/pipeline_resource_gen.go ../aws/iotanalytics/pipeline_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iotcoredeviceadvisor_suite_definition -cfschema ../service/cloudformation/schemas/AWS_IoTCoreDeviceAdvisor_SuiteDefinition.json -package iotcoredeviceadvisor -- ../aws/iotcoredeviceadvisor/suite_definition_resource_gen.go ../aws/iotcoredeviceadvisor/suite_definition_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iotevents_alarm_model -cfschema ../service/cloudformation/schemas/AWS_IoTEvents_AlarmModel.json -package iotevents -- ../aws/iotevents/alarm_model_resource_gen.go ../aws/iotevents/alarm_model_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_iotevents_detector_model -cfschema ../service/cloudformation/schemas/AWS_IoTEvents_DetectorModel.json -package iotevents -- ../aws/iotevents/detector_model_resource_gen.go ../aws/iotevents/detector_model_resource_gen_test.go @@ -638,6 +655,7 @@ //go:generate go run generators/resource/main.go -resource awscc_omics_reference_store -cfschema ../service/cloudformation/schemas/AWS_Omics_ReferenceStore.json -package omics -- ../aws/omics/reference_store_resource_gen.go ../aws/omics/reference_store_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_omics_run_group -cfschema ../service/cloudformation/schemas/AWS_Omics_RunGroup.json -package omics -- ../aws/omics/run_group_resource_gen.go ../aws/omics/run_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_omics_sequence_store -cfschema ../service/cloudformation/schemas/AWS_Omics_SequenceStore.json -package omics -- ../aws/omics/sequence_store_resource_gen.go ../aws/omics/sequence_store_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_omics_variant_store -cfschema ../service/cloudformation/schemas/AWS_Omics_VariantStore.json -package omics -- ../aws/omics/variant_store_resource_gen.go ../aws/omics/variant_store_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_omics_workflow -cfschema ../service/cloudformation/schemas/AWS_Omics_Workflow.json -package omics -- ../aws/omics/workflow_resource_gen.go ../aws/omics/workflow_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_opensearchserverless_access_policy -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_AccessPolicy.json -package opensearchserverless -- ../aws/opensearchserverless/access_policy_resource_gen.go ../aws/opensearchserverless/access_policy_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_opensearchserverless_collection -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_Collection.json -package opensearchserverless -- ../aws/opensearchserverless/collection_resource_gen.go ../aws/opensearchserverless/collection_resource_gen_test.go @@ -645,6 +663,8 @@ //go:generate go run generators/resource/main.go -resource awscc_opensearchserverless_security_config -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_SecurityConfig.json -package opensearchserverless -- ../aws/opensearchserverless/security_config_resource_gen.go ../aws/opensearchserverless/security_config_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_opensearchserverless_security_policy -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_SecurityPolicy.json -package opensearchserverless -- ../aws/opensearchserverless/security_policy_resource_gen.go ../aws/opensearchserverless/security_policy_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_opensearchserverless_vpc_endpoint -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_VpcEndpoint.json -package opensearchserverless -- ../aws/opensearchserverless/vpc_endpoint_resource_gen.go ../aws/opensearchserverless/vpc_endpoint_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_opensearchservice_domain -cfschema ../service/cloudformation/schemas/AWS_OpenSearchService_Domain.json -package opensearchservice -- ../aws/opensearchservice/domain_resource_gen.go ../aws/opensearchservice/domain_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_opsworkscm_server -cfschema ../service/cloudformation/schemas/AWS_OpsWorksCM_Server.json -package opsworkscm -- ../aws/opsworkscm/server_resource_gen.go ../aws/opsworkscm/server_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_organizations_account -cfschema ../service/cloudformation/schemas/AWS_Organizations_Account.json -package organizations -- ../aws/organizations/account_resource_gen.go ../aws/organizations/account_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_organizations_organization -cfschema ../service/cloudformation/schemas/AWS_Organizations_Organization.json -package organizations -- ../aws/organizations/organization_resource_gen.go ../aws/organizations/organization_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_organizations_organizational_unit -cfschema ../service/cloudformation/schemas/AWS_Organizations_OrganizationalUnit.json -package organizations -- ../aws/organizations/organizational_unit_resource_gen.go ../aws/organizations/organizational_unit_resource_gen_test.go @@ -664,6 +684,7 @@ //go:generate go run generators/resource/main.go -resource awscc_personalize_solution -cfschema ../service/cloudformation/schemas/AWS_Personalize_Solution.json -package personalize -- ../aws/personalize/solution_resource_gen.go ../aws/personalize/solution_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_pinpoint_in_app_template -cfschema ../service/cloudformation/schemas/AWS_Pinpoint_InAppTemplate.json -package pinpoint -- ../aws/pinpoint/in_app_template_resource_gen.go ../aws/pinpoint/in_app_template_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_pipes_pipe -cfschema ../service/cloudformation/schemas/AWS_Pipes_Pipe.json -package pipes -- ../aws/pipes/pipe_resource_gen.go ../aws/pipes/pipe_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_proton_environment_account_connection -cfschema ../service/cloudformation/schemas/AWS_Proton_EnvironmentAccountConnection.json -package proton -- ../aws/proton/environment_account_connection_resource_gen.go ../aws/proton/environment_account_connection_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_proton_environment_template -cfschema ../service/cloudformation/schemas/AWS_Proton_EnvironmentTemplate.json -package proton -- ../aws/proton/environment_template_resource_gen.go ../aws/proton/environment_template_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_proton_service_template -cfschema ../service/cloudformation/schemas/AWS_Proton_ServiceTemplate.json -package proton -- ../aws/proton/service_template_resource_gen.go ../aws/proton/service_template_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_qldb_stream -cfschema ../service/cloudformation/schemas/AWS_QLDB_Stream.json -package qldb -- ../aws/qldb/stream_resource_gen.go ../aws/qldb/stream_resource_gen_test.go @@ -691,6 +712,7 @@ //go:generate go run generators/resource/main.go -resource awscc_rds_integration -cfschema ../service/cloudformation/schemas/AWS_RDS_Integration.json -package rds -- ../aws/rds/integration_resource_gen.go ../aws/rds/integration_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_rds_option_group -cfschema ../service/cloudformation/schemas/AWS_RDS_OptionGroup.json -package rds -- ../aws/rds/option_group_resource_gen.go ../aws/rds/option_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_rum_app_monitor -cfschema ../service/cloudformation/schemas/AWS_RUM_AppMonitor.json -package rum -- ../aws/rum/app_monitor_resource_gen.go ../aws/rum/app_monitor_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_redshift_cluster -cfschema ../service/cloudformation/schemas/AWS_Redshift_Cluster.json -package redshift -- ../aws/redshift/cluster_resource_gen.go ../aws/redshift/cluster_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_redshift_cluster_parameter_group -cfschema ../service/cloudformation/schemas/AWS_Redshift_ClusterParameterGroup.json -package redshift -- ../aws/redshift/cluster_parameter_group_resource_gen.go ../aws/redshift/cluster_parameter_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_redshift_cluster_subnet_group -cfschema ../service/cloudformation/schemas/AWS_Redshift_ClusterSubnetGroup.json -package redshift -- ../aws/redshift/cluster_subnet_group_resource_gen.go ../aws/redshift/cluster_subnet_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_redshift_endpoint_access -cfschema ../service/cloudformation/schemas/AWS_Redshift_EndpointAccess.json -package redshift -- ../aws/redshift/endpoint_access_resource_gen.go ../aws/redshift/endpoint_access_resource_gen_test.go @@ -759,6 +781,7 @@ //go:generate go run generators/resource/main.go -resource awscc_s3outposts_access_point -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_AccessPoint.json -package s3outposts -- ../aws/s3outposts/access_point_resource_gen.go ../aws/s3outposts/access_point_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_s3outposts_bucket -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_Bucket.json -package s3outposts -- ../aws/s3outposts/bucket_resource_gen.go ../aws/s3outposts/bucket_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_s3outposts_bucket_policy -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_BucketPolicy.json -package s3outposts -- ../aws/s3outposts/bucket_policy_resource_gen.go ../aws/s3outposts/bucket_policy_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_s3outposts_endpoint -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_Endpoint.json -package s3outposts -- ../aws/s3outposts/endpoint_resource_gen.go ../aws/s3outposts/endpoint_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ses_configuration_set -cfschema ../service/cloudformation/schemas/AWS_SES_ConfigurationSet.json -package ses -- ../aws/ses/configuration_set_resource_gen.go ../aws/ses/configuration_set_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ses_configuration_set_event_destination -cfschema ../service/cloudformation/schemas/AWS_SES_ConfigurationSetEventDestination.json -package ses -- ../aws/ses/configuration_set_event_destination_resource_gen.go ../aws/ses/configuration_set_event_destination_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ses_contact_list -cfschema ../service/cloudformation/schemas/AWS_SES_ContactList.json -package ses -- ../aws/ses/contact_list_resource_gen.go ../aws/ses/contact_list_resource_gen_test.go @@ -766,6 +789,7 @@ //go:generate go run generators/resource/main.go -resource awscc_ses_email_identity -cfschema ../service/cloudformation/schemas/AWS_SES_EmailIdentity.json -package ses -- ../aws/ses/email_identity_resource_gen.go ../aws/ses/email_identity_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ses_template -cfschema ../service/cloudformation/schemas/AWS_SES_Template.json -package ses -- ../aws/ses/template_resource_gen.go ../aws/ses/template_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ses_vdm_attributes -cfschema ../service/cloudformation/schemas/AWS_SES_VdmAttributes.json -package ses -- ../aws/ses/vdm_attributes_resource_gen.go ../aws/ses/vdm_attributes_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_sns_topic -cfschema ../service/cloudformation/schemas/AWS_SNS_Topic.json -package sns -- ../aws/sns/topic_resource_gen.go ../aws/sns/topic_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_sns_topic_inline_policy -cfschema ../service/cloudformation/schemas/AWS_SNS_TopicInlinePolicy.json -package sns -- ../aws/sns/topic_inline_policy_resource_gen.go ../aws/sns/topic_inline_policy_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_sns_topic_policy -cfschema ../service/cloudformation/schemas/AWS_SNS_TopicPolicy.json -package sns -- ../aws/sns/topic_policy_resource_gen.go ../aws/sns/topic_policy_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_ssm_association -cfschema ../service/cloudformation/schemas/AWS_SSM_Association.json -package ssm -- ../aws/ssm/association_resource_gen.go ../aws/ssm/association_resource_gen_test.go @@ -832,6 +856,8 @@ //go:generate go run generators/resource/main.go -resource awscc_supportapp_account_alias -cfschema ../service/cloudformation/schemas/AWS_SupportApp_AccountAlias.json -package supportapp -- ../aws/supportapp/account_alias_resource_gen.go ../aws/supportapp/account_alias_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_supportapp_slack_channel_configuration -cfschema ../service/cloudformation/schemas/AWS_SupportApp_SlackChannelConfiguration.json -package supportapp -- ../aws/supportapp/slack_channel_configuration_resource_gen.go ../aws/supportapp/slack_channel_configuration_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_supportapp_slack_workspace_configuration -cfschema ../service/cloudformation/schemas/AWS_SupportApp_SlackWorkspaceConfiguration.json -package supportapp -- ../aws/supportapp/slack_workspace_configuration_resource_gen.go ../aws/supportapp/slack_workspace_configuration_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_synthetics_canary -cfschema ../service/cloudformation/schemas/AWS_Synthetics_Canary.json -package synthetics -- ../aws/synthetics/canary_resource_gen.go ../aws/synthetics/canary_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_synthetics_group -cfschema ../service/cloudformation/schemas/AWS_Synthetics_Group.json -package synthetics -- ../aws/synthetics/group_resource_gen.go ../aws/synthetics/group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_systemsmanagersap_application -cfschema ../service/cloudformation/schemas/AWS_SystemsManagerSAP_Application.json -package systemsmanagersap -- ../aws/systemsmanagersap/application_resource_gen.go ../aws/systemsmanagersap/application_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_timestream_database -cfschema ../service/cloudformation/schemas/AWS_Timestream_Database.json -package timestream -- ../aws/timestream/database_resource_gen.go ../aws/timestream/database_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_timestream_scheduled_query -cfschema ../service/cloudformation/schemas/AWS_Timestream_ScheduledQuery.json -package timestream -- ../aws/timestream/scheduled_query_resource_gen.go ../aws/timestream/scheduled_query_resource_gen_test.go @@ -846,8 +872,16 @@ //go:generate go run generators/resource/main.go -resource awscc_verifiedpermissions_policy -cfschema ../service/cloudformation/schemas/AWS_VerifiedPermissions_Policy.json -package verifiedpermissions -- ../aws/verifiedpermissions/policy_resource_gen.go ../aws/verifiedpermissions/policy_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_verifiedpermissions_policy_store -cfschema ../service/cloudformation/schemas/AWS_VerifiedPermissions_PolicyStore.json -package verifiedpermissions -- ../aws/verifiedpermissions/policy_store_resource_gen.go ../aws/verifiedpermissions/policy_store_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_verifiedpermissions_policy_template -cfschema ../service/cloudformation/schemas/AWS_VerifiedPermissions_PolicyTemplate.json -package verifiedpermissions -- ../aws/verifiedpermissions/policy_template_resource_gen.go ../aws/verifiedpermissions/policy_template_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_access_log_subscription -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_AccessLogSubscription.json -package vpclattice -- ../aws/vpclattice/access_log_subscription_resource_gen.go ../aws/vpclattice/access_log_subscription_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_vpclattice_auth_policy -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_AuthPolicy.json -package vpclattice -- ../aws/vpclattice/auth_policy_resource_gen.go ../aws/vpclattice/auth_policy_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_listener -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_Listener.json -package vpclattice -- ../aws/vpclattice/listener_resource_gen.go ../aws/vpclattice/listener_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_vpclattice_resource_policy -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ResourcePolicy.json -package vpclattice -- ../aws/vpclattice/resource_policy_resource_gen.go ../aws/vpclattice/resource_policy_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_rule -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_Rule.json -package vpclattice -- ../aws/vpclattice/rule_resource_gen.go ../aws/vpclattice/rule_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_service -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_Service.json -package vpclattice -- ../aws/vpclattice/service_resource_gen.go ../aws/vpclattice/service_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_service_network -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ServiceNetwork.json -package vpclattice -- ../aws/vpclattice/service_network_resource_gen.go ../aws/vpclattice/service_network_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_service_network_service_association -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ServiceNetworkServiceAssociation.json -package vpclattice -- ../aws/vpclattice/service_network_service_association_resource_gen.go ../aws/vpclattice/service_network_service_association_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_service_network_vpc_association -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ServiceNetworkVpcAssociation.json -package vpclattice -- ../aws/vpclattice/service_network_vpc_association_resource_gen.go ../aws/vpclattice/service_network_vpc_association_resource_gen_test.go +//go:generate go run generators/resource/main.go -resource awscc_vpclattice_target_group -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_TargetGroup.json -package vpclattice -- ../aws/vpclattice/target_group_resource_gen.go ../aws/vpclattice/target_group_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_wafv2_ip_set -cfschema ../service/cloudformation/schemas/AWS_WAFv2_IPSet.json -package wafv2 -- ../aws/wafv2/ip_set_resource_gen.go ../aws/wafv2/ip_set_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_wafv2_logging_configuration -cfschema ../service/cloudformation/schemas/AWS_WAFv2_LoggingConfiguration.json -package wafv2 -- ../aws/wafv2/logging_configuration_resource_gen.go ../aws/wafv2/logging_configuration_resource_gen_test.go //go:generate go run generators/resource/main.go -resource awscc_wafv2_regex_pattern_set -cfschema ../service/cloudformation/schemas/AWS_WAFv2_RegexPatternSet.json -package wafv2 -- ../aws/wafv2/regex_pattern_set_resource_gen.go ../aws/wafv2/regex_pattern_set_resource_gen_test.go @@ -959,6 +993,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/inspectorv2" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/internetmonitor" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iot" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotanalytics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotcoredeviceadvisor" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotevents" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotfleethub" @@ -967,6 +1002,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iottwinmaker" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotwireless" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ivs" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ivschat" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kafkaconnect" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kendra" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kendraranking" @@ -1004,6 +1040,8 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/oam" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/omics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opensearchserverless" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opensearchservice" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opsworkscm" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/organizations" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/osis" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/panorama" @@ -1053,6 +1091,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/sso" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/stepfunctions" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/supportapp" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/synthetics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/systemsmanagersap" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/timestream" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/transfer" diff --git a/internal/provider/singular_data_sources.go b/internal/provider/singular_data_sources.go index 8e0fb8a99..435ab492e 100644 --- a/internal/provider/singular_data_sources.go +++ b/internal/provider/singular_data_sources.go @@ -16,6 +16,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_account -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_Account.json -package apigateway ../aws/apigateway/account_singular_data_source_gen.go ../aws/apigateway/account_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_api_key -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_ApiKey.json -package apigateway ../aws/apigateway/api_key_singular_data_source_gen.go ../aws/apigateway/api_key_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_authorizer -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_Authorizer.json -package apigateway ../aws/apigateway/authorizer_singular_data_source_gen.go ../aws/apigateway/authorizer_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_base_path_mapping -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_BasePathMapping.json -package apigateway ../aws/apigateway/base_path_mapping_singular_data_source_gen.go ../aws/apigateway/base_path_mapping_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_client_certificate -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_ClientCertificate.json -package apigateway ../aws/apigateway/client_certificate_singular_data_source_gen.go ../aws/apigateway/client_certificate_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_deployment -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_Deployment.json -package apigateway ../aws/apigateway/deployment_singular_data_source_gen.go ../aws/apigateway/deployment_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apigateway_documentation_part -cfschema ../service/cloudformation/schemas/AWS_ApiGateway_DocumentationPart.json -package apigateway ../aws/apigateway/documentation_part_singular_data_source_gen.go ../aws/apigateway/documentation_part_singular_data_source_gen_test.go @@ -47,7 +48,9 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_appflow_connector -cfschema ../service/cloudformation/schemas/AWS_AppFlow_Connector.json -package appflow ../aws/appflow/connector_singular_data_source_gen.go ../aws/appflow/connector_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_appflow_connector_profile -cfschema ../service/cloudformation/schemas/AWS_AppFlow_ConnectorProfile.json -package appflow ../aws/appflow/connector_profile_singular_data_source_gen.go ../aws/appflow/connector_profile_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_appflow_flow -cfschema ../service/cloudformation/schemas/AWS_AppFlow_Flow.json -package appflow ../aws/appflow/flow_singular_data_source_gen.go ../aws/appflow/flow_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_appintegrations_application -cfschema ../service/cloudformation/schemas/AWS_AppIntegrations_Application.json -package appintegrations ../aws/appintegrations/application_singular_data_source_gen.go ../aws/appintegrations/application_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_appintegrations_event_integration -cfschema ../service/cloudformation/schemas/AWS_AppIntegrations_EventIntegration.json -package appintegrations ../aws/appintegrations/event_integration_singular_data_source_gen.go ../aws/appintegrations/event_integration_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_applicationautoscaling_scalable_target -cfschema ../service/cloudformation/schemas/AWS_ApplicationAutoScaling_ScalableTarget.json -package applicationautoscaling ../aws/applicationautoscaling/scalable_target_singular_data_source_gen.go ../aws/applicationautoscaling/scalable_target_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_applicationautoscaling_scaling_policy -cfschema ../service/cloudformation/schemas/AWS_ApplicationAutoScaling_ScalingPolicy.json -package applicationautoscaling ../aws/applicationautoscaling/scaling_policy_singular_data_source_gen.go ../aws/applicationautoscaling/scaling_policy_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apprunner_auto_scaling_configuration -cfschema ../service/cloudformation/schemas/AWS_AppRunner_AutoScalingConfiguration.json -package apprunner ../aws/apprunner/auto_scaling_configuration_singular_data_source_gen.go ../aws/apprunner/auto_scaling_configuration_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_apprunner_observability_configuration -cfschema ../service/cloudformation/schemas/AWS_AppRunner_ObservabilityConfiguration.json -package apprunner ../aws/apprunner/observability_configuration_singular_data_source_gen.go ../aws/apprunner/observability_configuration_singular_data_source_gen_test.go @@ -131,6 +134,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_distribution -cfschema ../service/cloudformation/schemas/AWS_CloudFront_Distribution.json -package cloudfront ../aws/cloudfront/distribution_singular_data_source_gen.go ../aws/cloudfront/distribution_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_function -cfschema ../service/cloudformation/schemas/AWS_CloudFront_Function.json -package cloudfront ../aws/cloudfront/function_singular_data_source_gen.go ../aws/cloudfront/function_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_key_group -cfschema ../service/cloudformation/schemas/AWS_CloudFront_KeyGroup.json -package cloudfront ../aws/cloudfront/key_group_singular_data_source_gen.go ../aws/cloudfront/key_group_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_key_value_store -cfschema ../service/cloudformation/schemas/AWS_CloudFront_KeyValueStore.json -package cloudfront ../aws/cloudfront/key_value_store_singular_data_source_gen.go ../aws/cloudfront/key_value_store_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_monitoring_subscription -cfschema ../service/cloudformation/schemas/AWS_CloudFront_MonitoringSubscription.json -package cloudfront ../aws/cloudfront/monitoring_subscription_singular_data_source_gen.go ../aws/cloudfront/monitoring_subscription_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_origin_access_control -cfschema ../service/cloudformation/schemas/AWS_CloudFront_OriginAccessControl.json -package cloudfront ../aws/cloudfront/origin_access_control_singular_data_source_gen.go ../aws/cloudfront/origin_access_control_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_cloudfront_origin_request_policy -cfschema ../service/cloudformation/schemas/AWS_CloudFront_OriginRequestPolicy.json -package cloudfront ../aws/cloudfront/origin_request_policy_singular_data_source_gen.go ../aws/cloudfront/origin_request_policy_singular_data_source_gen_test.go @@ -173,6 +177,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_contact_flow -cfschema ../service/cloudformation/schemas/AWS_Connect_ContactFlow.json -package connect ../aws/connect/contact_flow_singular_data_source_gen.go ../aws/connect/contact_flow_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_contact_flow_module -cfschema ../service/cloudformation/schemas/AWS_Connect_ContactFlowModule.json -package connect ../aws/connect/contact_flow_module_singular_data_source_gen.go ../aws/connect/contact_flow_module_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_hours_of_operation -cfschema ../service/cloudformation/schemas/AWS_Connect_HoursOfOperation.json -package connect ../aws/connect/hours_of_operation_singular_data_source_gen.go ../aws/connect/hours_of_operation_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_instance -cfschema ../service/cloudformation/schemas/AWS_Connect_Instance.json -package connect ../aws/connect/instance_singular_data_source_gen.go ../aws/connect/instance_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_instance_storage_config -cfschema ../service/cloudformation/schemas/AWS_Connect_InstanceStorageConfig.json -package connect ../aws/connect/instance_storage_config_singular_data_source_gen.go ../aws/connect/instance_storage_config_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_integration_association -cfschema ../service/cloudformation/schemas/AWS_Connect_IntegrationAssociation.json -package connect ../aws/connect/integration_association_singular_data_source_gen.go ../aws/connect/integration_association_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_connect_phone_number -cfschema ../service/cloudformation/schemas/AWS_Connect_PhoneNumber.json -package connect ../aws/connect/phone_number_singular_data_source_gen.go ../aws/connect/phone_number_singular_data_source_gen_test.go @@ -298,6 +303,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_transit_gateway_vpc_attachment -cfschema ../service/cloudformation/schemas/AWS_EC2_TransitGatewayVpcAttachment.json -package ec2 ../aws/ec2/transit_gateway_vpc_attachment_singular_data_source_gen.go ../aws/ec2/transit_gateway_vpc_attachment_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_vpc -cfschema ../service/cloudformation/schemas/AWS_EC2_VPC.json -package ec2 ../aws/ec2/vpc_singular_data_source_gen.go ../aws/ec2/vpc_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_vpc_cidr_block -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCCidrBlock.json -package ec2 ../aws/ec2/vpc_cidr_block_singular_data_source_gen.go ../aws/ec2/vpc_cidr_block_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_vpcdhcp_options_association -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCDHCPOptionsAssociation.json -package ec2 ../aws/ec2/vpcdhcp_options_association_singular_data_source_gen.go ../aws/ec2/vpcdhcp_options_association_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_vpc_endpoint -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCEndpoint.json -package ec2 ../aws/ec2/vpc_endpoint_singular_data_source_gen.go ../aws/ec2/vpc_endpoint_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_vpc_endpoint_service -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCEndpointService.json -package ec2 ../aws/ec2/vpc_endpoint_service_singular_data_source_gen.go ../aws/ec2/vpc_endpoint_service_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ec2_vpc_endpoint_service_permissions -cfschema ../service/cloudformation/schemas/AWS_EC2_VPCEndpointServicePermissions.json -package ec2 ../aws/ec2/vpc_endpoint_service_permissions_singular_data_source_gen.go ../aws/ec2/vpc_endpoint_service_permissions_singular_data_source_gen_test.go @@ -403,6 +409,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_grafana_workspace -cfschema ../service/cloudformation/schemas/AWS_Grafana_Workspace.json -package grafana ../aws/grafana/workspace_singular_data_source_gen.go ../aws/grafana/workspace_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_greengrassv2_component_version -cfschema ../service/cloudformation/schemas/AWS_GreengrassV2_ComponentVersion.json -package greengrassv2 ../aws/greengrassv2/component_version_singular_data_source_gen.go ../aws/greengrassv2/component_version_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_greengrassv2_deployment -cfschema ../service/cloudformation/schemas/AWS_GreengrassV2_Deployment.json -package greengrassv2 ../aws/greengrassv2/deployment_singular_data_source_gen.go ../aws/greengrassv2/deployment_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_groundstation_config -cfschema ../service/cloudformation/schemas/AWS_GroundStation_Config.json -package groundstation ../aws/groundstation/config_singular_data_source_gen.go ../aws/groundstation/config_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_groundstation_dataflow_endpoint_group -cfschema ../service/cloudformation/schemas/AWS_GroundStation_DataflowEndpointGroup.json -package groundstation ../aws/groundstation/dataflow_endpoint_group_singular_data_source_gen.go ../aws/groundstation/dataflow_endpoint_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_groundstation_mission_profile -cfschema ../service/cloudformation/schemas/AWS_GroundStation_MissionProfile.json -package groundstation ../aws/groundstation/mission_profile_singular_data_source_gen.go ../aws/groundstation/mission_profile_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_guardduty_detector -cfschema ../service/cloudformation/schemas/AWS_GuardDuty_Detector.json -package guardduty ../aws/guardduty/detector_singular_data_source_gen.go ../aws/guardduty/detector_singular_data_source_gen_test.go @@ -430,6 +437,8 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_ivs_recording_configuration -cfschema ../service/cloudformation/schemas/AWS_IVS_RecordingConfiguration.json -package ivs ../aws/ivs/recording_configuration_singular_data_source_gen.go ../aws/ivs/recording_configuration_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ivs_stage -cfschema ../service/cloudformation/schemas/AWS_IVS_Stage.json -package ivs ../aws/ivs/stage_singular_data_source_gen.go ../aws/ivs/stage_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ivs_stream_key -cfschema ../service/cloudformation/schemas/AWS_IVS_StreamKey.json -package ivs ../aws/ivs/stream_key_singular_data_source_gen.go ../aws/ivs/stream_key_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_ivschat_logging_configuration -cfschema ../service/cloudformation/schemas/AWS_IVSChat_LoggingConfiguration.json -package ivschat ../aws/ivschat/logging_configuration_singular_data_source_gen.go ../aws/ivschat/logging_configuration_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_ivschat_room -cfschema ../service/cloudformation/schemas/AWS_IVSChat_Room.json -package ivschat ../aws/ivschat/room_singular_data_source_gen.go ../aws/ivschat/room_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_identitystore_group -cfschema ../service/cloudformation/schemas/AWS_IdentityStore_Group.json -package identitystore ../aws/identitystore/group_singular_data_source_gen.go ../aws/identitystore/group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_identitystore_group_membership -cfschema ../service/cloudformation/schemas/AWS_IdentityStore_GroupMembership.json -package identitystore ../aws/identitystore/group_membership_singular_data_source_gen.go ../aws/identitystore/group_membership_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_inspector_assessment_target -cfschema ../service/cloudformation/schemas/AWS_Inspector_AssessmentTarget.json -package inspector ../aws/inspector/assessment_target_singular_data_source_gen.go ../aws/inspector/assessment_target_singular_data_source_gen_test.go @@ -447,6 +456,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_internetmonitor_monitor -cfschema ../service/cloudformation/schemas/AWS_InternetMonitor_Monitor.json -package internetmonitor ../aws/internetmonitor/monitor_singular_data_source_gen.go ../aws/internetmonitor/monitor_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_account_audit_configuration -cfschema ../service/cloudformation/schemas/AWS_IoT_AccountAuditConfiguration.json -package iot ../aws/iot/account_audit_configuration_singular_data_source_gen.go ../aws/iot/account_audit_configuration_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_authorizer -cfschema ../service/cloudformation/schemas/AWS_IoT_Authorizer.json -package iot ../aws/iot/authorizer_singular_data_source_gen.go ../aws/iot/authorizer_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_billing_group -cfschema ../service/cloudformation/schemas/AWS_IoT_BillingGroup.json -package iot ../aws/iot/billing_group_singular_data_source_gen.go ../aws/iot/billing_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_ca_certificate -cfschema ../service/cloudformation/schemas/AWS_IoT_CACertificate.json -package iot ../aws/iot/ca_certificate_singular_data_source_gen.go ../aws/iot/ca_certificate_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_certificate -cfschema ../service/cloudformation/schemas/AWS_IoT_Certificate.json -package iot ../aws/iot/certificate_singular_data_source_gen.go ../aws/iot/certificate_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_certificate_provider -cfschema ../service/cloudformation/schemas/AWS_IoT_CertificateProvider.json -package iot ../aws/iot/certificate_provider_singular_data_source_gen.go ../aws/iot/certificate_provider_singular_data_source_gen_test.go @@ -465,8 +475,15 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_security_profile -cfschema ../service/cloudformation/schemas/AWS_IoT_SecurityProfile.json -package iot ../aws/iot/security_profile_singular_data_source_gen.go ../aws/iot/security_profile_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_software_package -cfschema ../service/cloudformation/schemas/AWS_IoT_SoftwarePackage.json -package iot ../aws/iot/software_package_singular_data_source_gen.go ../aws/iot/software_package_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_software_package_version -cfschema ../service/cloudformation/schemas/AWS_IoT_SoftwarePackageVersion.json -package iot ../aws/iot/software_package_version_singular_data_source_gen.go ../aws/iot/software_package_version_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_thing -cfschema ../service/cloudformation/schemas/AWS_IoT_Thing.json -package iot ../aws/iot/thing_singular_data_source_gen.go ../aws/iot/thing_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_thing_group -cfschema ../service/cloudformation/schemas/AWS_IoT_ThingGroup.json -package iot ../aws/iot/thing_group_singular_data_source_gen.go ../aws/iot/thing_group_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_thing_type -cfschema ../service/cloudformation/schemas/AWS_IoT_ThingType.json -package iot ../aws/iot/thing_type_singular_data_source_gen.go ../aws/iot/thing_type_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_topic_rule -cfschema ../service/cloudformation/schemas/AWS_IoT_TopicRule.json -package iot ../aws/iot/topic_rule_singular_data_source_gen.go ../aws/iot/topic_rule_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iot_topic_rule_destination -cfschema ../service/cloudformation/schemas/AWS_IoT_TopicRuleDestination.json -package iot ../aws/iot/topic_rule_destination_singular_data_source_gen.go ../aws/iot/topic_rule_destination_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iotanalytics_channel -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Channel.json -package iotanalytics ../aws/iotanalytics/channel_singular_data_source_gen.go ../aws/iotanalytics/channel_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iotanalytics_dataset -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Dataset.json -package iotanalytics ../aws/iotanalytics/dataset_singular_data_source_gen.go ../aws/iotanalytics/dataset_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iotanalytics_datastore -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Datastore.json -package iotanalytics ../aws/iotanalytics/datastore_singular_data_source_gen.go ../aws/iotanalytics/datastore_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_iotanalytics_pipeline -cfschema ../service/cloudformation/schemas/AWS_IoTAnalytics_Pipeline.json -package iotanalytics ../aws/iotanalytics/pipeline_singular_data_source_gen.go ../aws/iotanalytics/pipeline_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iotcoredeviceadvisor_suite_definition -cfschema ../service/cloudformation/schemas/AWS_IoTCoreDeviceAdvisor_SuiteDefinition.json -package iotcoredeviceadvisor ../aws/iotcoredeviceadvisor/suite_definition_singular_data_source_gen.go ../aws/iotcoredeviceadvisor/suite_definition_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iotevents_alarm_model -cfschema ../service/cloudformation/schemas/AWS_IoTEvents_AlarmModel.json -package iotevents ../aws/iotevents/alarm_model_singular_data_source_gen.go ../aws/iotevents/alarm_model_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_iotevents_detector_model -cfschema ../service/cloudformation/schemas/AWS_IoTEvents_DetectorModel.json -package iotevents ../aws/iotevents/detector_model_singular_data_source_gen.go ../aws/iotevents/detector_model_singular_data_source_gen_test.go @@ -638,6 +655,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_omics_reference_store -cfschema ../service/cloudformation/schemas/AWS_Omics_ReferenceStore.json -package omics ../aws/omics/reference_store_singular_data_source_gen.go ../aws/omics/reference_store_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_omics_run_group -cfschema ../service/cloudformation/schemas/AWS_Omics_RunGroup.json -package omics ../aws/omics/run_group_singular_data_source_gen.go ../aws/omics/run_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_omics_sequence_store -cfschema ../service/cloudformation/schemas/AWS_Omics_SequenceStore.json -package omics ../aws/omics/sequence_store_singular_data_source_gen.go ../aws/omics/sequence_store_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_omics_variant_store -cfschema ../service/cloudformation/schemas/AWS_Omics_VariantStore.json -package omics ../aws/omics/variant_store_singular_data_source_gen.go ../aws/omics/variant_store_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_omics_workflow -cfschema ../service/cloudformation/schemas/AWS_Omics_Workflow.json -package omics ../aws/omics/workflow_singular_data_source_gen.go ../aws/omics/workflow_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_opensearchserverless_access_policy -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_AccessPolicy.json -package opensearchserverless ../aws/opensearchserverless/access_policy_singular_data_source_gen.go ../aws/opensearchserverless/access_policy_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_opensearchserverless_collection -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_Collection.json -package opensearchserverless ../aws/opensearchserverless/collection_singular_data_source_gen.go ../aws/opensearchserverless/collection_singular_data_source_gen_test.go @@ -645,6 +663,8 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_opensearchserverless_security_config -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_SecurityConfig.json -package opensearchserverless ../aws/opensearchserverless/security_config_singular_data_source_gen.go ../aws/opensearchserverless/security_config_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_opensearchserverless_security_policy -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_SecurityPolicy.json -package opensearchserverless ../aws/opensearchserverless/security_policy_singular_data_source_gen.go ../aws/opensearchserverless/security_policy_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_opensearchserverless_vpc_endpoint -cfschema ../service/cloudformation/schemas/AWS_OpenSearchServerless_VpcEndpoint.json -package opensearchserverless ../aws/opensearchserverless/vpc_endpoint_singular_data_source_gen.go ../aws/opensearchserverless/vpc_endpoint_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_opensearchservice_domain -cfschema ../service/cloudformation/schemas/AWS_OpenSearchService_Domain.json -package opensearchservice ../aws/opensearchservice/domain_singular_data_source_gen.go ../aws/opensearchservice/domain_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_opsworkscm_server -cfschema ../service/cloudformation/schemas/AWS_OpsWorksCM_Server.json -package opsworkscm ../aws/opsworkscm/server_singular_data_source_gen.go ../aws/opsworkscm/server_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_organizations_account -cfschema ../service/cloudformation/schemas/AWS_Organizations_Account.json -package organizations ../aws/organizations/account_singular_data_source_gen.go ../aws/organizations/account_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_organizations_organization -cfschema ../service/cloudformation/schemas/AWS_Organizations_Organization.json -package organizations ../aws/organizations/organization_singular_data_source_gen.go ../aws/organizations/organization_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_organizations_organizational_unit -cfschema ../service/cloudformation/schemas/AWS_Organizations_OrganizationalUnit.json -package organizations ../aws/organizations/organizational_unit_singular_data_source_gen.go ../aws/organizations/organizational_unit_singular_data_source_gen_test.go @@ -664,6 +684,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_personalize_solution -cfschema ../service/cloudformation/schemas/AWS_Personalize_Solution.json -package personalize ../aws/personalize/solution_singular_data_source_gen.go ../aws/personalize/solution_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_pinpoint_in_app_template -cfschema ../service/cloudformation/schemas/AWS_Pinpoint_InAppTemplate.json -package pinpoint ../aws/pinpoint/in_app_template_singular_data_source_gen.go ../aws/pinpoint/in_app_template_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_pipes_pipe -cfschema ../service/cloudformation/schemas/AWS_Pipes_Pipe.json -package pipes ../aws/pipes/pipe_singular_data_source_gen.go ../aws/pipes/pipe_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_proton_environment_account_connection -cfschema ../service/cloudformation/schemas/AWS_Proton_EnvironmentAccountConnection.json -package proton ../aws/proton/environment_account_connection_singular_data_source_gen.go ../aws/proton/environment_account_connection_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_proton_environment_template -cfschema ../service/cloudformation/schemas/AWS_Proton_EnvironmentTemplate.json -package proton ../aws/proton/environment_template_singular_data_source_gen.go ../aws/proton/environment_template_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_proton_service_template -cfschema ../service/cloudformation/schemas/AWS_Proton_ServiceTemplate.json -package proton ../aws/proton/service_template_singular_data_source_gen.go ../aws/proton/service_template_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_qldb_stream -cfschema ../service/cloudformation/schemas/AWS_QLDB_Stream.json -package qldb ../aws/qldb/stream_singular_data_source_gen.go ../aws/qldb/stream_singular_data_source_gen_test.go @@ -691,6 +712,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_rds_integration -cfschema ../service/cloudformation/schemas/AWS_RDS_Integration.json -package rds ../aws/rds/integration_singular_data_source_gen.go ../aws/rds/integration_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_rds_option_group -cfschema ../service/cloudformation/schemas/AWS_RDS_OptionGroup.json -package rds ../aws/rds/option_group_singular_data_source_gen.go ../aws/rds/option_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_rum_app_monitor -cfschema ../service/cloudformation/schemas/AWS_RUM_AppMonitor.json -package rum ../aws/rum/app_monitor_singular_data_source_gen.go ../aws/rum/app_monitor_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_redshift_cluster -cfschema ../service/cloudformation/schemas/AWS_Redshift_Cluster.json -package redshift ../aws/redshift/cluster_singular_data_source_gen.go ../aws/redshift/cluster_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_redshift_cluster_parameter_group -cfschema ../service/cloudformation/schemas/AWS_Redshift_ClusterParameterGroup.json -package redshift ../aws/redshift/cluster_parameter_group_singular_data_source_gen.go ../aws/redshift/cluster_parameter_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_redshift_cluster_subnet_group -cfschema ../service/cloudformation/schemas/AWS_Redshift_ClusterSubnetGroup.json -package redshift ../aws/redshift/cluster_subnet_group_singular_data_source_gen.go ../aws/redshift/cluster_subnet_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_redshift_endpoint_access -cfschema ../service/cloudformation/schemas/AWS_Redshift_EndpointAccess.json -package redshift ../aws/redshift/endpoint_access_singular_data_source_gen.go ../aws/redshift/endpoint_access_singular_data_source_gen_test.go @@ -759,6 +781,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_s3outposts_access_point -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_AccessPoint.json -package s3outposts ../aws/s3outposts/access_point_singular_data_source_gen.go ../aws/s3outposts/access_point_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_s3outposts_bucket -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_Bucket.json -package s3outposts ../aws/s3outposts/bucket_singular_data_source_gen.go ../aws/s3outposts/bucket_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_s3outposts_bucket_policy -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_BucketPolicy.json -package s3outposts ../aws/s3outposts/bucket_policy_singular_data_source_gen.go ../aws/s3outposts/bucket_policy_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_s3outposts_endpoint -cfschema ../service/cloudformation/schemas/AWS_S3Outposts_Endpoint.json -package s3outposts ../aws/s3outposts/endpoint_singular_data_source_gen.go ../aws/s3outposts/endpoint_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ses_configuration_set -cfschema ../service/cloudformation/schemas/AWS_SES_ConfigurationSet.json -package ses ../aws/ses/configuration_set_singular_data_source_gen.go ../aws/ses/configuration_set_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ses_configuration_set_event_destination -cfschema ../service/cloudformation/schemas/AWS_SES_ConfigurationSetEventDestination.json -package ses ../aws/ses/configuration_set_event_destination_singular_data_source_gen.go ../aws/ses/configuration_set_event_destination_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ses_contact_list -cfschema ../service/cloudformation/schemas/AWS_SES_ContactList.json -package ses ../aws/ses/contact_list_singular_data_source_gen.go ../aws/ses/contact_list_singular_data_source_gen_test.go @@ -766,6 +789,7 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_ses_email_identity -cfschema ../service/cloudformation/schemas/AWS_SES_EmailIdentity.json -package ses ../aws/ses/email_identity_singular_data_source_gen.go ../aws/ses/email_identity_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ses_template -cfschema ../service/cloudformation/schemas/AWS_SES_Template.json -package ses ../aws/ses/template_singular_data_source_gen.go ../aws/ses/template_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ses_vdm_attributes -cfschema ../service/cloudformation/schemas/AWS_SES_VdmAttributes.json -package ses ../aws/ses/vdm_attributes_singular_data_source_gen.go ../aws/ses/vdm_attributes_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_sns_topic -cfschema ../service/cloudformation/schemas/AWS_SNS_Topic.json -package sns ../aws/sns/topic_singular_data_source_gen.go ../aws/sns/topic_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_sns_topic_inline_policy -cfschema ../service/cloudformation/schemas/AWS_SNS_TopicInlinePolicy.json -package sns ../aws/sns/topic_inline_policy_singular_data_source_gen.go ../aws/sns/topic_inline_policy_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_sns_topic_policy -cfschema ../service/cloudformation/schemas/AWS_SNS_TopicPolicy.json -package sns ../aws/sns/topic_policy_singular_data_source_gen.go ../aws/sns/topic_policy_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_ssm_association -cfschema ../service/cloudformation/schemas/AWS_SSM_Association.json -package ssm ../aws/ssm/association_singular_data_source_gen.go ../aws/ssm/association_singular_data_source_gen_test.go @@ -832,6 +856,8 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_supportapp_account_alias -cfschema ../service/cloudformation/schemas/AWS_SupportApp_AccountAlias.json -package supportapp ../aws/supportapp/account_alias_singular_data_source_gen.go ../aws/supportapp/account_alias_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_supportapp_slack_channel_configuration -cfschema ../service/cloudformation/schemas/AWS_SupportApp_SlackChannelConfiguration.json -package supportapp ../aws/supportapp/slack_channel_configuration_singular_data_source_gen.go ../aws/supportapp/slack_channel_configuration_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_supportapp_slack_workspace_configuration -cfschema ../service/cloudformation/schemas/AWS_SupportApp_SlackWorkspaceConfiguration.json -package supportapp ../aws/supportapp/slack_workspace_configuration_singular_data_source_gen.go ../aws/supportapp/slack_workspace_configuration_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_synthetics_canary -cfschema ../service/cloudformation/schemas/AWS_Synthetics_Canary.json -package synthetics ../aws/synthetics/canary_singular_data_source_gen.go ../aws/synthetics/canary_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_synthetics_group -cfschema ../service/cloudformation/schemas/AWS_Synthetics_Group.json -package synthetics ../aws/synthetics/group_singular_data_source_gen.go ../aws/synthetics/group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_systemsmanagersap_application -cfschema ../service/cloudformation/schemas/AWS_SystemsManagerSAP_Application.json -package systemsmanagersap ../aws/systemsmanagersap/application_singular_data_source_gen.go ../aws/systemsmanagersap/application_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_timestream_database -cfschema ../service/cloudformation/schemas/AWS_Timestream_Database.json -package timestream ../aws/timestream/database_singular_data_source_gen.go ../aws/timestream/database_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_timestream_scheduled_query -cfschema ../service/cloudformation/schemas/AWS_Timestream_ScheduledQuery.json -package timestream ../aws/timestream/scheduled_query_singular_data_source_gen.go ../aws/timestream/scheduled_query_singular_data_source_gen_test.go @@ -846,8 +872,16 @@ //go:generate go run generators/singular-data-source/main.go -data-source awscc_verifiedpermissions_policy -cfschema ../service/cloudformation/schemas/AWS_VerifiedPermissions_Policy.json -package verifiedpermissions ../aws/verifiedpermissions/policy_singular_data_source_gen.go ../aws/verifiedpermissions/policy_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_verifiedpermissions_policy_store -cfschema ../service/cloudformation/schemas/AWS_VerifiedPermissions_PolicyStore.json -package verifiedpermissions ../aws/verifiedpermissions/policy_store_singular_data_source_gen.go ../aws/verifiedpermissions/policy_store_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_verifiedpermissions_policy_template -cfschema ../service/cloudformation/schemas/AWS_VerifiedPermissions_PolicyTemplate.json -package verifiedpermissions ../aws/verifiedpermissions/policy_template_singular_data_source_gen.go ../aws/verifiedpermissions/policy_template_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_access_log_subscription -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_AccessLogSubscription.json -package vpclattice ../aws/vpclattice/access_log_subscription_singular_data_source_gen.go ../aws/vpclattice/access_log_subscription_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_auth_policy -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_AuthPolicy.json -package vpclattice ../aws/vpclattice/auth_policy_singular_data_source_gen.go ../aws/vpclattice/auth_policy_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_listener -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_Listener.json -package vpclattice ../aws/vpclattice/listener_singular_data_source_gen.go ../aws/vpclattice/listener_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_resource_policy -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ResourcePolicy.json -package vpclattice ../aws/vpclattice/resource_policy_singular_data_source_gen.go ../aws/vpclattice/resource_policy_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_rule -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_Rule.json -package vpclattice ../aws/vpclattice/rule_singular_data_source_gen.go ../aws/vpclattice/rule_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_service -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_Service.json -package vpclattice ../aws/vpclattice/service_singular_data_source_gen.go ../aws/vpclattice/service_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_service_network -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ServiceNetwork.json -package vpclattice ../aws/vpclattice/service_network_singular_data_source_gen.go ../aws/vpclattice/service_network_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_service_network_service_association -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ServiceNetworkServiceAssociation.json -package vpclattice ../aws/vpclattice/service_network_service_association_singular_data_source_gen.go ../aws/vpclattice/service_network_service_association_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_service_network_vpc_association -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_ServiceNetworkVpcAssociation.json -package vpclattice ../aws/vpclattice/service_network_vpc_association_singular_data_source_gen.go ../aws/vpclattice/service_network_vpc_association_singular_data_source_gen_test.go +//go:generate go run generators/singular-data-source/main.go -data-source awscc_vpclattice_target_group -cfschema ../service/cloudformation/schemas/AWS_VpcLattice_TargetGroup.json -package vpclattice ../aws/vpclattice/target_group_singular_data_source_gen.go ../aws/vpclattice/target_group_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_wafv2_ip_set -cfschema ../service/cloudformation/schemas/AWS_WAFv2_IPSet.json -package wafv2 ../aws/wafv2/ip_set_singular_data_source_gen.go ../aws/wafv2/ip_set_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_wafv2_logging_configuration -cfschema ../service/cloudformation/schemas/AWS_WAFv2_LoggingConfiguration.json -package wafv2 ../aws/wafv2/logging_configuration_singular_data_source_gen.go ../aws/wafv2/logging_configuration_singular_data_source_gen_test.go //go:generate go run generators/singular-data-source/main.go -data-source awscc_wafv2_regex_pattern_set -cfschema ../service/cloudformation/schemas/AWS_WAFv2_RegexPatternSet.json -package wafv2 ../aws/wafv2/regex_pattern_set_singular_data_source_gen.go ../aws/wafv2/regex_pattern_set_singular_data_source_gen_test.go @@ -959,6 +993,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/inspectorv2" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/internetmonitor" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iot" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotanalytics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotcoredeviceadvisor" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotevents" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotfleethub" @@ -967,6 +1002,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iottwinmaker" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/iotwireless" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ivs" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/ivschat" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kafkaconnect" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kendra" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/kendraranking" @@ -1004,6 +1040,8 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/oam" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/omics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opensearchserverless" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opensearchservice" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/opsworkscm" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/organizations" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/osis" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/panorama" @@ -1053,6 +1091,7 @@ import ( _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/sso" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/stepfunctions" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/supportapp" + _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/synthetics" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/systemsmanagersap" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/timestream" _ "github.com/hashicorp/terraform-provider-awscc/internal/aws/transfer" diff --git a/internal/service/cloudformation/schemas/AWS_EKS_Cluster.json b/internal/service/cloudformation/schemas/AWS_EKS_Cluster.json index bec736db2..bf50a1528 100644 --- a/internal/service/cloudformation/schemas/AWS_EKS_Cluster.json +++ b/internal/service/cloudformation/schemas/AWS_EKS_Cluster.json @@ -1 +1,398 @@ -{"sourceUrl":"https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-eks.git","tagging":{"taggable":true,"tagOnCreate":true,"tagUpdatable":true,"tagProperty":"/properties/Tags","cloudFormationSystemTags":true},"handlers":{"read":{"permissions":["eks:DescribeCluster"]},"create":{"permissions":["eks:CreateCluster","eks:DescribeCluster","eks:TagResource","iam:PassRole","kms:DescribeKey","kms:CreateGrant"]},"update":{"permissions":["iam:PassRole","eks:UpdateClusterConfig","eks:UpdateClusterVersion","eks:DescribeCluster","eks:DescribeUpdate","eks:TagResource","eks:UntagResource"],"timeoutInMinutes":150},"list":{"permissions":["eks:ListClusters"]},"delete":{"permissions":["eks:DeleteCluster","eks:DescribeCluster"]}},"typeName":"AWS::EKS::Cluster","readOnlyProperties":["/properties/Arn","/properties/Endpoint","/properties/CertificateAuthorityData","/properties/ClusterSecurityGroupId","/properties/EncryptionConfigKeyArn","/properties/OpenIdConnectIssuerUrl","/properties/KubernetesNetworkConfig/ServiceIpv6Cidr"],"description":"An object representing an Amazon EKS cluster.","createOnlyProperties":["/properties/EncryptionConfig","/properties/KubernetesNetworkConfig","/properties/Name","/properties/RoleArn","/properties/ResourcesVpcConfig/SubnetIds","/properties/ResourcesVpcConfig/SecurityGroupIds"],"additionalProperties":false,"primaryIdentifier":["/properties/Name"],"definitions":{"Logging":{"description":"Enable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs based on log types. By default, cluster control plane logs aren't exported to CloudWatch Logs.","additionalProperties":false,"type":"object","properties":{"ClusterLogging":{"description":"The cluster control plane logging configuration for your cluster. ","$ref":"#/definitions/ClusterLogging"}}},"EnabledTypes":{"description":"Enable control plane logs for your cluster, all log types will be disabled if the array is empty","insertionOrder":false,"type":"array","items":{"$ref":"#/definitions/LoggingTypeConfig"}},"EncryptionConfig":{"description":"The encryption configuration for the cluster","additionalProperties":false,"type":"object","properties":{"Resources":{"description":"Specifies the resources to be encrypted. The only supported value is \"secrets\".","insertionOrder":false,"type":"array","items":{"type":"string"}},"Provider":{"description":"The encryption provider for the cluster.","$ref":"#/definitions/Provider"}}},"LoggingTypeConfig":{"description":"Enabled Logging Type","additionalProperties":false,"type":"object","properties":{"Type":{"description":"name of the log type","type":"string","enum":["api","audit","authenticator","controllerManager","scheduler"]}}},"ClusterLogging":{"description":"The cluster control plane logging configuration for your cluster. ","additionalProperties":false,"type":"object","properties":{"EnabledTypes":{"$ref":"#/definitions/EnabledTypes"}}},"KubernetesNetworkConfig":{"description":"The Kubernetes network configuration for the cluster.","additionalProperties":false,"type":"object","properties":{"ServiceIpv4Cidr":{"description":"The CIDR block to assign Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks. We recommend that you specify a block that does not overlap with resources in other networks that are peered or connected to your VPC. ","type":"string"},"ServiceIpv6Cidr":{"description":"The CIDR block to assign Kubernetes service IP addresses from.","type":"string"},"IpFamily":{"description":"Ipv4 or Ipv6. You can only specify ipv6 for 1.21 and later clusters that use version 1.10.1 or later of the Amazon VPC CNI add-on","type":"string","enum":["ipv4","ipv6"]}}},"Provider":{"additionalProperties":false,"type":"object","properties":{"KeyArn":{"description":"Amazon Resource Name (ARN) or alias of the KMS key. The KMS key must be symmetric, created in the same region as the cluster, and if the KMS key was created in a different account, the user must have access to the KMS key.","type":"string"}}},"Tag":{"description":"A key-value pair to associate with a resource.","additionalProperties":false,"type":"object","properties":{"Value":{"minLength":0,"description":"The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.","type":"string","maxLength":256},"Key":{"minLength":1,"description":"The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.","type":"string","maxLength":128}},"required":["Key","Value"]},"ResourcesVpcConfig":{"description":"An object representing the VPC configuration to use for an Amazon EKS cluster.","additionalProperties":false,"type":"object","properties":{"EndpointPublicAccess":{"description":"Set this value to false to disable public access to your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server.","type":"boolean"},"PublicAccessCidrs":{"description":"The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0. If you've disabled private endpoint access and you have nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.","insertionOrder":false,"type":"array","items":{"minItems":1,"type":"string"}},"EndpointPrivateAccess":{"description":"Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. If you disable private access and you have nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the nodes or Fargate pods.","type":"boolean"},"SecurityGroupIds":{"description":"Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used.","insertionOrder":false,"type":"array","items":{"minItems":1,"type":"string"}},"SubnetIds":{"description":"Specify subnets for your Amazon EKS nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your nodes and the Kubernetes control plane.","insertionOrder":false,"type":"array","items":{"minItems":1,"type":"string"}}},"required":["SubnetIds"]}},"required":["RoleArn","ResourcesVpcConfig"],"properties":{"Logging":{"$ref":"#/definitions/Logging"},"EncryptionConfigKeyArn":{"description":"Amazon Resource Name (ARN) or alias of the customer master key (CMK).","type":"string"},"CertificateAuthorityData":{"description":"The certificate-authority-data for your cluster.","type":"string"},"EncryptionConfig":{"insertionOrder":false,"type":"array","items":{"maxItems":1,"$ref":"#/definitions/EncryptionConfig"}},"KubernetesNetworkConfig":{"$ref":"#/definitions/KubernetesNetworkConfig"},"RoleArn":{"description":"The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.","type":"string"},"Name":{"minLength":1,"pattern":"^[0-9A-Za-z][A-Za-z0-9\\-_]*","description":"The unique name to give to your cluster.","type":"string","maxLength":100},"Endpoint":{"description":"The endpoint for your Kubernetes API server, such as https://5E1D0CEXAMPLEA591B746AFC5AB30262.yl4.us-west-2.eks.amazonaws.com.","type":"string"},"Version":{"pattern":"1\\.\\d\\d","description":"The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used.","type":"string"},"ClusterSecurityGroupId":{"description":"The cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control plane to data plane communication.","type":"string"},"Arn":{"description":"The ARN of the cluster, such as arn:aws:eks:us-west-2:666666666666:cluster/prod.","type":"string"},"ResourcesVpcConfig":{"$ref":"#/definitions/ResourcesVpcConfig"},"Tags":{"uniqueItems":true,"description":"An array of key-value pairs to apply to this resource.","insertionOrder":false,"type":"array","items":{"$ref":"#/definitions/Tag"}},"OpenIdConnectIssuerUrl":{"description":"The issuer URL for the cluster's OIDC identity provider, such as https://oidc.eks.us-west-2.amazonaws.com/id/EXAMPLED539D4633E53DE1B716D3041E. If you need to remove https:// from this output value, you can include the following code in your template.","type":"string"}}} \ No newline at end of file +{ + "typeName": "AWS::EKS::Cluster", + "description": "An object representing an Amazon EKS cluster.", + "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-eks.git", + "definitions": { + "Tag": { + "description": "A key-value pair to associate with a resource.", + "type": "object", + "properties": { + "Key": { + "type": "string", + "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + "minLength": 1, + "maxLength": 128 + }, + "Value": { + "type": "string", + "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", + "minLength": 0, + "maxLength": 256 + } + }, + "required": [ + "Key", + "Value" + ], + "additionalProperties": false + }, + "Provider": { + "type": "object", + "additionalProperties": false, + "properties": { + "KeyArn": { + "description": "Amazon Resource Name (ARN) or alias of the KMS key. The KMS key must be symmetric, created in the same region as the cluster, and if the KMS key was created in a different account, the user must have access to the KMS key.", + "type": "string" + } + } + }, + "EncryptionConfig": { + "description": "The encryption configuration for the cluster", + "type": "object", + "properties": { + "Provider": { + "description": "The encryption provider for the cluster.", + "$ref": "#/definitions/Provider" + }, + "Resources": { + "description": "Specifies the resources to be encrypted. The only supported value is \"secrets\".", + "type": "array", + "insertionOrder": false, + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "ResourcesVpcConfig": { + "description": "An object representing the VPC configuration to use for an Amazon EKS cluster.", + "type": "object", + "additionalProperties": false, + "properties": { + "EndpointPrivateAccess": { + "description": "Set this value to true to enable private access for your cluster's Kubernetes API server endpoint. If you enable private access, Kubernetes API requests from within your cluster's VPC use the private VPC endpoint. The default value for this parameter is false, which disables private access for your Kubernetes API server. If you disable private access and you have nodes or AWS Fargate pods in the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for communication with the nodes or Fargate pods.", + "type": "boolean" + }, + "EndpointPublicAccess": { + "description": "Set this value to false to disable public access to your cluster's Kubernetes API server endpoint. If you disable public access, your cluster's Kubernetes API server can only receive requests from within the cluster VPC. The default value for this parameter is true, which enables public access for your Kubernetes API server.", + "type": "boolean" + }, + "PublicAccessCidrs": { + "description": "The CIDR blocks that are allowed access to your cluster's public Kubernetes API server endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that you specify is denied. The default value is 0.0.0.0/0. If you've disabled private endpoint access and you have nodes or AWS Fargate pods in the cluster, then ensure that you specify the necessary CIDR blocks.", + "type": "array", + "insertionOrder": false, + "items": { + "type": "string", + "minItems": 1 + } + }, + "SecurityGroupIds": { + "description": "Specify one or more security groups for the cross-account elastic network interfaces that Amazon EKS creates to use to allow communication between your worker nodes and the Kubernetes control plane. If you don't specify a security group, the default security group for your VPC is used.", + "type": "array", + "insertionOrder": false, + "items": { + "type": "string", + "minItems": 1 + } + }, + "SubnetIds": { + "description": "Specify subnets for your Amazon EKS nodes. Amazon EKS creates cross-account elastic network interfaces in these subnets to allow communication between your nodes and the Kubernetes control plane.", + "type": "array", + "insertionOrder": false, + "items": { + "type": "string", + "minItems": 1 + } + } + }, + "required": [ + "SubnetIds" + ] + }, + "LoggingTypeConfig": { + "description": "Enabled Logging Type", + "type": "object", + "properties": { + "Type": { + "description": "name of the log type", + "type": "string", + "enum": [ + "api", + "audit", + "authenticator", + "controllerManager", + "scheduler" + ] + } + }, + "additionalProperties": false + }, + "EnabledTypes": { + "description": "Enable control plane logs for your cluster, all log types will be disabled if the array is empty", + "type": "array", + "insertionOrder": false, + "items": { + "$ref": "#/definitions/LoggingTypeConfig" + } + }, + "ClusterLogging": { + "description": "The cluster control plane logging configuration for your cluster. ", + "type": "object", + "additionalProperties": false, + "properties": { + "EnabledTypes": { + "$ref": "#/definitions/EnabledTypes" + } + } + }, + "Logging": { + "description": "Enable exporting the Kubernetes control plane logs for your cluster to CloudWatch Logs based on log types. By default, cluster control plane logs aren't exported to CloudWatch Logs.", + "type": "object", + "additionalProperties": false, + "properties": { + "ClusterLogging": { + "description": "The cluster control plane logging configuration for your cluster. ", + "$ref": "#/definitions/ClusterLogging" + } + } + }, + "KubernetesNetworkConfig": { + "description": "The Kubernetes network configuration for the cluster.", + "additionalProperties": false, + "type": "object", + "properties": { + "ServiceIpv4Cidr": { + "description": "The CIDR block to assign Kubernetes service IP addresses from. If you don't specify a block, Kubernetes assigns addresses from either the 10.100.0.0/16 or 172.20.0.0/16 CIDR blocks. We recommend that you specify a block that does not overlap with resources in other networks that are peered or connected to your VPC. ", + "type": "string" + }, + "ServiceIpv6Cidr": { + "description": "The CIDR block to assign Kubernetes service IP addresses from.", + "type": "string" + }, + "IpFamily": { + "description": "Ipv4 or Ipv6. You can only specify ipv6 for 1.21 and later clusters that use version 1.10.1 or later of the Amazon VPC CNI add-on", + "type": "string", + "enum": [ + "ipv4", + "ipv6" + ] + } + } + }, + "ControlPlanePlacement": { + "description": "Specify the placement group of the control plane machines for your cluster.", + "type": "object", + "additionalProperties": false, + "properties": { + "GroupName": { + "description": "Specify the placement group name of the control place machines for your cluster.", + "type": "string" + } + } + }, + "OutpostConfig": { + "description": "An object representing the Outpost configuration to use for AWS EKS outpost cluster.", + "additionalProperties": false, + "type": "object", + "properties": { + "OutpostArns": { + "description": "Specify one or more Arn(s) of Outpost(s) on which you would like to create your cluster.", + "type": "array", + "insertionOrder": false, + "items": { + "type": "string", + "minItems": 1 + } + }, + "ControlPlaneInstanceType": { + "description": "Specify the Instance type of the machines that should be used to create your cluster.", + "type": "string" + }, + "ControlPlanePlacement": { + "description": "Specify the placement group of the control plane machines for your cluster.", + "$ref": "#/definitions/ControlPlanePlacement" + } + }, + "required": [ + "OutpostArns", + "ControlPlaneInstanceType" + ] + }, + "AccessConfig": { + "description": "An object representing the Access Config to use for the cluster.", + "additionalProperties": false, + "type": "object", + "properties": { + "BootstrapClusterCreatorAdminPermissions": { + "description": "Set this value to false to avoid creating a default cluster admin Access Entry using the IAM principal used to create the cluster.", + "type": "boolean" + }, + "AuthenticationMode": { + "description": "Specify the authentication mode that should be used to create your cluster.", + "type": "string", + "enum": [ + "CONFIG_MAP", + "API_AND_CONFIG_MAP", + "API" + ] + } + } + } + }, + "properties": { + "EncryptionConfig": { + "type": "array", + "insertionOrder": false, + "items": { + "$ref": "#/definitions/EncryptionConfig", + "maxItems": 1 + } + }, + "KubernetesNetworkConfig": { + "$ref": "#/definitions/KubernetesNetworkConfig" + }, + "Logging": { + "$ref": "#/definitions/Logging" + }, + "Name": { + "description": "The unique name to give to your cluster.", + "type": "string", + "pattern": "^[0-9A-Za-z][A-Za-z0-9\\-_]*", + "minLength": 1, + "maxLength": 100 + }, + "Id": { + "description": "The unique ID given to your cluster.", + "type": "string" + }, + "ResourcesVpcConfig": { + "$ref": "#/definitions/ResourcesVpcConfig" + }, + "OutpostConfig": { + "$ref": "#/definitions/OutpostConfig" + }, + "AccessConfig": { + "$ref": "#/definitions/AccessConfig" + }, + "RoleArn": { + "description": "The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.", + "type": "string" + }, + "Version": { + "description": "The desired Kubernetes version for your cluster. If you don't specify a value here, the latest version available in Amazon EKS is used.", + "type": "string", + "pattern": "1\\.\\d\\d" + }, + "Tags": { + "description": "An array of key-value pairs to apply to this resource.", + "type": "array", + "uniqueItems": true, + "insertionOrder": false, + "items": { + "$ref": "#/definitions/Tag" + } + }, + "Arn": { + "description": "The ARN of the cluster, such as arn:aws:eks:us-west-2:666666666666:cluster/prod.", + "type": "string" + }, + "Endpoint": { + "description": "The endpoint for your Kubernetes API server, such as https://5E1D0CEXAMPLEA591B746AFC5AB30262.yl4.us-west-2.eks.amazonaws.com.", + "type": "string" + }, + "CertificateAuthorityData": { + "description": "The certificate-authority-data for your cluster.", + "type": "string" + }, + "ClusterSecurityGroupId": { + "description": "The cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control plane to data plane communication.", + "type": "string" + }, + "EncryptionConfigKeyArn": { + "description": "Amazon Resource Name (ARN) or alias of the customer master key (CMK).", + "type": "string" + }, + "OpenIdConnectIssuerUrl": { + "description": "The issuer URL for the cluster's OIDC identity provider, such as https://oidc.eks.us-west-2.amazonaws.com/id/EXAMPLED539D4633E53DE1B716D3041E. If you need to remove https:// from this output value, you can include the following code in your template.", + "type": "string" + } + }, + "tagging": { + "taggable": true, + "tagOnCreate": true, + "tagUpdatable": true, + "cloudFormationSystemTags": true, + "tagProperty": "/properties/Tags" + }, + "additionalProperties": false, + "required": [ + "RoleArn", + "ResourcesVpcConfig" + ], + "primaryIdentifier": [ + "/properties/Name" + ], + "createOnlyProperties": [ + "/properties/OutpostConfig", + "/properties/EncryptionConfig", + "/properties/KubernetesNetworkConfig", + "/properties/AccessConfig/BootstrapClusterCreatorAdminPermissions", + "/properties/Name", + "/properties/RoleArn" + ], + "readOnlyProperties": [ + "/properties/Id", + "/properties/Arn", + "/properties/Endpoint", + "/properties/CertificateAuthorityData", + "/properties/ClusterSecurityGroupId", + "/properties/EncryptionConfigKeyArn", + "/properties/OpenIdConnectIssuerUrl", + "/properties/KubernetesNetworkConfig/ServiceIpv6Cidr" + ], + "writeOnlyProperties": [ + "/properties/AccessConfig/BootstrapClusterCreatorAdminPermissions" + ], + "handlers": { + "create": { + "permissions": [ + "eks:CreateCluster", + "eks:DescribeCluster", + "eks:TagResource", + "iam:PassRole", + "iam:GetRole", + "iam:ListAttachedRolePolicies", + "iam:CreateServiceLinkedRole", + "iam:CreateInstanceProfile", + "iam:TagInstanceProfile", + "iam:AddRoleToInstanceProfile", + "iam:GetInstanceProfile", + "iam:DeleteInstanceProfile", + "iam:RemoveRoleFromInstanceProfile", + "ec2:DescribeSubnets", + "ec2:DescribeVpcs", + "kms:DescribeKey", + "kms:CreateGrant" + ] + }, + "read": { + "permissions": [ + "eks:DescribeCluster" + ] + }, + "update": { + "permissions": [ + "iam:PassRole", + "eks:UpdateClusterConfig", + "eks:UpdateClusterVersion", + "eks:DescribeCluster", + "eks:DescribeUpdate", + "eks:TagResource", + "eks:UntagResource" + ], + "timeoutInMinutes": 180 + }, + "delete": { + "permissions": [ + "eks:DeleteCluster", + "eks:DescribeCluster" + ] + }, + "list": { + "permissions": [ + "eks:ListClusters" + ] + } + } +} diff --git a/internal/service/cloudformation/schemas/AWS_RUM_AppMonitor.json b/internal/service/cloudformation/schemas/AWS_RUM_AppMonitor.json index 47e697644..2bc4088b3 100644 --- a/internal/service/cloudformation/schemas/AWS_RUM_AppMonitor.json +++ b/internal/service/cloudformation/schemas/AWS_RUM_AppMonitor.json @@ -184,11 +184,18 @@ "type": "object", "properties": { "Name": { - "description": "The name for the metric that is defined in this structure. Valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", + "description": "The name for the metric that is defined in this structure. For extended metrics, valid values are the following:\n\nPerformanceNavigationDuration\n\nPerformanceResourceDuration\n\nNavigationSatisfiedTransaction\n\nNavigationToleratedTransaction\n\nNavigationFrustratedTransaction\n\nWebVitalsCumulativeLayoutShift\n\nWebVitalsFirstInputDelay\n\nWebVitalsLargestContentfulPaint\n\nJsErrorCount\n\nHttpErrorCount\n\nSessionCount", "type": "string", "minLength": 1, "maxLength": 255 }, + "Namespace": { + "description": "The namespace used by CloudWatch Metrics for the metric that is defined in this structure", + "type": "string", + "pattern": "[a-zA-Z0-9-._\/#:]+$", + "minLength": 1, + "maxLength": 237 + }, "ValueKey": { "description": "The field within the event object that the metric value is sourced from.\n\nIf you omit this field, a hardcoded value of 1 is pushed as the metric value. This is useful if you just want to count the number of events that the filter catches.\n\nIf this metric is sent to Evidently, this field will be passed to Evidently raw and Evidently will handle data extraction from the event.", "type": "string", @@ -203,7 +210,7 @@ "maxLength": 256 }, "DimensionKeys": { - "description": "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. Valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", + "description": "Use this field only if you are sending the metric to CloudWatch.\n\nThis field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch. For extended metrics, valid values for the entries in this field are the following:\n\n\"metadata.pageId\": \"PageId\"\n\n\"metadata.browserName\": \"BrowserName\"\n\n\"metadata.deviceType\": \"DeviceType\"\n\n\"metadata.osName\": \"OSName\"\n\n\"metadata.countryCode\": \"CountryCode\"\n\n\"event_details.fileType\": \"FileType\"\n\nAll dimensions listed in this field must also be included in EventPattern.", "type": "object", "patternProperties": { "": { @@ -246,6 +253,13 @@ } }, "properties": { + "Id": { + "description": "The unique ID of the new app monitor.", + "type": "string", + "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$", + "minLength": 36, + "maxLength": 36 + }, "Name": { "description": "A name for the app monitor", "type": "string", @@ -278,9 +292,17 @@ "createOnlyProperties": [ "/properties/Name" ], + "readOnlyProperties": [ + "/properties/Id" + ], "primaryIdentifier": [ "/properties/Name" ], + "additionalIdentifiers": [ + [ + "/properties/Id" + ] + ], "required": [ "Name", "Domain" @@ -386,4 +408,4 @@ } }, "taggable": true -} \ No newline at end of file +} diff --git a/internal/service/cloudformation/schemas/AWS_Route53Resolver_ResolverConfig.json b/internal/service/cloudformation/schemas/AWS_Route53Resolver_ResolverConfig.json index 035c285d0..43415b5dc 100644 --- a/internal/service/cloudformation/schemas/AWS_Route53Resolver_ResolverConfig.json +++ b/internal/service/cloudformation/schemas/AWS_Route53Resolver_ResolverConfig.json @@ -52,29 +52,38 @@ "/properties/AutodefinedReverseFlag" ], "primaryIdentifier": [ - "/properties/Id" + "/properties/ResourceId" ], "taggable": false, "additionalProperties": false, + "propertyTransform": { + "/properties/AutodefinedReverseFlag": "$join([AutodefinedReverseFlag, \"D\"])" + }, "handlers": { "create": { "permissions": [ - "route53resolver:CreateConfig" + "route53resolver:UpdateResolverConfig", + "route53resolver:GetResolverConfig", + "ec2:DescribeVpcs" ] }, "read": { "permissions": [ - "route53resolver:GetConfig" + "route53resolver:GetResolverConfig", + "ec2:DescribeVpcs" ] }, "delete": { "permissions": [ - "route53resolver:DeleteConfig" + "route53resolver:UpdateResolverConfig", + "route53resolver:ListResolverConfigs", + "ec2:DescribeVpcs" ] }, "list": { "permissions": [ - "route53resolver:ListConfig" + "route53resolver:ListResolverConfigs", + "ec2:DescribeVpcs" ] } }