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

Data source aws_acmpca_certificate_authority errors with error setting tags: Invalid address to set #19676

Closed
zhanmer-olo opened this issue Jun 4, 2021 · 4 comments · Fixed by #19681
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/acmpca Issues and PRs that pertain to the acmpca service.
Milestone

Comments

@zhanmer-olo
Copy link

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 CLI and Terraform AWS Provider Version

$ terraform -v  
Terraform v0.15.5
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.44.0

Affected Resource(s)

aws_acmpca_certificate_authority

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.0"
    }
  }
}

provider "aws" {
  region = "us-east-1"
}

data aws_acmpca_certificate_authority ca {
  arn = "arn:aws:acm-pca:us-east-1:000000000000:certificate-authority/00000000-0000-0000-0000-000000000000"
}

Debug Output

Sensitive information has been removed.
https://gist.github.com/zhanmer-olo/516e29d8a4ded73742caff97b6878d51

Expected Behavior

The Terraform plan should complete successfully

Actual Behavior

Error: error setting tags: Invalid address to set: []string{"revocation_configuration", "0", "crl_configuration", "0", "s3_object_acl"}

Steps to Reproduce

  1. terraform init
  2. terraform plan

Important Factoids

This was working against the same resource as recently as v3.43.0.

Below is the response of the aws acm-pca describe-certificate-authority command:

{
    "CertificateAuthority": {
        "Status": "ACTIVE", 
        "LastStateChangeAt": 1562068481.284, 
        "NotBefore": 1562064880.0, 
        "OwnerAccount": "000000000000", 
        "NotAfter": 1877687680.0, 
        "Arn": "arn:aws:acm-pca:us-east-1:000000000000:certificate-authority/00000000-0000-0000-0000-000000000000", 
        "Serial": "000000000000000000000000000000000000000", 
        "CertificateAuthorityConfiguration": {
            "KeyAlgorithm": "RSA_2048", 
            "SigningAlgorithm": "SHA256WITHRSA", 
            "Subject": {
                "Organization": "Org", 
                "State": "New York", 
                "CommonName": "staging.org.local", 
                "OrganizationalUnit": "Engineering", 
                "Locality": "New York"
            }
        }, 
        "Type": "ROOT", 
        "RevocationConfiguration": {
            "CrlConfiguration": {
                "Enabled": false
            }
        }, 
        "CreatedAt": 1562068465.449
    }
}

References

None.

  • #0000
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. service/acmpca Issues and PRs that pertain to the acmpca service. labels Jun 4, 2021
@ewbankkit ewbankkit added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 7, 2021
@ewbankkit
Copy link
Contributor

@ewbankkit
Copy link
Contributor

Failing test case in CI:

Test ended in panic.
------- Stdout: -------
=== RUN   TestAccDataSourceAwsAcmpcaCertificateAuthority_basic
=== PAUSE TestAccDataSourceAwsAcmpcaCertificateAuthority_basic
=== CONT  TestAccDataSourceAwsAcmpcaCertificateAuthority_basic
------- Stderr: -------
panic: Invalid address to set: []string{"revocation_configuration", "0", "crl_configuration", "0", "s3_object_acl"}
goroutine 782 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc002e51000, 0x843c325, 0x18, 0x6b7a440, 0xc002fa72a8, 0x0, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.6.1/helper/schema/resource_data.go:230 +0x371
github.com/terraform-providers/terraform-provider-aws/aws.dataSourceAwsAcmpcaCertificateAuthorityRead(0xc002e51000, 0x7587760, 0xc003324600, 0xd3510f0, 0xc000580000)
  /opt/teamcity-agent/work/2e10e023da0c7520/src/github.com/terraform-providers/terraform-provider-aws/aws/data_source_aws_acmpca_certificate_authority.go:122 +0x44c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc001350e00, 0x94a6348, 0xc002e5b600, 0xc002e51000, 0x7587760, 0xc003324600, 0x0, 0x0, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.6.1/helper/schema/resource.go:335 +0x1ee
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).ReadDataApply(0xc001350e00, 0x94a6348, 0xc002e5b600, 0xc0020070c0, 0x7587760, 0xc003324600, 0xc003324600, 0xc0020070c0, 0x0, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.6.1/helper/schema/resource.go:558 +0xfd
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadDataSource(0xc003564dc8, 0x94a6348, 0xc002e5b600, 0xc002006cc0, 0xc002e5b600, 0x40dba5, 0x7ed8de0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/v2@v2.6.1/helper/schema/grpc_provider.go:1105 +0x4d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadDataSource(0xc0039957c0, 0x94a63f0, 0xc002e5b600, 0xc002ffa280, 0xc0039957c0, 0xc002ffc5a0, 0xc0023f2ba0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:247 +0xe5
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadDataSource_Handler(0x81b4f20, 0xc0039957c0, 0x94a63f0, 0xc002ffc5a0, 0xc002f907e0, 0x0, 0x94a63f0, 0xc002ffc5a0, 0xc002d39a40, 0x123)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:416 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc002566540, 0x94d0a38, 0xc002ab8d80, 0xc002d29800, 0xc003ac2480, 0xd2ede30, 0x0, 0x0, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc002566540, 0x94d0a38, 0xc002ab8d80, 0xc002d29800, 0x0)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000d7c460, 0xc002566540, 0x94d0a38, 0xc002ab8d80, 0xc002d29800)
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
  /opt/teamcity-agent/work/2e10e023da0c7520/pkg/mod/google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd

@github-actions github-actions bot added this to the v3.45.0 milestone Jun 7, 2021
@github-actions
Copy link

This functionality has been released in v3.45.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@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 Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/acmpca Issues and PRs that pertain to the acmpca service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants