Skip to content

network_acl: fix state not optional#399

Open
positiveEV wants to merge 1 commit intolxc:mainfrom
positiveEV:main
Open

network_acl: fix state not optional#399
positiveEV wants to merge 1 commit intolxc:mainfrom
positiveEV:main

Conversation

@positiveEV
Copy link
Contributor

This PR makes the state attribute in network_acl optional, as documented at

* `state` - *Optional* - State of the rule (enabled, disabled or logged), defaulting to enabled if not specified

Copy link
Member

@maveonair maveonair left a comment

Choose a reason for hiding this comment

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

@positiveEV please sign off your commit, and have a look at the tests which are failing due to this change.

Signed-off-by: Etienne Guillot <etienne.guillot@cosium.com>
@positiveEV
Copy link
Contributor Author

I found the issue.
When tofu is planning, #385 sets null attributes as empty strings. This triggers a bug that I found in the plugin framework (hashicorp/terraform-plugin-framework#1256) when using default values for attributes in nested blocks, which is why the state is set to its default value instead of the configured one.

A workaround could be to set all attributes that we do not use in the egress and ingress blocks as empty string, so we would not encounter hashicorp/terraform-plugin-framework#1256. But it is obviously not desirable.

It means that we should wait for #385 to be resolved before being able to merge this PR.
So for now, I think it is probably best to just fix the doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants