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

aws_acm_certificate attributes reference - non existing attributes #11805

Closed
piontas opened this issue Jan 29, 2020 · 5 comments
Closed

aws_acm_certificate attributes reference - non existing attributes #11805

piontas opened this issue Jan 29, 2020 · 5 comments
Labels
service/acm Issues and PRs that pertain to the acm service.

Comments

@piontas
Copy link

piontas commented Jan 29, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

terraform -v
Terraform v0.12.20
+ provider.aws v2.46.0

Affected Resource(s)

  • aws_acm_certificate

Terraform Configuration Files

# main.tf
resource "aws_acm_certificate" "cert" {
  domain_name               = "example.com"
  certificate_authority_arn = "arn:aws:acm-pca:eu-west-1:ACCOUNT_ID:certificate-authority/CERTIFICATE_ID"
  subject_alternative_names = ["something.example.com"]
  tags  = {
    SomeTag = "value"
}

  lifecycle {
    create_before_destroy = true
  }
}

# output.tf
output "certificate_arn" {
  description = "Some description"
  value       = aws_acm_certificate.cert.arn
}

Debug Output

Error: Unsupported attribute

  on outputs.tf line 4, in output "certificate_arn":
  4:   value       = aws_acm_certificate.cert.arn

Panic Output

Expected Behavior

aws_acm_certificate.cert.arn should return certificate arn

Actual Behavior

    | aws_acm_certificate.cert is empty tuple

This value does not have any attributes.

Steps to Reproduce

  1. terraform apply without outputs defined. It will work and create certificate
  2. define output in outputs file to be able to see certificate arn
  3. Run terraform plan

Important Factoids

Certificate Authority certificate_authority_arn used in configuration is AWS ACM Private CA. It is in an Active state!
Certificate exist and it's working fine.

@ghost ghost added the service/acm Issues and PRs that pertain to the acm service. label Jan 29, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 29, 2020
@mjrc
Copy link

mjrc commented Feb 10, 2020

I did have the same problem and Terragrunt did not let me execute a plan. After trying a few things such as changing Terraform version and provider version, the only thing which helped me get to a plan was to remove the resource from the state and reimport it. I've used an older provider when doing so and I did not test whether it would work on the new provider. My current versions are:

terraform -version
Terraform v0.12.20
+ provider.archive v1.3.0
+ provider.aws v2.40.0
+ provider.template v2.1.2

@priiiiit
Copy link

I had the same problem with aws_cloudfront_distribution resource complaining about change in active_trusted_signers.

Removing from state and then importing the resource once again fixed the problem. I am using Terragrunt and fixed it while using the latest Terraform, Terragrunt and AWS provider.

Versions:

$ terraform -version
Terraform v0.13.0
$ terragrunt --version
terragrunt version v0.23.33
$ tf providers
Providers required by configuration:
.
└── provider[registry.terraform.io/hashicorp/aws] ~> 3.0, ~> 3.0

Removing:

$ terragrunt state rm aws_cloudfront_distribution.website_cdn_root
[...]
Removed aws_cloudfront_distribution.website_cdn_root
Successfully removed 1 resource instance(s).
Releasing state lock. This may take a few moments...

Importing:

$ terragrunt import aws_cloudfront_distribution.website_cdn_root <CLOUDFRONT_DISTRO_ID>
[...]
aws_cloudfront_distribution.website_cdn_root: Importing from ID "<CLOUDFRONT_DISTRO_ID>"...
aws_cloudfront_distribution.website_cdn_root: Import prepared!
  Prepared aws_cloudfront_distribution for import
aws_cloudfront_distribution.website_cdn_root: Refreshing state... [id=<CLOUDFRONT_DISTRO_ID>]

After this, plan and apply worked just fine again.

@justinretzolk
Copy link
Member

Hey y'all 👋 Thank you for taking the time to file this, and for the continued discussion! Given that there's been a number of AWS provider releases since the most recent comment, can anyone confirm whether they're still experiencing this behavior?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 18, 2021
@gdavison
Copy link
Contributor

Since there's been no response, we will assume that this issue has been resolved and will close it.

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Sep 26, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/acm Issues and PRs that pertain to the acm service.
Projects
None yet
Development

No branches or pull requests

5 participants