-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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_imagebuilder_component forcing replacement when data changes #26117
Comments
Hello folks, any help on that? |
The problem is that the Looking at how it's handled in other versioned resources ( An important point is that after updating the component, it'll be pointing to the newest version and therefore all other resources depending on it (e.g. image or container recipes) will automatically switch to this version causing a replacement of them (unless we also add @ricardosouzamorais What do you think? |
The The bug is still in place. |
Yes, it does not exist. I wanted to know if that could solve your problem. |
Hello @justinretzolk , would you have any news on that? Thanks a ton. |
Hey @ricardosouzamorais 👋 Thank you for checking in on this. Unfortunately, I'm not able to provide an estimate on when this will be looked into due to the potential of shifting priorities (we prioritize work by count of ":+1:" reactions, as well as a few other things). For more information on how we prioritize, check out out prioritization guide. That said, I'm also curious about Kamil's question above; would a |
Hey @justinretzolk , in case the object has this attribute I would handle multiple versions of component the same way we do for task definitions? If so, it makes sense to help. |
This functionality has been released in v4.51.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! |
@ricardosouzamorais, just a question about this, if you have a component 0.0.1 and you upgrade it to 0.0.2 and use I'm just really struggling with the setup in TF. I was thinking to use some separate TF stack (with own state) for my components. Then I want to use them inside multiple non-prod and a prod image builder pipelines. The difficulty here is that I have to import the state of my components inside my image builder stack to reference the component:
But this way I can't "update" the component since it's state is used in a different TF stack. I don't want to create a separate component resource in TF each time. Any "AWS" recommendation here? Maybe I should avoid a "non-prod" image builder pipeline in some way.. because now I have to rebuild the AMI in prod instead of some sort of promotion... Otherwise it's a requirement to have a non-prod and prod environment.. |
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. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
When changing the
version
and alsodata
, terraform should create a new version of the component instead of forcing its replacement, removing it.AWS CLI Behavior
If you have the same
version
anddata
, AWS CLI it bring us the errorResourceAlreadyExistsException
.If you have the same
version
with a differentdata
, AWS CLI it bring us the errorResourceAlreadyExistsException
.If you have the same
data
with a differentversion
, AWS CLI creates a new version.If you have the new
data
andversion
values, AWS CLI creates a new version.Actual Behavior
When changing both
data
andversion
to new values, Terraform destroys the previous version and creates a new one.Steps to Reproduce
name
,version
,platform
, anddata
.terraform apply
will create the resource with informed version.version
anddata
to new values.terraform apply
will destroy existing version, and then, will create the resource with new informed version and data.Important Factoids
References
The text was updated successfully, but these errors were encountered: