// Code generated by generators/resource/main.go; DO NOT EDIT. package backup 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" ) func init() { registry.AddResourceTypeFactory("awscc_backup_backup_selection", backupSelectionResourceType) } // backupSelectionResourceType returns the Terraform awscc_backup_backup_selection resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Backup::BackupSelection resource type. func backupSelectionResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "backup_plan_id": { // Property: BackupPlanId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "backup_selection": { // Property: BackupSelection // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "Conditions": { // "additionalProperties": false, // "properties": { // "StringEquals": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "ConditionKey": { // "type": "string" // }, // "ConditionValue": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "StringLike": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "ConditionKey": { // "type": "string" // }, // "ConditionValue": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "StringNotEquals": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "ConditionKey": { // "type": "string" // }, // "ConditionValue": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "StringNotLike": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "ConditionKey": { // "type": "string" // }, // "ConditionValue": { // "type": "string" // } // }, // "type": "object" // }, // "type": "array", // "uniqueItems": false // } // }, // "type": "object" // }, // "IamRoleArn": { // "type": "string" // }, // "ListOfTags": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "properties": { // "ConditionKey": { // "type": "string" // }, // "ConditionType": { // "type": "string" // }, // "ConditionValue": { // "type": "string" // } // }, // "required": [ // "ConditionValue", // "ConditionKey", // "ConditionType" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": false // }, // "NotResources": { // "insertionOrder": false, // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "Resources": { // "insertionOrder": false, // "items": { // "type": "string" // }, // "type": "array", // "uniqueItems": false // }, // "SelectionName": { // "type": "string" // } // }, // "required": [ // "SelectionName", // "IamRoleArn" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "conditions": { // Property: Conditions Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "string_equals": { // Property: StringEquals Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "condition_key": { // Property: ConditionKey Type: types.StringType, Optional: true, }, "condition_value": { // Property: ConditionValue Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "string_like": { // Property: StringLike Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "condition_key": { // Property: ConditionKey Type: types.StringType, Optional: true, }, "condition_value": { // Property: ConditionValue Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "string_not_equals": { // Property: StringNotEquals Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "condition_key": { // Property: ConditionKey Type: types.StringType, Optional: true, }, "condition_value": { // Property: ConditionValue Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "string_not_like": { // Property: StringNotLike Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "condition_key": { // Property: ConditionKey Type: types.StringType, Optional: true, }, "condition_value": { // Property: ConditionValue Type: types.StringType, Optional: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, }, ), Optional: true, }, "iam_role_arn": { // Property: IamRoleArn Type: types.StringType, Required: true, }, "list_of_tags": { // Property: ListOfTags Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "condition_key": { // Property: ConditionKey Type: types.StringType, Required: true, }, "condition_type": { // Property: ConditionType Type: types.StringType, Required: true, }, "condition_value": { // Property: ConditionValue Type: types.StringType, Required: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "not_resources": { // Property: NotResources Type: types.ListType{ElemType: types.StringType}, Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "resources": { // Property: Resources Type: types.ListType{ElemType: types.StringType}, Optional: true, PlanModifiers: []tfsdk.AttributePlanModifier{ Multiset(), }, }, "selection_name": { // Property: SelectionName Type: types.StringType, Required: true, }, }, ), Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "id": { // Property: Id // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "selection_id": { // Property: SelectionId // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, } schema := tfsdk.Schema{ Description: "Resource Type definition for AWS::Backup::BackupSelection", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Backup::BackupSelection").WithTerraformTypeName("awscc_backup_backup_selection") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(false) opts = opts.WithAttributeNameMap(map[string]string{ "backup_plan_id": "BackupPlanId", "backup_selection": "BackupSelection", "condition_key": "ConditionKey", "condition_type": "ConditionType", "condition_value": "ConditionValue", "conditions": "Conditions", "iam_role_arn": "IamRoleArn", "id": "Id", "list_of_tags": "ListOfTags", "not_resources": "NotResources", "resources": "Resources", "selection_id": "SelectionId", "selection_name": "SelectionName", "string_equals": "StringEquals", "string_like": "StringLike", "string_not_equals": "StringNotEquals", "string_not_like": "StringNotLike", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }