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

Update data_aws_crossaccount_policy to format resource string with account and region #3544

Merged
merged 2 commits into from
May 3, 2024

Conversation

frosforever
Copy link
Contributor

String with formatting wasn't passed to fmt.Sprintf resulting in the actual policy containing '%s' e.g. 'arn:aws:ec2:%s:%s:volume/*'. Passing the string to fmt.Sprintf results in the desired iam policy json.

…count and region

String with formatting wasn't passed to `fmt.Sprintf` resulting in the
actual policy containing '%s' e.g. 'arn:aws:ec2:%s:%s:volume/*'. Passing
the string to `fmt.Sprintf` results in the desired iam policy json.
@frosforever frosforever requested review from a team as code owners May 3, 2024 16:02
@frosforever frosforever requested review from hectorcast-db and removed request for a team May 3, 2024 16:02
@alexott
Copy link
Contributor

alexott commented May 3, 2024

@frosforever can you please fix the tests?

@frosforever
Copy link
Contributor Author

@alexott Done! Didn't realize it was checking the exact length as a proxy for what to expect in the policy. Not obvious to me how useful a test that is besides verifying that the policy hasn't accidentally changed, but I'll leave that as a future exercise.

Thanks for the review and for maintaining the provider!

@alexott alexott added this pull request to the merge queue May 3, 2024
Merged via the queue into databricks:main with commit 774cc97 May 3, 2024
5 checks passed
@frosforever frosforever deleted the fix-data-cross-account-policy branch May 3, 2024 16:59
tanmay-db added a commit that referenced this pull request May 13, 2024
### New Features and Improvements
* fix ([#3542](#3542)).
* Update data_aws_crossaccount_policy to format resource string with account and region ([#3544](#3544)).
* Robust retries for workspace get-status ([#3550](#3550)).
* Fix error message typo in mounts.go ([#3552](#3552)).
* State the options for run_if ([#3548](#3548)).
* Exporter: don't emit all UC objects when handling dependencies ([#3556](#3556)).
* Added state upgrader to remove `max_clusters_per_user` and ebs volume attributes set to zero ([#3551](#3551)).
* Exporter: track removed objects during the `Emit` phase ([#3554](#3554)).
* Jobs GoSDK schema migration ([#3532](#3532)).
* Exporter: optimize generation of `databricks_group_member` resource ([#3559](#3559)).

### Documentation Changes

### Exporter

### Internal Changes
@tanmay-db tanmay-db mentioned this pull request May 13, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 14, 2024
* Release v1.43.0

### New Features and Improvements
* fix ([#3542](#3542)).
* Update data_aws_crossaccount_policy to format resource string with account and region ([#3544](#3544)).
* Robust retries for workspace get-status ([#3550](#3550)).
* Fix error message typo in mounts.go ([#3552](#3552)).
* State the options for run_if ([#3548](#3548)).
* Exporter: don't emit all UC objects when handling dependencies ([#3556](#3556)).
* Added state upgrader to remove `max_clusters_per_user` and ebs volume attributes set to zero ([#3551](#3551)).
* Exporter: track removed objects during the `Emit` phase ([#3554](#3554)).
* Jobs GoSDK schema migration ([#3532](#3532)).
* Exporter: optimize generation of `databricks_group_member` resource ([#3559](#3559)).

### Documentation Changes

### Exporter

### Internal Changes

* -

* -

* -
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.

None yet

2 participants