// Code generated by generators/resource/main.go; DO NOT EDIT. package cloudformation 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_cloudformation_module_version", moduleVersionResourceType) } // moduleVersionResourceType returns the Terraform awscc_cloudformation_module_version resource type. // This Terraform resource type corresponds to the CloudFormation AWS::CloudFormation::ModuleVersion resource type. func moduleVersionResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "The Amazon Resource Name (ARN) of the module.", // "pattern": "^arn:aws[A-Za-z0-9-]{0,64}:cloudformation:[A-Za-z0-9-]{1,64}:([0-9]{12})?:type/module/.+$", // "type": "string" // } Description: "The Amazon Resource Name (ARN) of the module.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "description": { // Property: Description // CloudFormation resource type schema: // { // "description": "The description of the registered module.", // "maxLength": 1024, // "minLength": 1, // "type": "string" // } Description: "The description of the registered module.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "documentation_url": { // Property: DocumentationUrl // CloudFormation resource type schema: // { // "description": "The URL of a page providing detailed documentation for this module.", // "maxLength": 4096, // "type": "string" // } Description: "The URL of a page providing detailed documentation for this module.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "is_default_version": { // Property: IsDefaultVersion // CloudFormation resource type schema: // { // "description": "Indicator of whether this module version is the current default version", // "type": "boolean" // } Description: "Indicator of whether this module version is the current default version", Type: types.BoolType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "module_name": { // Property: ModuleName // CloudFormation resource type schema: // { // "description": "The name of the module being registered.\n\nRecommended module naming pattern: company_or_organization::service::type::MODULE.", // "pattern": "^[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::MODULE", // "type": "string" // } Description: "The name of the module being registered.\n\nRecommended module naming pattern: company_or_organization::service::type::MODULE.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringMatch(regexp.MustCompile("^[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::MODULE"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "module_package": { // Property: ModulePackage // CloudFormation resource type schema: // { // "description": "The url to the S3 bucket containing the schema and template fragment for the module you want to register.", // "type": "string" // } Description: "The url to the S3 bucket containing the schema and template fragment for the module you want to register.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, // ModulePackage is a write-only property. }, "schema": { // Property: Schema // CloudFormation resource type schema: // { // "description": "The schema defining input parameters to and resources generated by the module.", // "maxLength": 16777216, // "minLength": 1, // "type": "string" // } Description: "The schema defining input parameters to and resources generated by the module.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "time_created": { // Property: TimeCreated // CloudFormation resource type schema: // { // "description": "The time that the specified module version was registered.", // "type": "string" // } Description: "The time that the specified module version was registered.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "version_id": { // Property: VersionId // CloudFormation resource type schema: // { // "description": "The version ID of the module represented by this module instance.", // "pattern": "^[0-9]{8}$", // "type": "string" // } Description: "The version ID of the module represented by this module instance.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "visibility": { // Property: Visibility // CloudFormation resource type schema: // { // "description": "The scope at which the type is visible and usable in CloudFormation operations.\n\nThe only allowed value at present is:\n\nPRIVATE: The type is only visible and usable within the account in which it is registered. Currently, AWS CloudFormation marks any types you register as PRIVATE.", // "enum": [ // "PRIVATE" // ], // "type": "string" // } Description: "The scope at which the type is visible and usable in CloudFormation operations.\n\nThe only allowed value at present is:\n\nPRIVATE: The type is only visible and usable within the account in which it is registered. Currently, AWS CloudFormation marks any types you register as PRIVATE.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "A module that has been registered in the CloudFormation registry.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions 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", "documentation_url": "DocumentationUrl", "is_default_version": "IsDefaultVersion", "module_name": "ModuleName", "module_package": "ModulePackage", "schema": "Schema", "time_created": "TimeCreated", "version_id": "VersionId", "visibility": "Visibility", }) opts = opts.IsImmutableType(true) opts = opts.WithWriteOnlyPropertyPaths([]string{ "/properties/ModulePackage", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }