// Code generated by generators/resource/main.go; DO NOT EDIT. package eks 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_eks_identity_provider_config", identityProviderConfigResourceType) } // identityProviderConfigResourceType returns the Terraform awscc_eks_identity_provider_config resource type. // This Terraform resource type corresponds to the CloudFormation AWS::EKS::IdentityProviderConfig resource type. func identityProviderConfigResourceType(ctx context.Context) (tfsdk.ResourceType, error) { attributes := map[string]tfsdk.Attribute{ "cluster_name": { // Property: ClusterName // CloudFormation resource type schema: // { // "description": "The name of the identity provider configuration.", // "type": "string" // } Description: "The name of the identity provider configuration.", Type: types.StringType, Required: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.RequiresReplace(), }, }, "identity_provider_config_arn": { // Property: IdentityProviderConfigArn // CloudFormation resource type schema: // { // "description": "The ARN of the configuration.", // "type": "string" // } Description: "The ARN of the configuration.", Type: types.StringType, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), }, }, "identity_provider_config_name": { // Property: IdentityProviderConfigName // CloudFormation resource type schema: // { // "description": "The name of the OIDC provider configuration.", // "type": "string" // } Description: "The name of the OIDC provider configuration.", Type: types.StringType, Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "oidc": { // Property: Oidc // CloudFormation resource type schema: // { // "additionalProperties": false, // "description": "An object representing an OpenID Connect (OIDC) configuration.", // "properties": { // "ClientId": { // "description": "This is also known as audience. The ID for the client application that makes authentication requests to the OpenID identity provider.", // "type": "string" // }, // "GroupsClaim": { // "description": "The JWT claim that the provider uses to return your groups.", // "type": "string" // }, // "GroupsPrefix": { // "description": "The prefix that is prepended to group claims to prevent clashes with existing names (such as system: groups).", // "type": "string" // }, // "IssuerUrl": { // "description": "The URL of the OpenID identity provider that allows the API server to discover public signing keys for verifying tokens.", // "type": "string" // }, // "RequiredClaims": { // "insertionOrder": false, // "items": { // "additionalProperties": false, // "description": "The key value pairs that describe required claims in the identity token. If set, each claim is verified to be present in the token with a matching value.", // "properties": { // "Key": { // "description": "The key of the requiredClaims.", // "maxLength": 63, // "minLength": 1, // "type": "string" // }, // "Value": { // "description": "The value for the requiredClaims.", // "maxLength": 253, // "minLength": 1, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // }, // "UsernameClaim": { // "description": "The JSON Web Token (JWT) claim to use as the username. The default is sub, which is expected to be a unique identifier of the end user. You can choose other claims, such as email or name, depending on the OpenID identity provider. Claims other than email are prefixed with the issuer URL to prevent naming clashes with other plug-ins.", // "type": "string" // }, // "UsernamePrefix": { // "description": "The prefix that is prepended to username claims to prevent clashes with existing names. If you do not provide this field, and username is a value other than email, the prefix defaults to issuerurl#. You can use the value - to disable all prefixing.", // "type": "string" // } // }, // "required": [ // "ClientId", // "IssuerUrl" // ], // "type": "object" // } Description: "An object representing an OpenID Connect (OIDC) configuration.", Attributes: tfsdk.SingleNestedAttributes( map[string]tfsdk.Attribute{ "client_id": { // Property: ClientId Description: "This is also known as audience. The ID for the client application that makes authentication requests to the OpenID identity provider.", Type: types.StringType, Required: true, }, "groups_claim": { // Property: GroupsClaim Description: "The JWT claim that the provider uses to return your groups.", Type: types.StringType, Optional: true, }, "groups_prefix": { // Property: GroupsPrefix Description: "The prefix that is prepended to group claims to prevent clashes with existing names (such as system: groups).", Type: types.StringType, Optional: true, }, "issuer_url": { // Property: IssuerUrl Description: "The URL of the OpenID identity provider that allows the API server to discover public signing keys for verifying tokens.", Type: types.StringType, Required: true, }, "required_claims": { // Property: RequiredClaims Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key of the requiredClaims.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 63), }, }, "value": { // Property: Value Description: "The value for the requiredClaims.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 253), }, }, }, tfsdk.SetNestedAttributesOptions{}, ), Optional: true, }, "username_claim": { // Property: UsernameClaim Description: "The JSON Web Token (JWT) claim to use as the username. The default is sub, which is expected to be a unique identifier of the end user. You can choose other claims, such as email or name, depending on the OpenID identity provider. Claims other than email are prefixed with the issuer URL to prevent naming clashes with other plug-ins.", Type: types.StringType, Optional: true, }, "username_prefix": { // Property: UsernamePrefix Description: "The prefix that is prepended to username claims to prevent clashes with existing names. If you do not provide this field, and username is a value other than email, the prefix defaults to issuerurl#. You can use the value - to disable all prefixing.", Type: types.StringType, Optional: true, }, }, ), Optional: true, Computed: true, PlanModifiers: []tfsdk.AttributePlanModifier{ tfsdk.UseStateForUnknown(), tfsdk.RequiresReplace(), }, }, "tags": { // Property: Tags // CloudFormation resource type schema: // { // "description": "An array of key-value pairs to apply to this resource.", // "insertionOrder": false, // "items": { // "additionalProperties": false, // "description": "A key-value pair to associate with a resource.", // "properties": { // "Key": { // "description": "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", // "maxLength": 128, // "minLength": 1, // "type": "string" // }, // "Value": { // "description": "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", // "maxLength": 256, // "minLength": 0, // "type": "string" // } // }, // "required": [ // "Key", // "Value" // ], // "type": "object" // }, // "type": "array", // "uniqueItems": true // } Description: "An array of key-value pairs to apply to this resource.", Attributes: tfsdk.SetNestedAttributes( map[string]tfsdk.Attribute{ "key": { // Property: Key Description: "The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(1, 128), }, }, "value": { // Property: Value Description: "The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringLenBetween(0, 256), }, }, }, tfsdk.SetNestedAttributesOptions{}, ), Optional: true, }, "type": { // Property: Type // CloudFormation resource type schema: // { // "description": "The type of the identity provider configuration.", // "enum": [ // "oidc" // ], // "type": "string" // } Description: "The type of the identity provider configuration.", Type: types.StringType, Required: true, Validators: []tfsdk.AttributeValidator{ validate.StringInSlice([]string{ "oidc", }), }, 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: "An object representing an Amazon EKS IdentityProviderConfig.", Version: 1, Attributes: attributes, } var opts ResourceTypeOptions opts = opts.WithCloudFormationTypeName("AWS::EKS::IdentityProviderConfig").WithTerraformTypeName("awscc_eks_identity_provider_config") opts = opts.WithTerraformSchema(schema) opts = opts.WithSyntheticIDAttribute(true) opts = opts.WithAttributeNameMap(map[string]string{ "client_id": "ClientId", "cluster_name": "ClusterName", "groups_claim": "GroupsClaim", "groups_prefix": "GroupsPrefix", "identity_provider_config_arn": "IdentityProviderConfigArn", "identity_provider_config_name": "IdentityProviderConfigName", "issuer_url": "IssuerUrl", "key": "Key", "oidc": "Oidc", "required_claims": "RequiredClaims", "tags": "Tags", "type": "Type", "username_claim": "UsernameClaim", "username_prefix": "UsernamePrefix", "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 }