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

new AWS provider 3.35 can't set aws_ssm_parameter with tags and overwrite #18550

Closed
djsuszi opened this issue Apr 2, 2021 · 11 comments · Fixed by #18640
Closed

new AWS provider 3.35 can't set aws_ssm_parameter with tags and overwrite #18550

djsuszi opened this issue Apr 2, 2021 · 11 comments · Fixed by #18640
Assignees
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/ssm Issues and PRs that pertain to the ssm service.
Milestone

Comments

@djsuszi
Copy link

djsuszi commented Apr 2, 2021

provider "aws" {
  version = "3.35"
}

Plan:

  # module.service.aws_ssm_parameter.properties[70] will be created
   resource "aws_ssm_parameter" "properties" {
        arn       = (known after apply)
        data_type = (known after apply)
        id        = (known after apply)
        key_id    = (known after apply)
        name      = "/xxxx"
        overwrite = true
        tags      = {
            "Environment" = "xxx"
        }
        tier      = "Standard"
        type      = "String"
        value     = (sensitive value)
        version   = (known after apply)
    }

is giving error:

Error: error creating SSM parameter: ValidationException: Invalid request: tags and overwrite can't be used together. To create a parameter with tags, please remove overwrite flag. To update tags for an existing parameter, please use AddTagsToResource or RemoveTagsFromResource.
                status code: 400, request id: xxxxx

when I force old provider (version = "3.34") same code it's working fine

Terraform CLI and Terraform AWS Provider Version

terraform version: 0.12.29
hashicorp/aws 3.35.0

Affected Resource(s)

aws_ssm_parameter

Expected Behavior

it should work like in 3.34

Steps to Reproduce

try to use resource "aws_ssm_parameter" with overwrite and tags

@ghost ghost added the service/ssm Issues and PRs that pertain to the ssm service. label Apr 2, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 2, 2021
@ewbankkit
Copy link
Contributor

@djsuszi Thanks for raising this issue.
Which AWS region is the aws_ssm_parameter resource being created in?

Related:

@djsuszi
Copy link
Author

djsuszi commented Apr 2, 2021

Ireland eu-west-1

@yrral86
Copy link

yrral86 commented Apr 2, 2021

I'm seeing the same issue with 3.35, fixed with locking to 3.34. us-gov-west-1 region

@loreleimccollum-work
Copy link

We are seeing the same thing as well

@mxns-nicolas
Copy link

Same here with 3.35. Fixed using 3.34.0

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. 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 Apr 2, 2021
@edli2
Copy link

edli2 commented Apr 2, 2021

Same issue with v3.35 here:

Error: error creating SSM parameter: ValidationException: Invalid request: tags and overwrite can't be used together. To create a parameter with tags, please remove overwrite flag. To update tags for an existing parameter, please use AddTagsToResource or RemoveTagsFromResource.

@ghost
Copy link

ghost commented Apr 5, 2021

I +1 the submission but wanted to call out that I am seeing this in us-east-1.

@gchristidis
Copy link
Contributor

This has also broken my deployments as all my ssm_parameter resources have tags set and overwrite=true.
In the short term i have updated the version constraint for the aws provider to exclude 3.35 or greater.
The question i have then is this a bug or new expected behavior, if a bug then i will leave the version constraint in there until a fix is released, otherwise i will have to update all my ssm parameters to have overwrite=false.

@anGie44 anGie44 self-assigned this Apr 6, 2021
@e-moshaya
Copy link

I've also had to roll back to version 3.34.0 due to this breaking all our pipelines. It seems that even after setting overwrite to false and creating the resource is not idempotent and wants to add the tags the second terraform plan run fails because overwrite is set to false.

 Error: error creating SSM parameter: ParameterAlreadyExists: The parameter already exists. To overwrite this value, set the overwrite option in the request to true.

@ghost
Copy link

ghost commented Apr 9, 2021

This has been released in version 3.36.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 for triage. Thanks!

@ghost
Copy link

ghost commented May 9, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators May 9, 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/ssm Issues and PRs that pertain to the ssm service.
Projects
None yet
9 participants