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

ltc-linux-challenge > azure: issues noticed which was not stated in the readme file #2

Open
PhilipOyelegbin opened this issue Nov 1, 2024 · 5 comments
Assignees

Comments

@PhilipOyelegbin
Copy link

Hi LTC,

I noticed some setup issues in the first challenge that were not explicitly stated in the Azure readme file, which I have identified below.

  • subscription ID is needed as a variable
    Screenshot 2024-11-01 194252

  • static IP allocation must be used when creating and assigning IP addresses using the "terraform apply" command, the snapshot is provided below.
    Screenshot 2024-11-01 194223

Kindly check this for an updated readme document, thank you for the good job you are doing here at LTC.

@rishabkumar7 rishabkumar7 self-assigned this Nov 5, 2024
@rishabkumar7
Copy link
Collaborator

@PhilipOyelegbin thank you for opening the issue. Let me check and will update this issue accordingly.

@jimmyblain
Copy link

jimmyblain commented Nov 10, 2024

Encountering the same issues. While we wait for a fix, @PhilipOyelegbin have you found a workaround?

EDIT: I just changed "Dymanic" in line 42 to "Static", and was able to create the resource

@PhilipOyelegbin
Copy link
Author

Encountering the same issues. While we wait for a fix, @PhilipOyelegbin have you found a workaround?

EDIT: I just changed "Dymanic" in line 42 to "Static", and was able to create the resource

Yes, I had to update the code which resolved it.

  • First bug fix main.tf
# Configure the Azure provider
provider "azurerm" {
  features {}

  subscription_id = var.subscription_id
}
  • Second bug fix main.tf
# Create a public IP
resource "azurerm_public_ip" "ctf_public_ip" {
  name                = "ctf-public-ip"
  location            = azurerm_resource_group.ctf_rg.location
  resource_group_name = azurerm_resource_group.ctf_rg.name
  allocation_method   = "Static"
  sku                 = "Standard"
}

@RScrafted
Copy link

Subscription ID Supporting reference: @PhilipOyelegbin

The following arguments are supported:

features - (Required) A features block as defined below which can be used to customize the behaviour of certain Azure Provider resources.

subscription_id - (Required) The Subscription ID which should be used. This can also be sourced from the ARM_SUBSCRIPTION_ID Environment Variable.

Note
The subscription_id property is required when performing a plan or apply operation, but is not required to run terraform validate.

Link: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs

Addition in azure/README.md: @rishabkumar7

Step 1: After az login, copy the Subscrption ID and paste it after Step 4: terraform apply -var="az_region=YOUR_AZURE_REGION"

@rishabkumar7
Copy link
Collaborator

Thanks @RScrafted I am testing some changes, and will update the readme.

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

4 participants