// Code generated by generators/resource/main.go; DO NOT EDIT. package efs import ( "context" "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_efs_file_system", fileSystemResourceType) } // fileSystemResourceType returns the Terraform awscc_efs_file_system resource type. // This Terraform resource type corresponds to the CloudFormation AWS::EFS::FileSystem resource type. func fileSystemResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "availability_zone_name": { // Property: AvailabilityZoneName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "backup_policy": { // Property: BackupPolicy // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Status": { // "type": "string" // } // }, // "required": [ // "Status" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "status": { // Property: Status Type: types.StringType, Required: true, }, }, ), Optional: true, }, "bypass_policy_lockout_safety_check": { // Property: BypassPolicyLockoutSafetyCheck // CloudFormation resource type schema: // { // "description": "Whether to bypass the FileSystemPolicy lockout safety check. The policy lockout safety check determines whether the policy in the request will prevent the principal making the request to be locked out from making future PutFileSystemPolicy requests on the file system. Set BypassPolicyLockoutSafetyCheck to True only when you intend to prevent the principal that is making the request from making a subsequent PutFileSystemPolicy request on the file system. Defaults to false", // "type": "boolean" // } Description: "Whether to bypass the FileSystemPolicy lockout safety check. The policy lockout safety check determines whether the policy in the request will prevent the principal making the request to be locked out from making future PutFileSystemPolicy requests on the file system. Set BypassPolicyLockoutSafetyCheck to True only when you intend to prevent the principal that is making the request from making a subsequent PutFileSystemPolicy request on the file system. Defaults to false", Type: types.BoolType, Optional: true, // BypassPolicyLockoutSafetyCheck is a write-only property. }, "encrypted": { // Property: Encrypted // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "file_system_id": { // Property: FileSystemId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "file_system_policy": { // Property: FileSystemPolicy // CloudFormation resource type schema: // { // "type": "object" // } Type: types.MapType{ElemType: types.StringType}, Optional: true, }, "file_system_tags": { // Property: FileSystemTags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Value", // "Key" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Required: true, }, "value": { // Property: Value Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.UniqueItems(), }, }, "kms_key_id": { // Property: KmsKeyId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "lifecycle_policies": { // Property: LifecyclePolicies // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "TransitionToIA": { // "type": "string" // }, // "TransitionToPrimaryStorageClass": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "transition_to_ia": { // Property: TransitionToIA Type: types.StringType, Optional: true, }, "transition_to_primary_storage_class": { // Property: TransitionToPrimaryStorageClass Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, Validators: []tfsdk.AttributeValidator{ validate.UniqueItems(), }, }, "performance_mode": { // Property: PerformanceMode // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "provisioned_throughput_in_mibps": { // Property: ProvisionedThroughputInMibps // CloudFormation resource type schema: // { // "type": "number" // } Type: types.Float64Type, Optional: true, }, "throughput_mode": { // Property: ThroughputMode // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, 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: "Resource Type definition for AWS::EFS::FileSystem", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions 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", "backup_policy": "BackupPolicy", "bypass_policy_lockout_safety_check": "BypassPolicyLockoutSafetyCheck", "encrypted": "Encrypted", "file_system_id": "FileSystemId", "file_system_policy": "FileSystemPolicy", "file_system_tags": "FileSystemTags", "key": "Key", "kms_key_id": "KmsKeyId", "lifecycle_policies": "LifecyclePolicies", "performance_mode": "PerformanceMode", "provisioned_throughput_in_mibps": "ProvisionedThroughputInMibps", "status": "Status", "throughput_mode": "ThroughputMode", "transition_to_ia": "TransitionToIA", "transition_to_primary_storage_class": "TransitionToPrimaryStorageClass", "value": "Value", }) opts = opts.WithWriteOnlyPropertyPaths([]string{ "/properties/BypassPolicyLockoutSafetyCheck", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }