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

network_security_group_id missing #195

Open
FawenYo opened this issue Jul 29, 2022 · 6 comments
Open

network_security_group_id missing #195

FawenYo opened this issue Jul 29, 2022 · 6 comments

Comments

@FawenYo
Copy link

FawenYo commented Jul 29, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureStack Provider) Version

Terraform v0.13.3
Azurestack v1.0.0

Affected Resource(s)

  • resource "azurestack_network_interface

Description

network_security_group_id argument is missing in Azurestack 1.0.0 with no documents.

Output

Error: Unsupported argument

  on modules/bastion/main.tf line 63, in resource "azurestack_network_interface" "bastion":
  63:   network_security_group_id = azurestack_network_security_group.bastion_ssh.id

An argument named "network_security_group_id" is not expected here.

Steps to Reproduce

  1. terraform apply
@FawenYo FawenYo changed the title 123 network_security_group_id missing Jul 29, 2022
@paul-towler
Copy link

This also applies to azurestack_subnet

@jsburckhardt
Copy link

the azurestack_subnet is also missing route_table_id

@jonstevecg
Copy link

any chance that these two items could be fixed any time soon?

@simonbrady
Copy link

#206 indirectly addresses this by adding the various association resource types that made these attributes redundant in the azurerm provider.

@bwilkinscloud
Copy link

We are having the same issue and are looking for a quick resolution soon. When using the azurestack Terraform provider, we are observing an issue where attaching a network security group id to a subnet isn’t an option. In the documentation, it seems like we should be able to supply a network security group id but when attempting this terraform gives us the following error: “Unsupported Argument: An argument named network_security_group_id is not expected here.”

@paul-towler
Copy link

@bwilkinscloud We got around this issue by using the azure_stack_virtual_network resource with a dynamic field for subnets that loop through a map of subnets. For example:

resource "azurestack_virtual_network" "main" {
  name                = var.vnet_name
  location            = local.location
  resource_group_name = data.azurestack_resource_group.networks.name
  tags                = local.tags

  address_space = var.address_space
  dns_servers   = var.dns_servers

  dynamic "subnet" {
    for_each = var.subnets

    iterator = subnet
    content {
      name           = subnet.key
      address_prefix = subnet.value.ip_address
      security_group = subnet.value.nsg ? azurestack_network_security_group.vnet.id : null
    }
  }

  depends_on = [var.module_depends_on]
}

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

6 participants