Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastly_tls_subscription return one challenge #430

Closed
hosht opened this issue Jun 23, 2021 · 3 comments
Closed

fastly_tls_subscription return one challenge #430

hosht opened this issue Jun 23, 2021 · 3 comments
Assignees
Labels

Comments

@hosht
Copy link

hosht commented Jun 23, 2021

Terraform Version

Terraform v1.0.0
on darwin_amd64

  • provider registry.terraform.io/fastly/fastly v0.32.0

Affected Resource(s)

  • fastly_tls_subscription

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

terraform {
  required_version = "1.0.0"

  required_providers {
    fastly = {
      source  = "fastly/fastly"
      version = "0.32.0"
    }
  }
}

locals {
  tls_domains = [
    "a.example.com",
    "b.example.com"
  ]
}

resource "fastly_tls_subscription" "this" {
  domains               = local.tls_domains
  certificate_authority = "lets-encrypt"
  configuration_id      = "configuration_id"
}

Expected Behavior

when domain argument receives more than two domains, fastly_tls_subscription should return list of managed_dns_challenges and managed_http_challenges for domain validation.

"managed_dns_challenges": [
  {
    "record_name": "_acme-challenge.a.example.com",
    "record_type": "CNAME",
    "record_value": "abcde12345.fastly-validations.com"
  },
  {
    "record_name": "_acme-challenge.b.example.com",
    "record_type": "CNAME",
    "record_value": "abcde12345.fastly-validations.com"
  }
]

Actual Behavior

it returns just a.example.com challenges. is it right?

"managed_dns_challenge": {
  "record_name": "_acme-challenge.a.example.com",
  "record_type": "CNAME",
  "record_value": "abcde12345.fastly-validations.com"
},
"managed_http_challenges": [
  {
    "record_name": "a.example.com",
    "record_type": "A",
...
@smaeda-ks
Copy link
Contributor

Thanks, @hosht! This appears to be a bug in our provider.

As this is going to be a breaking change, we will be discussing the fix in #435

@smaeda-ks smaeda-ks self-assigned this Jul 15, 2021
@smaeda-ks smaeda-ks added the bug label Jul 15, 2021
@smaeda-ks
Copy link
Contributor

This has been fixed in v0.33.0:
https://github.com/fastly/terraform-provider-fastly/blob/main/CHANGELOG.md

You can use the new managed_dns_challenges attribute instead:
https://registry.terraform.io/providers/fastly/fastly/latest/docs/resources/tls_subscription

We appreciate your feedback.

@hosht
Copy link
Author

hosht commented Jul 23, 2021

Thank you so much, it saves my time !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants