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

ibm_cloud_shell_account_settings modify issue #3247

Closed
jpmonge86 opened this issue Oct 22, 2021 · 0 comments · Fixed by #3256
Closed

ibm_cloud_shell_account_settings modify issue #3247

jpmonge86 opened this issue Oct 22, 2021 · 0 comments · Fixed by #3256
Labels
service/IBM Cloud Shell Issues related to Cloud Shell

Comments

@jpmonge86
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

$ terraform -v
Terraform v1.0.9
on darwin_amd64
+ provider registry.terraform.io/eiqops/restapi v1.15.1
+ provider registry.terraform.io/ibm-cloud/ibm v1.34.0

Affected Resource(s)

  • ibm_cloud_shell_account_settings

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
  account_id = data.ibm_iam_account_settings.iam_account_settings.account_id
  rev = data.ibm_cloud_shell_account_settings.cloud_shell_account_settings.rev
  default_enable_new_features = var.shell_settings_enabled == true ? true : false
  default_enable_new_regions = var.shell_settings_enabled == true ? true : false
  features {
      enabled = var.shell_settings_enabled == true ? true : false
      key = "server.file_manager"
  }
  features {
      enabled = var.shell_settings_enabled == true ? true : false
      key = "server.web_preview"
  }
  regions {
      enabled = var.shell_settings_enabled == true ? true : false
      key = "eu-de"
  }
  regions {
      enabled = var.shell_settings_enabled == true ? true : false
      key = "jp-tok"
  }
  regions {
      enabled = var.shell_settings_enabled == true ? true : false
      key = "us-south"
  }
  enabled = var.shell_settings_enabled
}

Debug Output

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.iam-account-settings.ibm_cloud_shell_account_settings.cloud_shell_account_settings will be updated in-place
  ~ resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
      ~ default_enable_new_features = false -> true
      ~ default_enable_new_regions  = false -> true
      ~ enabled                     = false -> true
        id                          = "ac-5a5b9393966873091a0d13cd50dc40ad"
        # (5 unchanged attributes hidden)

      ~ features {
          ~ enabled = false -> true
            # (1 unchanged attribute hidden)
        }
      ~ features {
          ~ enabled = false -> true
            # (1 unchanged attribute hidden)
        }

      ~ regions {
          ~ enabled = false -> true
            # (1 unchanged attribute hidden)
        }
      ~ regions {
          ~ enabled = false -> true
            # (1 unchanged attribute hidden)
        }
      ~ regions {
          ~ enabled = false -> true
            # (1 unchanged attribute hidden)
        }
    }

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

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

module.iam-account-settings.ibm_cloud_shell_account_settings.cloud_shell_account_settings: Modifying... [id=ac-5a5b9393966873091a0d13cd50dc40ad]
╷
│ Error: The given id ac-5a5b9393966873091a0d13cd50dc40ad does not contain / please check documentation on how to provider id during import command
│
│   with module.iam-account-settings.ibm_cloud_shell_account_settings.cloud_shell_account_settings,
│   on ../../main.tf line 41, in resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings":
│   41: resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {

Expected Behavior

Resource change/update to be successful.

Actual Behavior

Terraform change execution fails

Steps to Reproduce

  1. terraform apply > this works ok the first time
  2. Update attributes from false to true or the other way around.
  3. terraform apply > this does not work, the updates are not made.
    4 terraform destroy > this works ok
@kavya498 kavya498 added the service/IBM Cloud Shell Issues related to Cloud Shell label Oct 25, 2021
kavya498 added a commit to kavya498/terraform-provider-ibm that referenced this issue Oct 26, 2021
kavya498 added a commit to kavya498/terraform-provider-ibm that referenced this issue Oct 26, 2021
hkantare pushed a commit that referenced this issue Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/IBM Cloud Shell Issues related to Cloud Shell
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants