You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We make use of "aws_s3_bucket_object" to upload a config file to S3, and we specify the "source" like: "${path.module}/config.json". After an apply we make use of remote states so that changes can be made by different people.
When someone else runs a plan the source field causes the whole resource to be marked as changed, for example:
The contents of the file are the same, and we supply the etag as it mentions in the docs.
It seems like the resource modification should either ignore the source field (as it makes no difference where the source is from, it should be based on the etag if it's supplied).
Or there should be an interpolater that will return a path relative to cwd - effectively removing the personal path part that contains usernames, and different paths depending on where the project is checked out.
Terraform v0.7.3
The text was updated successfully, but these errors were encountered:
There is a separate attribute for the actual content that works like that... Could potentially make source read the file in its StateFunc and do a similar thing here I think, but feels weird to do I/O in StateFunc.
We have run into this a few times now and I keep thinking it'd be handy to expose the current module's dir path to resources somehow so they can normalize paths to be module-relative when possible. If course that requires some provider protocol changes so not super simple...
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.
ghost
locked and limited conversation to collaborators
Apr 10, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We make use of "aws_s3_bucket_object" to upload a config file to S3, and we specify the "source" like: "${path.module}/config.json". After an apply we make use of remote states so that changes can be made by different people.
When someone else runs a plan the source field causes the whole resource to be marked as changed, for example:
~ module.service_cluster_dev.aws_s3_bucket_object.SOTConfig source: "/Users/jeffrey/work/config.json" => "/Users/oliver/work/config.json"
The contents of the file are the same, and we supply the etag as it mentions in the docs.
It seems like the resource modification should either ignore the source field (as it makes no difference where the source is from, it should be based on the etag if it's supplied).
Or there should be an interpolater that will return a path relative to cwd - effectively removing the personal path part that contains usernames, and different paths depending on where the project is checked out.
Terraform v0.7.3
The text was updated successfully, but these errors were encountered: