Skip to content

Commit

Permalink
fix: Remove deprecated external-dns attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
nada.jankovic committed Mar 8, 2023
1 parent 7782080 commit 3c408f1
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
3 changes: 0 additions & 3 deletions modules/kubernetes-addons/external-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,15 @@ For complete project documentation, please visit the [ExternalDNS Github reposit
|------|------|
| [aws_iam_policy.external_dns](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
| [aws_iam_policy_document.external_dns_iam_policy_document](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_route53_zone.selected](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/route53_zone) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_addon_context"></a> [addon\_context](#input\_addon\_context) | Input configuration for the addon | <pre>object({<br> aws_caller_identity_account_id = string<br> aws_caller_identity_arn = string<br> aws_eks_cluster_endpoint = string<br> aws_partition_id = string<br> aws_region_name = string<br> eks_cluster_id = string<br> eks_oidc_issuer_url = string<br> eks_oidc_provider_arn = string<br> tags = map(string)<br> irsa_iam_role_path = string<br> irsa_iam_permissions_boundary = string<br> })</pre> | n/a | yes |
| <a name="input_domain_name"></a> [domain\_name](#input\_domain\_name) | [Deprecated - use `route53_zone_arns`] Domain name of the Route53 hosted zone to use with External DNS. | `string` | n/a | yes |
| <a name="input_helm_config"></a> [helm\_config](#input\_helm\_config) | External DNS Helm Configuration | `any` | `{}` | no |
| <a name="input_irsa_policies"></a> [irsa\_policies](#input\_irsa\_policies) | Additional IAM policies used for the add-on service account. | `list(string)` | `[]` | no |
| <a name="input_manage_via_gitops"></a> [manage\_via\_gitops](#input\_manage\_via\_gitops) | Determines if the add-on should be managed via GitOps. | `bool` | `false` | no |
| <a name="input_private_zone"></a> [private\_zone](#input\_private\_zone) | [Deprecated - use `route53_zone_arns`] Determines if referenced Route53 hosted zone is private. | `bool` | `false` | no |
| <a name="input_route53_zone_arns"></a> [route53\_zone\_arns](#input\_route53\_zone\_arns) | List of Route53 zones ARNs which external-dns will have access to create/manage records | `list(string)` | `[]` | no |

## Outputs
Expand Down
5 changes: 2 additions & 3 deletions modules/kubernetes-addons/external-dns/data.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
data "aws_iam_policy_document" "external_dns_iam_policy_document" {
statement {
effect = "Allow"
resources = distinct(concat(
[data.aws_route53_zone.selected.arn],
resources = distinct(
var.route53_zone_arns
))
)
actions = [
"route53:ChangeResourceRecordSets",
"route53:ListResourceRecordSets",
Expand Down
6 changes: 0 additions & 6 deletions modules/kubernetes-addons/external-dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,3 @@ resource "aws_iam_policy" "external_dns" {
policy = data.aws_iam_policy_document.external_dns_iam_policy_document.json
tags = var.addon_context.tags
}

# TODO - remove at next breaking change
data "aws_route53_zone" "selected" {
name = var.domain_name
private_zone = var.private_zone
}
11 changes: 0 additions & 11 deletions modules/kubernetes-addons/external-dns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ variable "irsa_policies" {
default = []
}

variable "domain_name" {
description = "[Deprecated - use `route53_zone_arns`] Domain name of the Route53 hosted zone to use with External DNS."
type = string
}

variable "private_zone" {
description = "[Deprecated - use `route53_zone_arns`] Determines if referenced Route53 hosted zone is private."
type = bool
default = false
}

variable "route53_zone_arns" {
description = "List of Route53 zones ARNs which external-dns will have access to create/manage records"
type = list(string)
Expand Down

0 comments on commit 3c408f1

Please sign in to comment.