Open lapkritinis opened 2 months ago
Voting for Prioritization
Volunteering to Work on This Issue
If anyone else struggling with it.. here is a "wrapper" which does same thing:
data "aws_region" "current" {}
data "external" "this" {
// wrapping response into json as it fails to parse complex json
program = ["bash", "-c", "aws eks describe-addon-configuration --region ${data.aws_region.current.name} --addon-name ${var.addon_config.name} --addon-version ${var.addon_config.version} --query 'configurationSchema' --output json | jq -R -c '{response: .}'"]
}
output "this" {
value = jsondecode(jsondecode(data.external.this.result.response)) // double encoded
}
variable "addon_config" {
type = object({
name = string
version = string
})
}
Description
It fetches default EKS addon configuration. Required for example to fetch coredns default pod tolerations so I can add mine additionally instead of overwriting them or hardcoding them. I think should be simple task to complete - there is Go SDK resource for it:
https://pkg.go.dev/github.com/aws/aws-sdk-go@v1.55.5/service/eks#DescribeAddonConfigurationInput
Requested Resource(s) and/or Data Source(s)
"data" "aws_eks_addon_configuration"
Potential Terraform Configuration
References
https://docs.aws.amazon.com/cli/latest/reference/eks/describe-addon-configuration.html
Would you like to implement a fix?
None