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_is_vpc Validate Schema for name input field #1090

Closed
IAmFrench opened this issue Feb 11, 2020 · 0 comments
Closed

ibm_is_vpc Validate Schema for name input field #1090

IAmFrench opened this issue Feb 11, 2020 · 0 comments

Comments

@IAmFrench
Copy link

IAmFrench commented Feb 11, 2020

Terraform Version

λ terraform -v
Terraform v0.12.20
+ provider.ibm v1.2.0

Affected Resource(s)

  • ibm_is_vpc

Terraform Configuration Files

resource "ibm_is_vpc" "test" {
  name = "test-vpc"
}

resource "ibm_is_vpc" "test-1" {
  name = "name_with_dashes_failed"
}

resource "ibm_is_vpc" "test-2" {
  name = "Hi"
}

resource "ibm_is_vpc" "test-3" {
  name = "hello-"
}

Expected Behavior

Display an error message on the plan phase like it's displayed on the ibm cloud website
image

image

image

image

Actual Behavior

The script pass the plan phase and produce the following error on the apply phase

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

ibm_is_vpc.test-3: Creating...
ibm_is_vpc.test-1: Creating...
ibm_is_vpc.test: Creating...
ibm_is_vpc.test-2: Creating...
ibm_is_vpc.test: Still creating... [10s elapsed]
ibm_is_vpc.test: Creation complete after 14s [id=r006-e9345eaf-c0e3-4392-af55-1a68cb6a4ba3]

Error: {"errors":[{"code":"bad_field","message":"Invalid json payload provided","target":{"name":"vpcs.vpcs.name","type":"field"}}],"trace":"3d3aad04-ec1d-4306-9c4e-280c7ca54a10"}

  on 01_VPC_IBM_main.tf line 16, in resource "ibm_is_vpc" "test-1":
  16: resource "ibm_is_vpc" "test-1" {



Error: {"errors":[{"code":"bad_field","message":"Invalid json payload provided","target":{"name":"vpcs.vpcs.name","type":"field"}}],"trace":"84298322-c79a-4215-a21c-0756a6d677d8"}

  on 01_VPC_IBM_main.tf line 21, in resource "ibm_is_vpc" "test-2":
  21: resource "ibm_is_vpc" "test-2" {



Error: {"errors":[{"code":"bad_field","message":"Invalid json payload provided","target":{"name":"vpcs.vpcs.name","type":"field"}}],"trace":"6b458d15-ba4a-407d-88cc-c28601b79cc9"}

  on main.tf line 26, in resource "ibm_is_vpc" "test-3":
  26: resource "ibm_is_vpc" "test-3" {

Steps to Reproduce

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

  1. terraform plan
  2. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

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