// 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_version", packageVersionResourceType) } // packageVersionResourceType returns the Terraform awscc_panorama_package_version resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Panorama::PackageVersion resource type. func packageVersionResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "is_latest_patch": { // Property: IsLatestPatch // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "mark_latest": { // Property: MarkLatest // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "owner_account": { // Property: OwnerAccount // CloudFormation resource type schema: // { // "maxLength": 12, // "minLength": 1, // "pattern": "^[0-9a-z\\_]+$", // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 12), validate.StringMatch(regexp.MustCompile("^[0-9a-z\\_]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "package_arn": { // Property: PackageArn // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "type": "string" // } Type: types.StringType, 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, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), validate.StringMatch(regexp.MustCompile("^[a-zA-Z0-9\\-\\_\\/]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "package_name": { // Property: PackageName // CloudFormation resource type schema: // { // "maxLength": 128, // "minLength": 1, // "pattern": "^[a-zA-Z0-9\\-\\_]+$", // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "package_version": { // Property: PackageVersion // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "pattern": "^([0-9]+)\\.([0-9]+)$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), validate.StringMatch(regexp.MustCompile("^([0-9]+)\\.([0-9]+)$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "patch_version": { // Property: PatchVersion // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "pattern": "^[a-z0-9]+$", // "type": "string" // } Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), validate.StringMatch(regexp.MustCompile("^[a-z0-9]+$"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "registered_time": { // Property: RegisteredTime // CloudFormation resource type schema: // { // "type": "integer" // } Type: types.Int64Type, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "status": { // Property: Status // CloudFormation resource type schema: // { // "enum": [ // "REGISTER_PENDING", // "REGISTER_COMPLETED", // "FAILED", // "DELETING" // ], // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "status_description": { // Property: StatusDescription // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "updated_latest_patch_version": { // Property: UpdatedLatestPatchVersion // CloudFormation resource type schema: // { // "maxLength": 255, // "minLength": 1, // "pattern": "^[a-z0-9]+$", // "type": "string" // } Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 255), validate.StringMatch(regexp.MustCompile("^[a-z0-9]+$"), ""), }, }, } 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 PackageVersion Resource Type", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions 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", "owner_account": "OwnerAccount", "package_arn": "PackageArn", "package_id": "PackageId", "package_name": "PackageName", "package_version": "PackageVersion", "patch_version": "PatchVersion", "registered_time": "RegisteredTime", "status": "Status", "status_description": "StatusDescription", "updated_latest_patch_version": "UpdatedLatestPatchVersion", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }