mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-16 16:47:20 +01:00
fix: Forces cluster outputs to wait until access entries are complete (#3000)
This commit is contained in:
@@ -41,11 +41,6 @@ kubectl delete node -l karpenter.sh/provisioner-name=default
|
|||||||
2. Remove the resources created by Terraform
|
2. Remove the resources created by Terraform
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Necessary to avoid removing Terraform's permissions too soon before its finished
|
|
||||||
# cleaning up the resources it deployed inside the cluster
|
|
||||||
terraform state rm 'module.eks.aws_eks_access_entry.this["cluster_creator"]' || true
|
|
||||||
terraform state rm 'module.eks.aws_eks_access_policy_association.this["cluster_creator_admin"]' || true
|
|
||||||
|
|
||||||
terraform destroy
|
terraform destroy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -37,9 +37,6 @@ $ terraform apply
|
|||||||
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
|
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Necessary to avoid removing Terraform's permissions too soon before its finished
|
|
||||||
# cleaning up the resources it deployed inside the clsuter
|
|
||||||
terraform state rm 'module.eks.aws_eks_access_entry.this["cluster_creator_admin"]' || true
|
|
||||||
terraform destroy
|
terraform destroy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
20
outputs.tf
20
outputs.tf
@@ -5,16 +5,31 @@
|
|||||||
output "cluster_arn" {
|
output "cluster_arn" {
|
||||||
description = "The Amazon Resource Name (ARN) of the cluster"
|
description = "The Amazon Resource Name (ARN) of the cluster"
|
||||||
value = try(aws_eks_cluster.this[0].arn, null)
|
value = try(aws_eks_cluster.this[0].arn, null)
|
||||||
|
|
||||||
|
depends_on = [
|
||||||
|
aws_eks_access_entry.this,
|
||||||
|
aws_eks_access_policy_association.this,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
output "cluster_certificate_authority_data" {
|
output "cluster_certificate_authority_data" {
|
||||||
description = "Base64 encoded certificate data required to communicate with the cluster"
|
description = "Base64 encoded certificate data required to communicate with the cluster"
|
||||||
value = try(aws_eks_cluster.this[0].certificate_authority[0].data, null)
|
value = try(aws_eks_cluster.this[0].certificate_authority[0].data, null)
|
||||||
|
|
||||||
|
depends_on = [
|
||||||
|
aws_eks_access_entry.this,
|
||||||
|
aws_eks_access_policy_association.this,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
output "cluster_endpoint" {
|
output "cluster_endpoint" {
|
||||||
description = "Endpoint for your Kubernetes API server"
|
description = "Endpoint for your Kubernetes API server"
|
||||||
value = try(aws_eks_cluster.this[0].endpoint, null)
|
value = try(aws_eks_cluster.this[0].endpoint, null)
|
||||||
|
|
||||||
|
depends_on = [
|
||||||
|
aws_eks_access_entry.this,
|
||||||
|
aws_eks_access_policy_association.this,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
output "cluster_id" {
|
output "cluster_id" {
|
||||||
@@ -25,6 +40,11 @@ output "cluster_id" {
|
|||||||
output "cluster_name" {
|
output "cluster_name" {
|
||||||
description = "The name of the EKS cluster"
|
description = "The name of the EKS cluster"
|
||||||
value = try(aws_eks_cluster.this[0].name, "")
|
value = try(aws_eks_cluster.this[0].name, "")
|
||||||
|
|
||||||
|
depends_on = [
|
||||||
|
aws_eks_access_entry.this,
|
||||||
|
aws_eks_access_policy_association.this,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
output "cluster_oidc_issuer_url" {
|
output "cluster_oidc_issuer_url" {
|
||||||
|
|||||||
Reference in New Issue
Block a user