// Code generated by generators/resource/main.go; DO NOT EDIT. package lightsail 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_lightsail_static_ip", staticIpResourceType) } // staticIpResourceType returns the Terraform awscc_lightsail_static_ip resource type. // This Terraform resource type corresponds to the CloudFormation AWS::Lightsail::StaticIp resource type. func staticIpResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "attached_to": { // Property: AttachedTo // CloudFormation resource type schema: // { // "description": "The instance where the static IP is attached.", // "type": "string" // } Description: "The instance where the static IP is attached.", Type: types.StringType, Optional: true, }, "ip_address": { // Property: IpAddress // CloudFormation resource type schema: // { // "description": "The static IP address.", // "type": "string" // } Description: "The static IP address.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "is_attached": { // Property: IsAttached // CloudFormation resource type schema: // { // "description": "A Boolean value indicating whether the static IP is attached.", // "type": "boolean" // } Description: "A Boolean value indicating whether the static IP is attached.", Type: types.BoolType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "static_ip_arn": { // Property: StaticIpArn // CloudFormation resource type schema: // { // "type": "string" // } Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "static_ip_name": { // Property: StaticIpName // CloudFormation resource type schema: // { // "description": "The name of the static IP address.", // "type": "string" // } Description: "The name of the static IP address.", 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::Lightsail::StaticIp", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::Lightsail::StaticIp").WithTerraformTypeName("awscc_lightsail_static_ip") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "attached_to": "AttachedTo", "ip_address": "IpAddress", "is_attached": "IsAttached", "static_ip_arn": "StaticIpArn", "static_ip_name": "StaticIpName", }) opts = opts.WithCreateTimeoutInMinutes(0).WithDeleteTimeoutInMinutes(0) opts = opts.WithUpdateTimeoutInMinutes(0) resourceType, err := NewResourceType(ctx, opts...) if err != nil { return nil, err } return resourceType, nil }