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_instance_settings is always using us-south SCC endpoint #5131

Closed
ocofaigh opened this issue Feb 13, 2024 · 1 comment · Fixed by #5135
Closed

ibm_scc_instance_settings is always using us-south SCC endpoint #5131

ocofaigh opened this issue Feb 13, 2024 · 1 comment · Fixed by #5135
Labels
service/SCC Issues related to SCC

Comments

@ocofaigh
Copy link

The ibm_scc_instance_settings will fail with below error if you attempt with a region that is not us-south. I tried with eu-es and when looking at trace logs, I can see its trying to hit the us-south endpoint, even though my provider config is set up like so:

provider "ibm" {
  ibmcloud_api_key = var.ibmcloud_api_key
  region           = "eu-es"
}

Error:

2024-02-13T17:19:34.228Z [INFO]  provider.terraform-provider-ibm_v1.62.0: 2024/02/13 17:19:34 [DEBUG] PATCH https://us-south.compliance.cloud.ibm.com/instances/f75c6a32-5310-44d5-b4b8-1cf358aa5873/v3/settings: timestamp=2024-02-13T17:19:34.228Z
2024-02-13T17:19:35.079Z [INFO]  provider.terraform-provider-ibm_v1.62.0: 2024/02/13 17:19:35 [Debug] Response:
HTTP/2.0 404 Not Found
Cache-Control: no-store
Cf-Cache-Status: DYNAMIC
Cf-Ray: 854ebcb0de6ebb06-MXP
Content-Type: application/json; charset=utf-8
Date: Tue, 13 Feb 2024 17:19:35 GMT
Server: cloudflare
Strict-Transport-Security: max-age=31536000; includeSubDomains
Transaction-Id: e2d78bad-a4c6-4dd9-8c47-ffe11088fcde
X-Content-Type-Options: nosniff
X-Correlation-Id: e2d78bad-a4c6-4dd9-8c47-ffe11088fcde
X-Envoy-Upstream-Service-Time: 27
X-Request-Id: c3eaf1cb-f54b-4fcd-bda6-78f9da654e2c

{"errors":[{"code":"not_found","message":"The requested resource was not found","more_info":"https://cloud.ibm.com/apidocs/security-compliance-admin"}],"status_code":404,"trace":"e2d78bad-a4c6-4dd9-8c47-ffe11088fcde"}: timestamp=2024-02-13T17:19:35.078Z

The SCC team have confirmed as a workaround you can set export IBMCLOUD_SCC_API_ENDPOINT=https://eu-es.compliance.cloud.ibm.com/ however this should not be requied, as terraform should be using the value passed for region provider config.

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

tf 1.6.0
ibm provider 1.62.0

Affected Resource(s)

  • ibm_scc_instance_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.

Run https://github.com/terraform-ibm-modules/terraform-ibm-scc/tree/main/examples/basic but target it to any other region that is not us-south

Debug Output

scc-trace.log

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added the service/SCC Issues related to SCC label Feb 13, 2024
@tyao117
Copy link
Contributor

tyao117 commented Feb 14, 2024

The source of the problem is the scc-go-sdk did not support that region: link. I am currently creating a PR to support that region.

Once a version is released, the terraform provider needs to be updated to support the newest scc-go-sdk version which will include the region "eu-es"

ocofaigh added a commit to terraform-ibm-modules/terraform-ibm-scc that referenced this issue Mar 11, 2024
ocofaigh added a commit to terraform-ibm-modules/terraform-ibm-scc-da that referenced this issue Mar 11, 2024
…default value of `true` to help ensure a unique bucket name gets created.<br>* Updated DA to use IBM provider version 1.63.0 which has a fix for known [provider bug](IBM-Cloud/terraform-provider-ibm#5131) (#18)
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

Successfully merging a pull request may close this issue.

2 participants