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

Update test to run in schematics and use private provider visability #235

Open
ocofaigh opened this issue Nov 29, 2024 · 0 comments
Open
Assignees

Comments

@ocofaigh
Copy link
Member

ocofaigh commented Nov 29, 2024

This DA will no longer deploy since the provider_visability now defaults to private. It fails with:

2024/11/28 18:59:46 Terraform plan | Error: Get "https://private.resource-controller.cloud.ibm.com/v1/resource_keys": dial tcp: lookup private.resource-controller.cloud.ibm.com on 172.21.0.10:53: no such host
 2024/11/28 18:59:46 Terraform plan | 
 2024/11/28 18:59:46 Terraform plan |   with data.ibm_resource_key.elastic_credentials[0],
 2024/11/28 18:59:46 Terraform plan |   on main.tf line 190, in data "ibm_resource_key" "elastic_credentials":
 2024/11/28 18:59:46 Terraform plan |  190: data "ibm_resource_key" "elastic_credentials" {
 2024/11/28 18:59:46 Terraform plan | 
 2024/11/28 18:59:46 Terraform plan | ---
 2024/11/28 18:59:46 Terraform plan | id: terraform-b22cb499
 2024/11/28 18:59:46 Terraform plan | summary: 'Get
 2024/11/28 18:59:46 Terraform plan | "https://private.resource-controller.cloud.ibm.com/v1/resource_keys":
 2024/11/28 18:59:46 Terraform plan |   dial tcp: lookup private.resource-controller.cloud.ibm.com on 172.21.0.10:53: no
 2024/11/28 18:59:46 Terraform plan |   such host'
 2024/11/28 18:59:46 Terraform plan | severity: error
 2024/11/28 18:59:46 Terraform plan | resource: (Data) ibm_resource_key
 2024/11/28 18:59:46 Terraform plan | operation: read
 2024/11/28 18:59:46 Terraform plan | component:
 2024/11/28 18:59:46 Terraform plan |   name: github.com/IBM-Cloud/terraform-provider-ibm
 2024/11/28 18:59:46 Terraform plan |   version: 1.71.2
 2024/11/28 18:59:46 Terraform plan | ---

I have created a provider issue to track this: IBM-Cloud/terraform-provider-ibm#5828

However the tests in this module should of caught this, but it seems all the tests are overriding the default back to provider_visability = public so hence we didnt catch the error.
We need at least 1 test that keeps this as private - meaning that test will need to run in schematics.

We also need to ensure we have a test that would actually catch this use case. It looks like to reproduce, a value needs to be passed for elastic_instance_crn.

As a temporary workaround, the DA has been reverted to use public in #234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants