// Code generated by generators/singular-data-source/main.go; DO NOT EDIT. package fms 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.AddDataSourceTypeFactory("awscc_fms_policy", policyDataSourceType) } // policyDataSourceType returns the Terraform awscc_fms_policy data source type. // This Terraform data source type corresponds to the CloudFormation AWS::FMS::Policy resource type. func policyDataSourceType(ctx context.Context) (tfsdk.DataSourceType, error) { attributes := map[string]tfsdk.Attribute{ "arn": { // Property: Arn // CloudFormation resource type schema: // { // "description": "A resource ARN.", // "maxLength": 1024, // "minLength": 1, // "pattern": "^([^\\s]*)$", // "type": "string" // } Description: "A resource ARN.", Type: types.StringType, Computed: true, }, "delete_all_policy_resources": { // Property: DeleteAllPolicyResources // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Computed: true, }, "exclude_map": { // Property: ExcludeMap // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "An FMS includeMap or excludeMap.", // "properties": { // "ACCOUNT": { // "insertionOrder": true, // "items": { // "description": "An AWS account ID.", // "maxLength": 12, // "minLength": 12, // "pattern": "^([0-9]*)$", // "type": "string" // }, // "type": "array" // }, // "ORGUNIT": { // "insertionOrder": true, // "items": { // "description": "An Organizational Unit ID.", // "maxLength": 68, // "minLength": 16, // "pattern": "^(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$", // "type": "string" // }, // "type": "array" // } // }, // "type": "object" // } Description: "An FMS includeMap or excludeMap.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "account": { // Property: ACCOUNT Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "orgunit": { // Property: ORGUNIT Type: types.ListType{ElemType: types.StringType}, Computed: true, }, }, ), Computed: true, }, "exclude_resource_tags": { // Property: ExcludeResourceTags // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Computed: true, }, "id": { // Property: Id // CloudFormation resource type schema: // { // "maxLength": 36, // "minLength": 36, // "pattern": "^[a-z0-9A-Z-]{36}$", // "type": "string" // } Type: types.StringType, Computed: true, }, "include_map": { // Property: IncludeMap // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "An FMS includeMap or excludeMap.", // "properties": { // "ACCOUNT": { // "insertionOrder": true, // "items": { // "description": "An AWS account ID.", // "maxLength": 12, // "minLength": 12, // "pattern": "^([0-9]*)$", // "type": "string" // }, // "type": "array" // }, // "ORGUNIT": { // "insertionOrder": true, // "items": { // "description": "An Organizational Unit ID.", // "maxLength": 68, // "minLength": 16, // "pattern": "^(ou-[0-9a-z]{4,32}-[a-z0-9]{8,32})$", // "type": "string" // }, // "type": "array" // } // }, // "type": "object" // } Description: "An FMS includeMap or excludeMap.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "account": { // Property: ACCOUNT Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "orgunit": { // Property: ORGUNIT Type: types.ListType{ElemType: types.StringType}, Computed: true, }, }, ), Computed: true, }, "policy_name": { // Property: PolicyName // CloudFormation resource type schema: // { // "maxLength": 1024, // "minLength": 1, // "pattern": "^([a-zA-Z0-9_.:/=+\\-@]+)$", // "type": "string" // } Type: types.StringType, Computed: true, }, "remediation_enabled": { // Property: RemediationEnabled // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Computed: true, }, "resource_tags": { // Property: ResourceTags // CloudFormation resource type schema: // { // "insertionOrder": true, // "items": { // "additionalProperties": false, // "description": "A resource tag.", // "properties": { // "Key": { // "maxLength": 128, // "minLength": 1, // "type": "string" // }, // "Value": { // "maxLength": 256, // "type": "string" // } // }, // "required": [ // "Key" // ], // "type": "object" // }, // "maxItems": 8, // "type": "array" // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, "resource_type": { // Property: ResourceType // CloudFormation resource type schema: // { // "description": "An AWS resource type", // "maxLength": 128, // "minLength": 1, // "pattern": "^([^\\s]*)$", // "type": "string" // } Description: "An AWS resource type", Type: types.StringType, Computed: true, }, "resource_type_list": { // Property: ResourceTypeList // CloudFormation resource type schema: // { // "insertionOrder": true, // "items": { // "description": "An AWS resource type", // "maxLength": 128, // "minLength": 1, // "pattern": "^([^\\s]*)$", // "type": "string" // }, // "type": "array" // } Type: types.ListType{ElemType: types.StringType}, Computed: true, }, "resources_clean_up": { // Property: ResourcesCleanUp // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Computed: true, }, "security_service_policy_data": { // Property: SecurityServicePolicyData // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "ManagedServiceData": { // "maxLength": 8192, // "minLength": 1, // "type": "string" // }, // "Type": { // "enum": [ // "WAF", // "WAFV2", // "SHIELD_ADVANCED", // "SECURITY_GROUPS_COMMON", // "SECURITY_GROUPS_CONTENT_AUDIT", // "SECURITY_GROUPS_USAGE_AUDIT", // "NETWORK_FIREWALL", // "DNS_FIREWALL" // ], // "type": "string" // } // }, // "required": [ // "Type" // ], // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "managed_service_data": { // Property: ManagedServiceData Type: types.StringType, Computed: true, }, "type": { // Property: Type Type: types.StringType, Computed: true, }, }, ), Computed: true, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "insertionOrder": true, // "items": { // "additionalProperties": false, // "description": "A policy tag.", // "properties": { // "Key": { // "maxLength": 128, // "minLength": 1, // "pattern": "^([^\\s]*)$", // "type": "string" // }, // "Value": { // "maxLength": 256, // "pattern": "^([^\\s]*)$", // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array" // } Attributes: tfsdk.ListNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Type: types.StringType, Computed: true, }, "value": { // Property: Value Type: types.StringType, Computed: true, }, }, tfsdk.ListNestedAttributesOptions{}, ), Computed: true, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Required: true, } schema := tfsdk.Schema{ Description: "Data Source schema for AWS::FMS::Policy", Version: 1, Attributes: attributes, } var opts DataSourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::FMS::Policy").WithTerraformTypeName("awscc_fms_policy") opts = opts.WithTerraformSchema(schema) opts = opts.WithAttributeNameMap(map[string]string{ "account": "ACCOUNT", "arn": "Arn", "delete_all_policy_resources": "DeleteAllPolicyResources", "exclude_map": "ExcludeMap", "exclude_resource_tags": "ExcludeResourceTags", "id": "Id", "include_map": "IncludeMap", "key": "Key", "managed_service_data": "ManagedServiceData", "orgunit": "ORGUNIT", "policy_name": "PolicyName", "remediation_enabled": "RemediationEnabled", "resource_tags": "ResourceTags", "resource_type": "ResourceType", "resource_type_list": "ResourceTypeList", "resources_clean_up": "ResourcesCleanUp", "security_service_policy_data": "SecurityServicePolicyData", "tags": "Tags", "type": "Type", "value": "Value", }) singularDataSourceType, err := NewSingularDataSourceType(ctx, opts...) if err != nil { return nil, err } return singularDataSourceType, nil }