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_network_acl Validate name input field of ACL Rules #1262

Closed
sean-freeman opened this issue Apr 2, 2020 · 0 comments
Closed

ibm_is_network_acl Validate name input field of ACL Rules #1262

sean-freeman opened this issue Apr 2, 2020 · 0 comments
Assignees

Comments

@sean-freeman
Copy link

Terraform Version

terraform -v
Terraform v0.12.24
+ provider.ibm v1.2.6
+ provider.null v2.1.2
+ provider.tls v2.1.1

Affected Resource(s)

Please list the resources as a list, for example:

  • ibm_is_network_acl

Terraform Configuration Files

resource "ibm_is_network_acl" "vpc_subnet_acl" {
  name = "vpc-subnet-acl"
  vpc  = ibm_is_vpc.vpc.id

  rules {
    name        = "icmp_outbound"
    action      = "allow"
    source      = "0.0.0.0/0"
    destination = "0.0.0.0/0"
    direction   = "outbound"
    icmp {
      code = 1
      type = 1
    }

Expected Behavior

Error: "name" ("icmp_outbound") of "rules" on resource "ibm_is_network_acl" should contain only lowercase alphanumeric,dash and should begin with lowercase character

Actual Behavior

ibm_is_network_acl.vpc_subnet_acl: Destroying... [id=xxxx-xxxx]
ibm_is_network_acl.vpc_subnet_acl: Destruction complete after 1s
ibm_is_network_acl.vpc_subnet_acl: Creating...

Error: {"errors":[{"code":"bad_field","message":"Invalid json payload provided","target":{"name":"name","type":"field"}}],"trace":"xxxx-xxxx"}

  on vsi.tf line 127, in resource "ibm_is_network_acl" "vpc_subnet_acl":
 127: resource "ibm_is_network_acl" "vpc_subnet_acl" {

Steps to Reproduce

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

  1. terraform apply

Important Factoids

Fixed by replacing underscore _ with dash -, as performed in all other names, but error message does not suggest where to perform fix to Terraform Configuration File

References

Similar to other issue regarding validation of name input fields:

VaishnaviGopal added a commit to VaishnaviGopal/terraform-provider-ibm that referenced this issue Aug 14, 2020
@hkantare hkantare closed this as completed Jan 5, 2021
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

3 participants