// Code generated by generators/resource/main.go; DO NOT EDIT. package panorama 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_panorama_package", packageResourceType) } // packageResourceType returns the Terraform awscc_panorama_package resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Panorama::Package resource type. func packageResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "created_time": { // Property: CreatedTime // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "package_id": { // Property: PackageId // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "pattern": "^[a-zA-Z0-9\\-\\_\\/]+$", // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "package_name": { // Property: PackageName // CloudFormation resource type schema: // { // "maxLength": 128, // "minLength": 1, // "pattern": "^[a-zA-Z0-9\\-\\_]+$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9\\-\\_]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "storage_location": { // Property: StorageLocation // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "BinaryPrefixLocation": { // "type": "string" // }, // "Bucket": { // "type": "string" // }, // "GeneratedPrefixLocation": { // "type": "string" // }, // "ManifestPrefixLocation": { // "type": "string" // }, // "RepoPrefixLocation": { // "type": "string" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "binary_prefix_location": { // Property: BinaryPrefixLocation Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "bucket": { // Property: Bucket Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "generated_prefix_location": { // Property: GeneratedPrefixLocation Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "manifest_prefix_location": { // Property: ManifestPrefixLocation Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "repo_prefix_location": { // Property: RepoPrefixLocation Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, }, ), Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "maxLength": 128, // "minLength": 1, // "pattern": "^.+$", // "type": "string" // }, // "Value": { // "maxLength": 256, // "minLength": 0, // "pattern": "^.+$", // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), validate.StringMatch(regexp.MustCompile("^.+$"), ""), }, }, "value": { // Property: Value Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 256), validate.StringMatch(regexp.MustCompile("^.+$"), ""), }, }, }, tfsdk.SetNestedAttributesOptions{}, ), Optional: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Schema for Package CloudFormation Resource", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions 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", "bucket": "Bucket", "created_time": "CreatedTime", "generated_prefix_location": "GeneratedPrefixLocation", "key": "Key", "manifest_prefix_location": "ManifestPrefixLocation", "package_id": "PackageId", "package_name": "PackageName", "repo_prefix_location": "RepoPrefixLocation", "storage_location": "StorageLocation", "tags": "Tags", "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }