Skip to content

Conversation

albertodonato
Copy link
Contributor

@albertodonato albertodonato commented May 30, 2025

ENG-5169

what

add support for managing dynamic policy collections

why

support the API feature in terraform as well

testing

acceptance tests and testing in sandbox

docs

updated here

@albertodonato albertodonato requested a review from a team as a code owner May 30, 2025 09:41
[ENG-5169](https://stacklet.atlassian.net/browse/ENG-5169)

### what

add support for managing dynamic policy collections

### why

support the API feature in terraform as well

### testing

acceptance tests and testing in sandbox

### docs

updated here
@albertodonato albertodonato force-pushed the ack/dynamic-policy-collections branch from b6fb718 to b6015e7 Compare May 30, 2025 14:29
Copy link

@jtroup jtroup left a comment

Choose a reason for hiding this comment

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

A comment and a question, neither blocking

@@ -13,28 +13,27 @@ Manages a policy collection.
## Example Usage

```terraform
# Create an AWS policy collection
# Create a policy collection
Copy link

Choose a reason for hiding this comment

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

@albertodonato While I'm fine dropping it down to just one example, I wonder if it's worth being explicit that policies support any cloud Stacklet supports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It felt to me like given that the only difference in the example is the cloud provider it's not really useful to have multiple definitions.

auto_update = true
dynamic_config = {
repository_uuid = data.stacklet_repository.policies.uuid
Copy link

Choose a reason for hiding this comment

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

@albertodonato Is the UUID auto-generated/derived by the provider? In repository.md it's listed as an optional parameter and obviously not defined in lines 24-26 above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the UUID is the identifier of the API entity which is generated by platform when it's created (this is true for anything in platform, repositories, account groups, policy collections,...).

The reason it's marked as optional in the repository data source is that you can define a data source by passing either the ID or the URL, so those parameters need to be marked as such or terraform will complain when one of them is not provided.

Copy link
Contributor

@fwereade fwereade left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@albertodonato albertodonato merged commit f4a93e7 into main Jun 2, 2025
6 checks passed
@albertodonato albertodonato deleted the ack/dynamic-policy-collections branch June 2, 2025 08:19
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.

3 participants