diff --git a/docs/resources/eks_identity_provider_config.md b/docs/resources/eks_identity_provider_config.md index 1bf5ba2dc0..ba4a6acfd1 100644 --- a/docs/resources/eks_identity_provider_config.md +++ b/docs/resources/eks_identity_provider_config.md @@ -10,7 +10,27 @@ description: |- An object representing an Amazon EKS IdentityProviderConfig. - +## Example Usage + +```terraform +resource "awscc_eks_identity_provider_config" "identity_provider_config" { + cluster_name = awscc_eks_cluster.eks_cluster.name + type = "oidc" + identity_provider_config_name = "identity_provider_config" + + oidc { + client_id = "sts.amazonaws.com" + issuer_url = aws_eks_cluster.eks_cluster.identity[0].oidc[0].issuer + + } # oid + tags = [{ + key = "Modified By" + value = "AWSCC" + }] + # depends_on = [aws_eks_cluster.eks_cluster] + +} +``` ## Schema diff --git a/examples/resources/awscc_eks_identity_provider_config/eks_identity_provider_config.tf b/examples/resources/awscc_eks_identity_provider_config/eks_identity_provider_config.tf new file mode 100644 index 0000000000..449199a9bf --- /dev/null +++ b/examples/resources/awscc_eks_identity_provider_config/eks_identity_provider_config.tf @@ -0,0 +1,15 @@ +resource "awscc_eks_identity_provider_config" "identity_provider_config" { + cluster_name = awscc_eks_cluster.eks_cluster.name + type = "oidc" + identity_provider_config_name = "identity_provider_config" + + oidc { + client_id = "sts.amazonaws.com" + issuer_url = "https://${awscc_iam_oidc_provider.example.url}" + } + + tags = [{ + key = "Modified By" + value = "AWSCC" + }] +} diff --git a/templates/resources/eks_identity_provider_config.md.tmpl b/templates/resources/eks_identity_provider_config.md.tmpl new file mode 100644 index 0000000000..082ba038b2 --- /dev/null +++ b/templates/resources/eks_identity_provider_config.md.tmpl @@ -0,0 +1,25 @@ +--- +page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" +subcategory: "" +description: |- +{{ .Description | plainmarkdown | trimspace | prefixlines " " }} +--- + +# {{.Name}} ({{.Type}}) + +{{ .Description | trimspace }} + +## Example Usage + +{{ tffile (printf "examples/resources/%s/eks_identity_provider_config.tf" .Name)}} + +{{ .SchemaMarkdown | trimspace }} +{{- if .HasImport }} + +## Import + +Import is supported using the following syntax: + +{{ codefile "shell" .ImportFile }} + +{{- end }}