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

Make use of ComputedWhen in aws_s3_bucket_object #5330

Conversation

radeksimko
Copy link
Member

At the moment if one tries to use aws_s3_bucket_object with versioning enabled on that bucket, it won't work quite as expected, because the version_id is updated after apply.

This limitation makes aws_s3_bucket_object not very handy when used in combination with aws_lambda_function.s3_object_version (mapped to aws_s3_bucket_object.version_id).

The full Lambda Function update cycle when used w/ aws_s3_bucket_object therefore requires two apply steps.

@phinze
Copy link
Contributor

phinze commented Feb 27, 2016

I think we can cover this behavior in a Lambda function acceptance test? If the update does not propagate across a single apply the "non empty plan after test step" check will fire.

@radeksimko
Copy link
Member Author

Basically you mean removing the following 8 lines of code?
https://github.com/hashicorp/terraform/pull/5239/files#diff-bb5084fa21c8a7174fca0cc2119dc5c9R128

😉

Once that PR is merged, I'll be happy to attach such minus change to this PR.

jtopjian and others added 11 commits February 27, 2016 23:48
This commit allows "detaching" to be a valid pending state when
detaching a volume. Despite being obvious pending state, it also
helps in race situations when a volume is implicitly being detached
by Nova.
…ching-state

provider/openstack: Add detaching as valid pending state
The top level object was used not the tags within
This commit protects against unsafe typecasting when an instance is
updating its network configuration.
…twork-update-guard

provider/openstack: Safely typecast network during instance update
hashicorpGH-4812 removed reading server.AccessIPv4 and server.AccessIPv6
because, AFAICT, they are not set by Nova. After removal, a user
reported that they were no longer able to read IPs from access_ip_v4
and access_ip_v6 on Rackspace. It's possible that Rackspace sets
the AccessIPv* attributes, and if that's true, other cloud providers
might as well through custom extensions.

The priority of how access_ip_v* is set might require some tweaks in
the future.
…-version-not-required

Lambda S3 object version defaults to '$LATEST' if unspecified
@phinze
Copy link
Contributor

phinze commented Feb 29, 2016

Oh HA! Sounds good. 😄

jtopjian and others added 12 commits February 29, 2016 08:44
…r-access

provider/openstack: Re-Add server.AccessIPv4 and server.AccessIPv6
provider/aws: `aws_elastisearch_domain` tags not being set correctly.
Helpful when iterating on a drift test.

Eventually I think this assertion could be fanned out to something much
more targeted like:

    ExpectAttributeDiff(resource, attr, oldval, newval)

But this is a step in the right direction.
The `description` field is easy to confuse for a nice field to
add an arbitrary comment to - and it's surprising that changes to this
field force a new resource, so we add a big note about it to point users
at tags.

Also marked all the other ForceNew attributes on this resource.
…ptyplan-log

acctests: log a line w/ the non-empty plan
…rcenew

provider/aws docs: Mark ForceNew fields, note about description
Acctest info in README was a bit stale since the enhanced contributing
guide landed.
README: link off to CONTRIBUTING for acctest info
phinze and others added 20 commits March 11, 2016 10:33
…pdates

provider/aws: Add support for updating Lambda function
…int-guard

provider/aws: Guard against Nil Reference in Redshift Endpoints
provider/aws: Document set_identifer requirement for Route53 weighted and failover types
aws: Fix CloudFormation update for parameters & capabilities if not modified
…instance-docs

Updated google instance docs with custom instance type
…b-count

provider/aws validate number of load_balancers before creating aws_ecs_service
ComputedWhen is a long `TODO`d schema feature that allows any field to
be marked as computed when some terget field changes.

Right now Terraform has no way of invalidating a field until it sees
_that_ field changes, but there are plenty of examples of scenarios
where one field changing implies that another field is going to be
assigned a new value.
@radeksimko
Copy link
Member Author

@phinze Would you mind rebasing your branch, so I can update this PR?

@radeksimko
Copy link
Member Author

Closing until ComputedWhen is actually supported - then we can reimplement.

WIP is at #4846 but it might take more effort to finish.

@radeksimko radeksimko closed this Jan 20, 2017
@radeksimko radeksimko deleted the computed-when-s3-obj branch January 20, 2017 14:26
@thomschlereth
Copy link

thomschlereth commented Mar 11, 2020

Any updates on this? Still having this issue using 0.12.21

@ghost
Copy link

ghost commented Mar 12, 2020

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 ghost locked and limited conversation to collaborators Mar 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.