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

ephemeral: support write-only attributes #36031

Merged
merged 12 commits into from
Dec 12, 2024
Merged

ephemeral: support write-only attributes #36031

merged 12 commits into from
Dec 12, 2024

Conversation

DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Nov 18, 2024

This PR aims on building baseline support for write-only attributes, so attributes that can be set to ephemeral values and can not be read / referenced. These attributes are hidden from the state.

Fixes TF-18617

Target Release

1.11.x

Draft CHANGELOG entry

NEW FEATURES

  • Ephemeral Values: support for write-only attributes, so attributes that can be set to ephemeral values and can not be read / referenced. These attributes are hidden from the state and plan files.

@DanielMSchmidt DanielMSchmidt requested a review from a team as a code owner November 18, 2024 16:28
@DanielMSchmidt DanielMSchmidt marked this pull request as draft November 18, 2024 16:28
@DanielMSchmidt DanielMSchmidt force-pushed the TF-18617 branch 2 times, most recently from 2b388e8 to be31c29 Compare November 18, 2024 16:32
Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

internal/terraform/node_resource_abstract_instance.go Outdated Show resolved Hide resolved
internal/plans/changes_src.go Outdated Show resolved Hide resolved
internal/states/instance_object.go Outdated Show resolved Hide resolved
internal/states/remote/state_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Contributor

The equivalence tests will be updated. Please verify the changes here.

Copy link
Member

@jbardin jbardin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DanielMSchmidt, this should be enough to get us basic write-only support. I left a few comments in-inline. We may want to just drop the toBeImplemented tests from the PR and evaluate if that is even something to be supported.

internal/lang/ephemeral/validate.go Outdated Show resolved Hide resolved
internal/terraform/context_plan.go Outdated Show resolved Hide resolved
internal/terraform/context_plan_ephemeral_test.go Outdated Show resolved Hide resolved
internal/terraform/context_plan_ephemeral_test.go Outdated Show resolved Hide resolved
internal/terraform/transform_import_state_test.go Outdated Show resolved Hide resolved
@DanielMSchmidt DanielMSchmidt merged commit ab2846c into main Dec 12, 2024
11 checks passed
@DanielMSchmidt DanielMSchmidt deleted the TF-18617 branch December 12, 2024 14:59
Copy link
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants