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

Add provider credentials validation #813

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Add provider credentials validation #813

merged 1 commit into from
Jan 27, 2021

Conversation

outcatcher
Copy link
Contributor

@outcatcher outcatcher commented Jan 27, 2021

Summary of the Pull Request

Fix #801

Add provider validation tests

Minor refactoring

PR Checklist

Acceptance Steps Performed

To make sure everything is still working:

=== RUN   TestAccObsBucket_basic
--- PASS: TestAccObsBucket_basic (19.80s)

=== RUN   TestAccOTCVpcV1_basic
--- PASS: TestAccOTCVpcV1_basic (30.49s)
PASS

With built binary:

$ OS_CLOUD=terraform tf apply
Warning: Provider development overrides are in effect

The following provider development overrides are set in the CLI configuration:
 - opentelekomcloud/opentelekomcloud in /home/akachuri/go/bin

The behavior may therefore not match any released version of the provider and
applying changes may cause the state to become incompatible with published
releases.


An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # opentelekomcloud_obs_bucket.bucket_test will be created
  + resource "opentelekomcloud_obs_bucket" "bucket_test" {
      + acl                = "private"
      + bucket             = "obs-akachuri-test"
      + bucket_domain_name = (known after apply)
      + force_destroy      = false
      + id                 = (known after apply)
      + region             = (known after apply)
      + storage_class      = "STANDARD"
      + versioning         = false
    }

  # opentelekomcloud_vpc_v1.vpc will be created
  + resource "opentelekomcloud_vpc_v1" "vpc" {
      + cidr   = "192.168.0.0/16"
      + id     = (known after apply)
      + name   = "vpc-akachuri"
      + region = (known after apply)
      + shared = (known after apply)
      + status = (known after apply)
    }

Plan: 2 to add, 0 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

opentelekomcloud_vpc_v1.vpc: Creating...
opentelekomcloud_obs_bucket.bucket_test: Creating...
opentelekomcloud_obs_bucket.bucket_test: Creation complete after 1s [id=obs-akachuri-test]
opentelekomcloud_vpc_v1.vpc: Creation complete after 8s [id=e7de5051-8165-4a25-a5bc-f172847d09c8]

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

With binary and project ID/Name not set:

$ tf plan

Error: no project name/id or delegated project is provided

  on versions.tf line 11, in provider "opentelekomcloud":
  11: provider opentelekomcloud {


CLI config:

provider_installation {
  dev_overrides {
    "opentelekomcloud/opentelekomcloud" = "/home/akachuri/go/bin"
  }
  direct {}
}

@outcatcher outcatcher requested review from a team, lego963 and anton-sidelnikov and removed request for a team January 27, 2021 13:35
otc-zuul[bot]
otc-zuul bot previously approved these changes Jan 27, 2021
@outcatcher outcatcher marked this pull request as ready for review January 27, 2021 14:03
Add provider validation tests

Minor refactoring
@outcatcher

This comment has been minimized.

@lego963 lego963 added the gate Merge PR label Jan 27, 2021
@otc-zuul
Copy link

otc-zuul bot commented Jan 27, 2021

Build succeeded.

@otc-zuul otc-zuul bot merged commit 6f2d16b into master Jan 27, 2021
@otc-zuul otc-zuul bot deleted the provider-validate branch January 27, 2021 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Merge PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add provider auth validation
2 participants