Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changelog/47950.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
resource/aws_route53_zone_association: Add resource identity support
```

```release-note:new-list-resource
aws_route53_zone_association
```
20 changes: 20 additions & 0 deletions internal/service/route53/service_package_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright IBM Corp. 2014, 2026
# SPDX-License-Identifier: MPL-2.0

resource "aws_route53_zone_association" "test" {
zone_id = aws_route53_zone.foo.id
vpc_id = aws_vpc.bar.id
}

resource "aws_vpc" "foo" {
cidr_block = "10.6.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_vpc" "bar" {
cidr_block = "10.7.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_route53_zone" "foo" {
name = "${var.rName}.example.com"

vpc {
vpc_id = aws_vpc.foo.id
}

lifecycle {
ignore_changes = [vpc]
}
}

variable "rName" {
description = "Name for resource"
type = string
nullable = false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright IBM Corp. 2014, 2026
# SPDX-License-Identifier: MPL-2.0

resource "aws_route53_zone_association" "test" {
zone_id = aws_route53_zone.foo.id
vpc_id = aws_vpc.bar.id
}

resource "aws_vpc" "foo" {
cidr_block = "10.6.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_vpc" "bar" {
cidr_block = "10.7.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_route53_zone" "foo" {
name = "${var.rName}.example.com"

vpc {
vpc_id = aws_vpc.foo.id
}

lifecycle {
ignore_changes = [vpc]
}
}

variable "rName" {
description = "Name for resource"
type = string
nullable = false
}
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "6.45.0"
}
}
}

provider "aws" {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright IBM Corp. 2014, 2026
# SPDX-License-Identifier: MPL-2.0

resource "aws_route53_zone_association" "test" {
count = var.resource_count

zone_id = aws_route53_zone.foo[count.index].id
vpc_id = aws_vpc.bar.id
}

resource "aws_vpc" "bar" {
cidr_block = "10.7.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_vpc" "foo" {
count = var.resource_count

cidr_block = cidrsubnet("10.0.0.0/8", 8, count.index)
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = "${var.rName}-${count.index}"
}
}

resource "aws_route53_zone" "foo" {
count = var.resource_count

name = "${var.rName}-${count.index}.example.com"

vpc {
vpc_id = aws_vpc.foo[count.index].id
}

lifecycle {
ignore_changes = [vpc]
}
}

variable "rName" {
description = "Name for resource"
type = string
nullable = false
}

variable "resource_count" {
description = "Number of resources to create"
type = number
nullable = false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright IBM Corp. 2014, 2026
# SPDX-License-Identifier: MPL-2.0

list "aws_route53_zone_association" "test" {
provider = aws

config {
vpc_id = aws_vpc.bar.id
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright IBM Corp. 2014, 2026
# SPDX-License-Identifier: MPL-2.0

resource "aws_route53_zone_association" "test" {
count = var.resource_count

zone_id = aws_route53_zone.foo[count.index].id
vpc_id = aws_vpc.bar.id
}

resource "aws_vpc" "bar" {
cidr_block = "10.7.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_vpc" "foo" {
count = var.resource_count

cidr_block = cidrsubnet("10.0.0.0/8", 8, count.index)
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = "${var.rName}-${count.index}"
}
}

resource "aws_route53_zone" "foo" {
count = var.resource_count

name = "${var.rName}-${count.index}.example.com"

vpc {
vpc_id = aws_vpc.foo[count.index].id
}

lifecycle {
ignore_changes = [vpc]
}
}

variable "rName" {
description = "Name for resource"
type = string
nullable = false
}

variable "resource_count" {
description = "Number of resources to create"
type = number
nullable = false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright IBM Corp. 2014, 2026
# SPDX-License-Identifier: MPL-2.0

list "aws_route53_zone_association" "test" {
provider = aws

include_resource = true

config {
vpc_id = aws_vpc.bar.id
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
resource "aws_route53_zone_association" "test" {
{{- template "region" }}
zone_id = aws_route53_zone.foo.id
vpc_id = aws_vpc.bar.id
}

resource "aws_vpc" "foo" {
cidr_block = "10.6.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_vpc" "bar" {
cidr_block = "10.7.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true

tags = {
Name = var.rName
}
}

resource "aws_route53_zone" "foo" {
name = "${var.rName}.example.com"

vpc {
vpc_id = aws_vpc.foo.id
}

lifecycle {
ignore_changes = [vpc]
}
}
Loading
Loading