// Code generated by generators/resource/main.go; DO NOT EDIT. package iot 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_iot_authorizer", authorizerResourceType) } // authorizerResourceType returns the Terraform awscc_iot_authorizer resource type. // This Terraform resource type corresponds to the CloudFormation AWS::IoT::Authorizer resource type. func authorizerResourceType(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(), }, }, "authorizer_function_arn": { // Property: AuthorizerFunctionArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Required: true, }, "authorizer_name": { // Property: AuthorizerName // CloudFormation resource type schema: // { // "maxLength": 128, // "minLength": 1, // "pattern": "[\\w=,@-]+", // "type": "string" // } Type: types.StringType, Optional: true, Computed: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), validate.StringMatch(regexp.MustCompile("[\\w=,@-]+"), ""), }, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "enable_caching_for_http": { // Property: EnableCachingForHttp // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, }, "signing_disabled": { // Property: SigningDisabled // CloudFormation resource type schema: // { // "type": "boolean" // } Type: types.BoolType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "status": { // Property: Status // CloudFormation resource type schema: // { // "enum": [ // "ACTIVE", // "INACTIVE" // ], // "type": "string" // } Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "ACTIVE", "INACTIVE", }), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "items": { // "additionalProperties": false, // "properties": { // "Key": { // "type": "string" // }, // "Value": { // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array" // } 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, }, "token_key_name": { // Property: TokenKeyName // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Optional: true, }, "token_signing_public_keys": { // Property: TokenSigningPublicKeys // CloudFormation resource type schema: // { // "additionalProperties": false, // "patternProperties": { // "": { // "maxLength": 5120, // "type": "string" // } // }, // "type": "object" // } // Pattern: "" Type: types.MapType{ElemType: 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: "Creates an authorizer.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::IoT::Authorizer").WithTerraformTypeName("awscc_iot_authorizer") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "arn": "Arn", "authorizer_function_arn": "AuthorizerFunctionArn", "authorizer_name": "AuthorizerName", "enable_caching_for_http": "EnableCachingForHttp", "key": "Key", "signing_disabled": "SigningDisabled", "status": "Status", "tags": "Tags", "token_key_name": "TokenKeyName", "token_signing_public_keys": "TokenSigningPublicKeys", "value": "Value", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }