Skip to content

Don't Propagate Attributes on Disabled Instance Policy #125

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

Merged
merged 1 commit into from
May 13, 2024

Conversation

william8siew
Copy link
Contributor

@william8siew william8siew commented May 13, 2024

The Key Protect instance policy API does not allow attributes to be specified when disabling KeyCreateImportAccess and AllowedIP policies. Currently, there is no way to omit attributes when calling SetInstancePolicies(), thus any call to disable these policies fails with error INVALID_FIELD_ERR: The field attributes must be: provided only if policy is being enabled.

This PR makes it so attributes are ignored when disabling KeyCreateImportAccess and AllowedIP policies (no attribute object is sent during the disable per API's input requirement).

Related to IBM-Cloud/terraform-provider-ibm#5342

@stephaniegalang stephaniegalang changed the title tf bugfix: instpol attrib enabled only Don't Propagate Attributes on Disabled Instance Policy May 13, 2024
Signed-off-by: stephaniegalang <[email protected]>
@stephaniegalang stephaniegalang force-pushed the sgal-disabled-pol-attr branch from 11a2e97 to d5cb05d Compare May 13, 2024 15:25
Copy link
Collaborator

@stephaniegalang stephaniegalang left a comment

Choose a reason for hiding this comment

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

Tested via Terraform provider, disablement no longer returns INVALID_FIELD_ERR: The field attributes must be: provided only if policy is being enabled error

@stephaniegalang stephaniegalang merged commit 9d7123f into IBM:master May 13, 2024
MDarmawan pushed a commit to MDarmawan/keyprotect-go-client that referenced this pull request May 30, 2024
Signed-off-by: stephaniegalang <[email protected]>
Co-authored-by: stephaniegalang <[email protected]>
Signed-off-by: Michael Darmawan <[email protected]>
stephaniegalang pushed a commit that referenced this pull request Jun 3, 2024
* rename keyring path for conflicts

Signed-off-by: Michael Darmawan <[email protected]>

* initial implementation of adapters and certs

Signed-off-by: Michael Darmawan <[email protected]>

* add kmip objects, fix some stuff

Signed-off-by: Michael Darmawan <[email protected]>

* fix structs

Signed-off-by: Michael Darmawan <[email protected]>

* unit tests, and some fixes

Signed-off-by: Michael Darmawan <[email protected]>

* remove import cycle

Signed-off-by: Michael Darmawan <[email protected]>

* redo mocks

Signed-off-by: Michael Darmawan <[email protected]>

* add mockauth

Signed-off-by: Michael Darmawan <[email protected]>

* fix mobk paths

Signed-off-by: Michael Darmawan <[email protected]>

* fix marshalling

Signed-off-by: Michael Darmawan <[email protected]>

* fix delete tests

Signed-off-by: Michael Darmawan <[email protected]>

* remove old kmip profile data

Signed-off-by: Michael Darmawan <[email protected]>

* address PR comments

Signed-off-by: Michael Darmawan <[email protected]>

* finish address comments

Signed-off-by: Michael Darmawan <[email protected]>

* hardcode mock responses, refactor kmip collection metadata

Signed-off-by: Michael Darmawan <[email protected]>

* fix tests?

Signed-off-by: Michael Darmawan <[email protected]>

* fix typo

Signed-off-by: Michael Darmawan <[email protected]>

* add object filter, overhaul list options

Signed-off-by: Michael Darmawan <[email protected]>

* enhance tests

Signed-off-by: Michael Darmawan <[email protected]>

* unexport path variables, add comments

Signed-off-by: Michael Darmawan <[email protected]>

* sdk fixes

Signed-off-by: Michael Darmawan <[email protected]>

* remove crk from adapter list

Signed-off-by: Michael Darmawan <[email protected]>

* add crkID filter

Signed-off-by: Michael Darmawan <[email protected]>

* feat(build): Update travis distribution in CI file (#123)

* change travis dist

Signed-off-by: Michael Darmawan <[email protected]>

* add npm install check to travis

Signed-off-by: Michael Darmawan <[email protected]>

* real fix

Signed-off-by: Michael Darmawan <[email protected]>

* change python version

Signed-off-by: Michael Darmawan <[email protected]>

* remove pyenv, let it use default python version of 3.10

Signed-off-by: Michael Darmawan <[email protected]>

---------

Signed-off-by: Michael Darmawan <[email protected]>

* add info to contributing about the semantic release (#124)

Signed-off-by: Michael Darmawan <[email protected]>

* instpol attrib enabled only (#125)

Signed-off-by: stephaniegalang <[email protected]>
Co-authored-by: stephaniegalang <[email protected]>
Signed-off-by: Michael Darmawan <[email protected]>

* Allow instance policy attributes to be optionally specified (#126)

* allow attributes to be specified optionally

Signed-off-by: stephaniegalang <[email protected]>

* propogate attributes, ignoring disable

Signed-off-by: stephaniegalang <[email protected]>

---------

Signed-off-by: stephaniegalang <[email protected]>
Co-authored-by: stephaniegalang <[email protected]>
Signed-off-by: Michael Darmawan <[email protected]>

* fix missed merge artifacts

Signed-off-by: Michael Darmawan <[email protected]>

---------

Signed-off-by: Michael Darmawan <[email protected]>
Signed-off-by: stephaniegalang <[email protected]>
Co-authored-by: William Siew <[email protected]>
Co-authored-by: stephaniegalang <[email protected]>
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