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
2 changes: 1 addition & 1 deletion examples/complete/fixtures.us-west-1.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stage = "test"

name = "test-zone-2"

parent_zone_name = "testing.cloudposse.co"
parent_zone_name = "modules.cptest.test-automation.app"

validation_method = "DNS"

Expand Down
15 changes: 10 additions & 5 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
output "parent_zone_id" {
value = module.zone.parent_zone_id
value = module.zone.parent_zone_id
description = "The zone id of the parent Route53 Hosted Zone"
}

output "parent_zone_name" {
value = module.zone.parent_zone_name
value = module.zone.parent_zone_name
description = "The name of the parent Route53 Hosted Zone"
}

output "zone_id" {
value = module.zone.zone_id
value = module.zone.zone_id
description = "The zone id of the Route53 Hosted Zone"
}

output "zone_name" {
value = module.zone.zone_name
value = module.zone.zone_name
description = "The name of the desired Route53 Hosted Zone"
}

output "zone_fqdn" {
value = module.zone.fqdn
value = module.zone.fqdn
description = "The FQDN of the desired Route53 Hosted Zone"
}

output "certificate_id" {
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ resource "aws_acm_certificate" "default" {

options {
certificate_transparency_logging_preference = var.certificate_transparency_logging_preference ? "ENABLED" : "DISABLED"
export = var.certificate_export ? "ENABLED" : "DISABLED"
}

tags = module.this.tags
Expand Down
4 changes: 2 additions & 2 deletions test/src/examples_complete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ func TestExamplesComplete(t *testing.T) {
// Run `terraform output` to get the value of an output variable
zoneName := terraform.Output(t, terraformOptions, "zone_name")

expectedZoneName := "test-zone-2.testing.cloudposse.co"
expectedZoneName := "test-zone-2.modules.cptest.test-automation.app"
// Verify we're getting back the outputs we expect
assert.Equal(t, expectedZoneName, zoneName)

// Run `terraform output` to get the value of an output variable
certificateArn := terraform.Output(t, terraformOptions, "certificate_arn")

// Verify we're getting back the outputs we expect
assert.Contains(t, certificateArn, "arn:aws:acm:us-west-1:126450723953:certificate/")
assert.Contains(t, certificateArn, "arn:aws:acm:us-west-1:799847381734:certificate/")
}

func TestExamplesCompleteDisabled(t *testing.T) {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ variable "zone_id" {
description = "The zone id of the Route53 Hosted Zone which can be used instead of `var.zone_name`."
}

variable "certificate_export" {
type = bool
default = false
description = "Specifies whether the certificate can be exported"
}

variable "certificate_transparency_logging_preference" {
type = bool
default = true
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.40"
version = ">= 6.4.0"
}
}
}