From b18b785c1ae25d4285fa65be1c4707b5a91c49f5 Mon Sep 17 00:00:00 2001 From: LearningNewbie <35469293+LearningNewbie@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:41:20 -0500 Subject: [PATCH 1/5] Create eks_identity_provider_config.tf --- .../eks_identity_provider_config.tf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 examples/resources/awscc_eks_identity_provider_config/eks_identity_provider_config.tf 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..0fbfeee2ed --- /dev/null +++ b/examples/resources/awscc_eks_identity_provider_config/eks_identity_provider_config.tf @@ -0,0 +1,17 @@ +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] + +} From 5339326fcad17d14852eb2bd201ab7777bd57a06 Mon Sep 17 00:00:00 2001 From: LearningNewbie <35469293+LearningNewbie@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:45:13 -0500 Subject: [PATCH 2/5] Create eks_identity_provider_config.md.tmpl --- .../eks_identity_provider_config.md.tmpl | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 templates/resources/eks_identity_provider_config.md.tmpl 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 }} From bdaddc0f7f605f3190cd185f02906cee8192126d Mon Sep 17 00:00:00 2001 From: LearningNewbie <35469293+LearningNewbie@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:52:14 -0500 Subject: [PATCH 3/5] Update eks_identity_provider_config.md --- .../resources/eks_identity_provider_config.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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 From cf2511c90994c2e7f594a6c359a69439acb79bb1 Mon Sep 17 00:00:00 2001 From: LearningNewbie <35469293+LearningNewbie@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:39:04 -0500 Subject: [PATCH 4/5] Update eks_identity_provider_config.tf --- .../eks_identity_provider_config.tf | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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 index 0fbfeee2ed..8394245b18 100644 --- 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 @@ -1,17 +1,15 @@ resource "awscc_eks_identity_provider_config" "identity_provider_config" { - cluster_name = awscc_eks_cluster.eks_cluster.name - type = "oidc" + cluster_name = awscc_eks_cluster.eks_cluster.name + type = "oidc" identity_provider_config_name = "identity_provider_config" - + oidc { - client_id = "sts.amazonaws.com" + client_id = "sts.amazonaws.com" issuer_url = aws_eks_cluster.eks_cluster.identity[0].oidc[0].issuer - - } # oid + } + tags = [{ - key = "Modified By" + key = "Modified By" value = "AWSCC" }] - # depends_on = [aws_eks_cluster.eks_cluster] - -} +} From 76a03bfad72d7c76ed4c57f11a99be17f550c174 Mon Sep 17 00:00:00 2001 From: LearningNewbie <35469293+LearningNewbie@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:11:59 -0500 Subject: [PATCH 5/5] Update eks_identity_provider_config.tf --- .../eks_identity_provider_config.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 index 8394245b18..449199a9bf 100644 --- 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 @@ -2,12 +2,12 @@ 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 + issuer_url = "https://${awscc_iam_oidc_provider.example.url}" } - + tags = [{ key = "Modified By" value = "AWSCC"