Skip to content

Commit

Permalink
simplify example in fastly_tls_subscription doc (#516)
Browse files Browse the repository at this point in the history
* simplify example in `fastly_tls_subscription` doc

* make generate-docs
  • Loading branch information
smaeda-ks authored Dec 16, 2021
1 parent fa7f46d commit 38fdf4a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ terraform {
required_providers {
fastly = {
source = "fastly/fastly"
version >= "0.38.0"
version >= "0.39.0"
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions docs/resources/tls_subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,8 @@ resource "aws_route53_record" "domain_validation" {
depends_on = [fastly_tls_subscription.example]
for_each = {
for domain in fastly_tls_subscription.example.domains :
domain => element([
for obj in fastly_tls_subscription.example.managed_dns_challenges :
obj if obj.record_name == "_acme-challenge.${domain}"
], 0)
for challenge in fastly_tls_subscription.example.managed_dns_challenges :
trimprefix(challenge.record_name, "_acme-challenge.") => challenge
}
name = each.value.record_name
type = each.value.record_type
Expand Down
7 changes: 2 additions & 5 deletions examples/resources/tls_subscription_with_route53.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ resource "aws_route53_record" "domain_validation" {
depends_on = [fastly_tls_subscription.example]

for_each = {
for domain in fastly_tls_subscription.example.domains :
domain => element([
for obj in fastly_tls_subscription.example.managed_dns_challenges :
obj if obj.record_name == "_acme-challenge.${domain}"
], 0)
for challenge in fastly_tls_subscription.example.managed_dns_challenges :
trimprefix(challenge.record_name, "_acme-challenge.") => challenge
}
name = each.value.record_name
type = each.value.record_type
Expand Down

0 comments on commit 38fdf4a

Please sign in to comment.