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

not able to use rotateWhenChanged #81

Open
jankaacc opened this issue Oct 30, 2023 · 0 comments
Open

not able to use rotateWhenChanged #81

jankaacc opened this issue Oct 30, 2023 · 0 comments
Labels
enhancement New feature or request is:triaged

Comments

@jankaacc
Copy link

jankaacc commented Oct 30, 2023

What problem are you facing?

I would like to automatically rotate the credentials for app in Azure for that I am creating appilcation
and Password MR for it like:

apiVersion: applications.azuread.upbound.io/v1beta1
kind: Password
metadata:
  name: password-sp
spec:
  forProvider:
    applicationObjectIdSelector:
      matchControllerRef: true
    rotateWhenChanged:
      rotateEveryMonth: "2024-01"

rotateWhenChanged should update the credentials whenever value of one of key values pairs will change.
When I am updating value to:

    rotateWhenChanged:
      rotateEveryMonth: "2024-02"

terraform running under the hood is destroying the resource and recreates. This results in error like

 message: 'observe failed: cannot run plan: plan failed: Instance cannot be destroyed:
        Resource azuread_application_password.scc-dev-profile-sp-r2lxl-nvgcs has lifecycle.prevent_destroy
        set, but the plan calls for this resource to be destroyed. To avoid this error
        and continue with the plan, either disable lifecycle.prevent_destroy or reduce
        the scope of the plan using the -target flag.'
      reason: ReconcileError
      status: "False"
      type: Synced

How could Official Azuread Provider help solve your problem?

Is it possible to make lifecycle configurable so we could do like:

apiVersion: applications.azuread.upbound.io/v1beta1
kind: Password
metadata:
  name: password-sp
spec:
  deletionPolicy: Orphan
  forProvider:
    applicationObjectIdSelector:
      matchControllerRef: true
    rotateWhenChanged:
      rotateEveryMonth: "2024-01"
    lifecycle:
      preventDestroy: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request is:triaged
Projects
None yet
Development

No branches or pull requests

2 participants