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_scc_posture_scope does not allow for blank-space in description #3733

Open
srmamit opened this issue Apr 20, 2022 · 1 comment
Open

ibm_scc_posture_scope does not allow for blank-space in description #3733

srmamit opened this issue Apr 20, 2022 · 1 comment
Labels
service/SCC Issues related to SCC

Comments

@srmamit
Copy link

srmamit commented Apr 20, 2022

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

Affected Resource(s)

  • ibm_scc_posture_scope

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_scc_account_settings" "ibm_scc_account_settings_instance" {
  location {
    location_id = "us"
  }
}

resource "ibm_scc_posture_collector" "collectors" {
  description = "sample collector"
  is_public   = true
  managed_by  = var.collector_management
  name        = "sample-collector-demo"
  passphrase  = ""
}

# Credentials for scope. Scope has a collector associated with it and
resource "ibm_scc_posture_credential" "credentials" {
  description = "This credential is used for testing."
  display_fields {
    ibm_api_key = var.ibmcloud_api_key
  }
  enabled = true
  group {
    id         = "0"
    passphrase = ""
  }
  name    = "sample-credentials-demo"
  purpose = "discovery_fact_collection_remediation"
  type    = "ibm_cloud"
}

resource "ibm_scc_posture_scope" "scc_scope" {
  collector_ids   = ["${ibm_scc_posture_collector.collectors.id}"]
  credential_id   = ibm_scc_posture_credential.credentials.id
  credential_type = "ibm"
  description     = "IBM schema-for-configuration-collection"
  name            = "sample-scope-demo"
}

Debug Output

│ Error: "description" ("IBM schema-for-configuration-collection") should match regexp ^[a-zA-Z0-9-\\.,_\\s]*$ 
│ 
│   with ibm_scc_posture_scope.scc_scope,
│   on main.tf line 35, in resource "ibm_scc_posture_scope" "scc_scope":
│   35:   description     = "IBM schema-for-configuration-collection"
│ 

Panic Output

Expected Behavior

terraform plan output to be generated or terraform apply to go through.

Actual Behavior

Failure to produce plan output or apply terraform configuration because description contains blank-space.

Steps to Reproduce

  1. terraform apply or terraform plan -out=".terraform/sampleplanoutput001"

Important Factoids

References

  1. https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/scc_posture_scope#description
  • #0000
@github-actions github-actions bot added the service/SCC Issues related to SCC label Apr 20, 2022
@archanaponnada
Copy link
Contributor

Code is merged. Fix will be available in next terraform version release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/SCC Issues related to SCC
Projects
None yet
Development

No branches or pull requests

2 participants