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

Attribute "ip_configuration" should not be marked as (Optional) #22152

Closed
1 task done
CiucurDaniel opened this issue Jun 13, 2023 · 1 comment · Fixed by #22154
Closed
1 task done

Attribute "ip_configuration" should not be marked as (Optional) #22152

CiucurDaniel opened this issue Jun 13, 2023 · 1 comment · Fixed by #22154

Comments

@CiucurDaniel
Copy link
Contributor

CiucurDaniel commented Jun 13, 2023

Is there an existing issue for this?

  • I have searched the existing issues

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 Version

1.4.6

AzureRM Provider Version

3.61.0

Affected Resource(s)/Data Source(s)

azurerm_bastion_host

Terraform Configuration Files

provider "azurerm" {
    features {}   
}

resource "azurerm_resource_group" "bastion" {
  location = "westeurope"
  name     = "bastion-rg"

}
resource "azurerm_bastion_host" "main" {
  name                   = "my-bastion-host"
  location               = azurerm_resource_group.bastion.location
  resource_group_name    = azurerm_resource_group.bastion.name
}

Debug Output/Panic Output

╷
│ Error: creating/updating Bastion Host: (Name "my-bastion-host" / Resource Group "bastion-rg"): network.BastionHostsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="BastionHostMustHaveAtleastOneHostIpConfiguration" Message="BastionHost /subscriptions/<subscription_id>/resourceGroups/bastion-rg/providers/Microsoft.Network/bastionHosts/my-bastion-host must contain at least 1 IP Configuration." Details=[]
│ 
│   with azurerm_bastion_host.main,
│   on main.tf line 38, in resource "azurerm_bastion_host" "main":
│   38: resource "azurerm_bastion_host" "main" {
│

Expected Behaviour

Creating a bastion host without ip_configuration block will succeed as implied by the docs saying ip_configuration block is Optional.

(this is what current docs suggest)

Actual Behaviour

According to docs here the ip_configuration block is Optional this falsely implies that you can create a bastion host without that variable which is definitely not true as you can see the attempt above which fails.

Therefore, I suggest we update the docs to make ip_configuration block (Required)

Steps to Reproduce

terraform apply -auto-approve

Important Factoids

No response

References

No response

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants