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_cis_domain_settings does not allow for Standard plans #1623

Closed
bstoutenburgh opened this issue Jul 1, 2020 · 0 comments
Closed

ibm_cis_domain_settings does not allow for Standard plans #1623

bstoutenburgh opened this issue Jul 1, 2020 · 0 comments

Comments

@bstoutenburgh
Copy link

Terraform Version

ben@icarus:~/tmp/parazoid_terraform$ terraform -v
Terraform v0.12.28
+ provider.ibm v1.8.1

Affected Resource(s)

  • ibm_cis_domain_settings

Terraform Configuration Files

resource "ibm_resource_group" "default" {
  name = "Default"
}

resource "ibm_cis" "tms" {
  name              = "Trained Monkey Studios"
  location          = "global"
  plan              = "standard"
  resource_group_id = ibm_resource_group.default.id
}

resource "ibm_cis_domain" "tms" {
  cis_id = ibm_cis.tms.id
  domain = "trainedmonkeystudios.com"
}

resource "ibm_cis_domain_settings" "tms" {
  cis_id    = ibm_cis.tms.id
  domain_id = ibm_cis_domain.tms.id
}

Debug Output

https://gist.github.com/maristgeek/08e12be78af575d55bb557c89be75ad7

Expected Behavior

A successful plan run with "No changes. Infrastructure is up-to-date."

Actual Behavior

A failed plan because the provider does not handle 405 responses from the CIS API.

Error: Request failed with status code: 405, ServerErrorResponse: {"trace": "2a3abc35-1a99-4f2e-96bf-b9d5e9d9ff5e", "errors": [{"code": 405, "message": "This action is unavailable for the current plan: Standard"}]}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create an instance using a standard plan, a basic domain and domain settings with defaults using a provider before 1.7.1 (1.5.2 used in this test)
  2. Bump the provider version to 1.8.1
  3. terraform init && terraform plan

Important Factoids

The way the provider checks for domain settings blindly iterates through the list of known settings but some settings are only available to Enterprise plans, trying to even check for them for a domain in a Standard CIS will get an HTTP 405 response.

Ideally the provider should handle HTTP 405 and move on, but these settings currently will cause this problem for Standard plan users:

  • origin_error_page_pass_thru
  • prefetch_preload
  • response_buffering
  • tls_client_auth
  • true_client_ip_header

References

kavya498 added a commit to kavya498/terraform-provider-ibm that referenced this issue Jul 2, 2020
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

No branches or pull requests

1 participant