// Code generated by generators/resource/main.go; DO NOT EDIT. package apigateway 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_apigateway_resource", resourceResourceType) } // resourceResourceType returns the Terraform awscc_apigateway_resource resource type. // This Terraform resource type corresponds to the CloudFormation AWS::ApiGateway::Resource resource type. func resourceResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "parent_id": { // Property: ParentId // CloudFormation resource type schema: // { // "description": "The parent resource's identifier.", // "type": "string" // } Description: "The parent resource's identifier.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "path_part": { // Property: PathPart // CloudFormation resource type schema: // { // "description": "The last path segment for this resource.", // "type": "string" // } Description: "The last path segment for this resource.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "resource_id": { // Property: ResourceId // CloudFormation resource type schema: // { // "description": "A unique primary identifier for a Resource", // "type": "string" // } Description: "A unique primary identifier for a Resource", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "rest_api_id": { // Property: RestApiId // CloudFormation resource type schema: // { // "description": "The ID of the RestApi resource in which you want to create this resource..", // "type": "string" // } Description: "The ID of the RestApi resource in which you want to create this resource..", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, } 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::ApiGateway::Resource", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::ApiGateway::Resource").WithTerraformTypeName("awscc_apigateway_resource") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "parent_id": "ParentId", "path_part": "PathPart", "resource_id": "ResourceId", "rest_api_id": "RestApiId", }) opts = opts.IsImmutableType(true) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }