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

[AV-64976] User refresh state for users deleted from UI #59

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

nidhi07kumar
Copy link
Contributor

@nidhi07kumar nidhi07kumar commented Oct 18, 2023

https://couchbasecloud.atlassian.net/browse/AV-64976

  1. Remove the resource from state when the user is deleted from UI.
  2. Upgrades terraform-plugin-framework to 1.4.1
  3. Updated generated docs files.
terraform plan 
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - hashicorp.com/couchabasecloud/capella in /Users/nidhi.kumar/go/bin
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published
│ releases.
╵
data.capella_users.existing_users: Reading...
capella_user.new_user: Refreshing state... [id=165233df-c490-4212-b9ca-a030551b8d70]
data.capella_users.existing_users: Read complete after 2s

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the last "terraform apply" which may have affected this plan:

  # capella_user.new_user has been deleted
  - resource "capella_user" "new_user" {
      - audit                = {
          - created_at  = "2023-10-13 10:54:22.723953525 +0000 UTC" -> null
          - created_by  = "165233df-c490-4212-b9ca-a030551b8d70" -> null
          - modified_at = "2023-10-13 10:54:22.723953525 +0000 UTC" -> null
          - modified_by = "165233df-c490-4212-b9ca-a030551b8d70" -> null
          - version     = 1 -> null
        } -> null
      - email                = "[email protected]" -> null
      - enable_notifications = false -> null
      - expires_at           = "2024-01-11T10:54:22.723954493Z" -> null
      - id                   = "165233df-c490-4212-b9ca-a030551b8d70" -> null
      - inactive             = true -> null
      - name                 = "John Doe" -> null
      - organization_id      = "6af08c0a-8cab-4c1c-b257-b521575c16d0" -> null
      - organization_roles   = [
          - "organizationMember",
        ] -> null
      - resources            = [
          - {
              - id    = "f14134f2-7943-4e7b-b2c5-fc2071728b6e" -> null
              - roles = [
                  - "projectViewer",
                ] -> null
              - type  = "project" -> null
            },
          - {
              - id    = "f14134f2-7943-4e7b-b2c5-fc2071728b6e" -> null
              - roles = [
                  - "projectDataReaderWriter",
                ] -> null
              - type  = "project" -> null
            },
        ] -> null
      - status               = "not-verified" -> null
    }


Unless you have made equivalent changes to your configuration, or ignored the relevant attributes using ignore_changes, the following plan may include actions to
undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # capella_user.new_user will be created
  + resource "capella_user" "new_user" {
      + audit                = (known after apply)
      + email                = "[email protected]"
      + enable_notifications = (known after apply)
      + expires_at           = (known after apply)
      + id                   = (known after apply)
      + inactive             = (known after apply)
      + last_login           = (known after apply)
      + name                 = "John Doe"
      + organization_id      = "6af08c0a-8cab-4c1c-b257-b521575c16d0"
      + organization_roles   = [
          + "organizationMember",
        ]
      + region               = (known after apply)
      + resources            = [
          + {
              + id    = "f14134f2-7943-4e7b-b2c5-fc2071728b6e"
              + roles = [
                  + "projectViewer",
                ]
              + type  = "project"
            },
          + {
              + id    = "f14134f2-7943-4e7b-b2c5-fc2071728b6e"
              + roles = [
                  + "projectDataReaderWriter",
                ]
              + type  = "project"
            },
        ]
      + status               = (known after apply)
      + time_zone            = (known after apply)
    }

Plan: 1 to add, 0 to change, 0 to destroy.

@nidhi07kumar nidhi07kumar self-assigned this Oct 18, 2023
@nidhi07kumar nidhi07kumar merged commit 6e22145 into main Oct 18, 2023
@Talina06 Talina06 deleted the AV-64976_user_deleted_from_UI branch December 11, 2023 18:26
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.

2 participants