// Code generated by generators/resource/main.go; DO NOT EDIT. package fms 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_fms_notification_channel", notificationChannelResourceType) } // notificationChannelResourceType returns the Terraform awscc_fms_notification_channel resource type. // This Terraform resource type corresponds to the CloudFormation AWS::FMS::NotificationChannel resource type. func notificationChannelResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "sns_role_name": { // Property: SnsRoleName // CloudFormation resource type schema: // { // "description": "A resource ARN.", // "maxLength": 1024, // "minLength": 1, // "pattern": "^([^\\s]+)$", // "type": "string" // } Description: "A resource ARN.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1024), validate.StringMatch(regexp.MustCompile("^([^\\s]+)$"), ""), }, }, "sns_topic_arn": { // Property: SnsTopicArn // CloudFormation resource type schema: // { // "description": "A resource ARN.", // "maxLength": 1024, // "minLength": 1, // "pattern": "^([^\\s]+)$", // "type": "string" // } Description: "A resource ARN.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 1024), validate.StringMatch(regexp.MustCompile("^([^\\s]+)$"), ""), }, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "Designates the IAM role and Amazon Simple Notification Service (SNS) topic that AWS Firewall Manager uses to record SNS logs.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::FMS::NotificationChannel").WithTerraformTypeName("awscc_fms_notification_channel") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "sns_role_name": "SnsRoleName", "sns_topic_arn": "SnsTopicArn", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }