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

nsxt_policy_context_profile does not support user created FQDN domain_name values #698

Closed
tullydwyer opened this issue Dec 16, 2021 · 4 comments · Fixed by #840
Closed
Labels
enhancement Enhancement

Comments

@tullydwyer
Copy link

tullydwyer commented Dec 16, 2021

Describe the bug

Hi there,

We are trying to use nsxt_policy_context_profile to create Context Profiles containing 'user' created FQDN's for example bob.bob.com .

When we try to use 'user' created FQDN's we get the following error:
Error: Attribute values [bob.bob.com] are not valid for attribute type domain_name

We are able to use the 'user' created FQDN's via the web console.

Reproduce steps:

  1. Create the user FQDN in the web console.
    image
  2. Try to create a Context Profile referencing the user FQDN.
    Terraform:
resource "nsxt_policy_context_profile" "fails" {
  display_name = "fails"
  description  = "fails"
  domain_name {
    value       = [
      "bob.bob.com"
    ]
  }
}
  1. Error:
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # nsxt_policy_context_profile.fails will be created
  + resource "nsxt_policy_context_profile" "fails" {
      + description  = "fails"
      + display_name = "fails"
      + id           = (known after apply)
      + nsx_id       = (known after apply)
      + path         = (known after apply)
      + revision     = (known after apply)

      + domain_name {
          + value = [
              + "bob.bob.com",
            ]
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
nsxt_policy_context_profile.fails: Creating...
╷
│ Error: Attribute values [bob.bob.com] are not valid for attribute type domain_name
│
│   with nsxt_policy_context_profile.fails,
│   on main.tf line 18, in resource "nsxt_policy_context_profile" "fails":
│   18: resource "nsxt_policy_context_profile" "fails" {
│
╵

Expected behaviour

Create the Context Profile same as the web console:
image

Thanks,
Tully

Additional context

nsxt = {
source = "vmware/nsxt"
version = "3.2.5"
}

@jorgemarti
Copy link

Would be really appreciated.

@annakhm annakhm added enhancement Enhancement and removed bug Bug labels May 18, 2022
@tullydwyer
Copy link
Author

Hi there @annakhm, I would consider this a bug as the provider does not behave the same as the NSX-T web console?

@tenthirtyam
Copy link
Collaborator

I would view this as a bug as well.

Based on the issue report, I would expect the acceptance test cases that use testAccNsxtPolicyContextProfileAttributeDomainNameTemplate to fail.

func testAccNsxtPolicyContextProfileAttributeDomainNameTemplate() string {
return `
domain_name {
value = ["*-myfiles.sharepoint.com"]
}`
}

Ryan Johnson
Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

@tullydwyer
Copy link
Author

*-myfiles.sharepoint.com is a 'System' created FQDN which does work with the nsxt_policy_context_profile resource

image

ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Feb 23, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Feb 23, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Feb 26, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Feb 26, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Feb 28, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Mar 1, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
ksamoray added a commit to ksamoray/terraform-provider-nsxt that referenced this issue Mar 2, 2023
Allow usage of custom attributes in context profile objects.

Fixes: vmware#698, vmware#839

Signed-off-by: Kobi Samoray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants