// Code generated by generators/resource/main.go; DO NOT EDIT. package xray 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" "github.com/hashicorp/terraform-provider-awscc/internal/validate" ) func init() { registry.AddResourceTypeFactory("awscc_xray_group", groupResourceType) } // groupResourceType returns the Terraform awscc_xray_group resource type. // This Terraform resource type corresponds to the CloudFormation AWS::XRay::Group resource type. func groupResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "filter_expression": { // Property: FilterExpression // CloudFormation resource type schema: // { // "description": "The filter expression defining criteria by which to group traces.", // "type": "string" // } Description: "The filter expression defining criteria by which to group traces.", Type: types.StringType, Optional: true, }, "group_arn": { // Property: GroupARN // CloudFormation resource type schema: // { // "description": "The ARN of the group that was generated on creation.", // "maxLength": 400, // "minLength": 1, // "type": "string" // } Description: "The ARN of the group that was generated on creation.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "group_name": { // Property: GroupName // CloudFormation resource type schema: // { // "description": "The case-sensitive name of the new group. Names must be unique.", // "maxLength": 32, // "minLength": 1, // "type": "string" // } Description: "The case-sensitive name of the new group. Names must be unique.", Type: types.StringType, Optional: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 32), }, }, "insights_configuration": { // Property: InsightsConfiguration // CloudFormation resource type schema: // { // "additionalProperties": false, // "properties": { // "InsightsEnabled": { // "description": "Set the InsightsEnabled value to true to enable insights or false to disable insights.", // "type": "boolean" // }, // "NotificationsEnabled": { // "description": "Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.", // "type": "boolean" // } // }, // "type": "object" // } Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "insights_enabled": { // Property: InsightsEnabled Description: "Set the InsightsEnabled value to true to enable insights or false to disable insights.", Type: types.BoolType, Optional: true, }, "notifications_enabled": { // Property: NotificationsEnabled Description: "Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.", Type: types.BoolType, Optional: true, }, }, ), Optional: true, }, "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, }, } attributes["id"] = tfsdk.Attribute{ Description: "Uniquely identifies the resource.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, } schema := tfsdk.Schema{ Description: "This schema provides construct and validation rules for AWS-XRay Group resource parameters.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::XRay::Group").WithTerraformTypeName("awscc_xray_group") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "filter_expression": "FilterExpression", "group_arn": "GroupARN", "group_name": "GroupName", "insights_configuration": "InsightsConfiguration", "insights_enabled": "InsightsEnabled", "key": "Key", "notifications_enabled": "NotificationsEnabled", "tags": "Tags", "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 }