// Code generated by generators/resource/main.go; DO NOT EDIT. package config import ( "context" "regexp" "github.com/hashicorp/terraform-plugin-framework/tfsdk" "github.com/hashicorp/terraform-plugin-framework/types" . "github.com/hashicorp/terraform-provider-awscc/internal/generic" "github.com/hashicorp/terraform-provider-awscc/internal/registry" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_config_conformance_pack", conformancePackResourceType) } // conformancePackResourceType returns the Terraform awscc_config_conformance_pack resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Config::ConformancePack resource type. func conformancePackResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "conformance_pack_input_parameters": { // Property: ConformancePackInputParameters // CloudFormation resource type schema: // { // "description": "A list of ConformancePackInputParameter objects.", // "items": { // "description": "Input parameters in the form of key-value pairs for the conformance pack.", // "properties": { // "ParameterName": { // "description": "Key part of key-value pair with value being parameter value", // "maxLength": 255, // "minLength": 0, // "type": "string" // }, // "ParameterValue": { // "description": "Value part of key-value pair with key being parameter Name", // "maxLength": 4096, // "minLength": 0, // "type": "string" // } // }, // "required": [ // "ParameterName", // "ParameterValue" // ], // "type": "object" // }, // "maxItems": 60, // "minItems": 0, // "type": "array" // } Description: "A list of ConformancePackInputParameter objects.", Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "parameter_name": { // Property: ParameterName Description: "Key part of key-value pair with value being parameter value", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 255), }, }, "parameter_value": { // Property: ParameterValue Description: "Value part of key-value pair with key being parameter Name", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 4096), }, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.ArrayLenBetween(0, 60), }, }, "conformance_pack_name": { // Property: ConformancePackName // CloudFormation resource type schema: // { // "description": "Name of the conformance pack which will be assigned as the unique identifier.", // "maxLength": 256, // "minLength": 1, // "pattern": "[a-zA-Z][-a-zA-Z0-9]*", // "type": "string" // } Description: "Name of the conformance pack which will be assigned as the unique identifier.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 256), validate.StringMatch(regexp.MustCompile("[a-zA-Z][-a-zA-Z0-9]*"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "delivery_s3_bucket": { // Property: DeliveryS3Bucket // CloudFormation resource type schema: // { // "description": "AWS Config stores intermediate files while processing conformance pack template.", // "maxLength": 63, // "minLength": 0, // "type": "string" // } Description: "AWS Config stores intermediate files while processing conformance pack template.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 63), }, }, "delivery_s3_key_prefix": { // Property: DeliveryS3KeyPrefix // CloudFormation resource type schema: // { // "description": "The prefix for delivery S3 bucket.", // "maxLength": 1024, // "minLength": 0, // "type": "string" // } Description: "The prefix for delivery S3 bucket.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 1024), }, }, "template_body": { // Property: TemplateBody // CloudFormation resource type schema: // { // "description": "A string containing full conformance pack template body. You can only specify one of the template body or template S3Uri fields.", // "maxLength": 51200, // "minLength": 1, // "type": "string" // } Description: "A string containing full conformance pack template body. You can only specify one of the template body or template S3Uri fields.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 51200), }, // TemplateBody is a write-only property. }, "template_s3_uri": { // Property: TemplateS3Uri // CloudFormation resource type schema: // { // "description": "Location of file containing the template body which points to the conformance pack template that is located in an Amazon S3 bucket. You can only specify one of the template body or template S3Uri fields.", // "maxLength": 1024, // "minLength": 1, // "pattern": "s3://.*", // "type": "string" // } Description: "Location of file containing the template body which points to the conformance pack template that is located in an Amazon S3 bucket. You can only specify one of the template body or template S3Uri fields.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1024), validate.StringMatch(regexp.MustCompile("s3://.*"), ""), }, // TemplateS3Uri is a write-only property. }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "A conformance pack is a collection of AWS Config rules and remediation actions that can be easily deployed as a single entity in an account and a region or across an entire AWS Organization.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions 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", "delivery_s3_bucket": "DeliveryS3Bucket", "delivery_s3_key_prefix": "DeliveryS3KeyPrefix", "parameter_name": "ParameterName", "parameter_value": "ParameterValue", "template_body": "TemplateBody", "template_s3_uri": "TemplateS3Uri", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ "/properties/TemplateBody", "/properties/TemplateS3Uri", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }