Skip to content

Commit 100d729

Browse files
committed
Fix warnings in iac-core + update tf and tf provider versions
1 parent 616f37e commit 100d729

File tree

5 files changed

+42
-37
lines changed

5 files changed

+42
-37
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Check out my blog post about this topic
3030
az login -t [AZURE_TENANT_ID]
3131
cd [PATH_TO_REPOSITORY]\iac-core
3232
terraform init
33-
terraform apply --var-file=.\vars\dev.core.tfvars --state=dev.core.tfstate
33+
terraform apply --var-file=.\vars\dev.core.tfvars
3434
```
3535

3636
### Deploy application resources
3737

3838
> [!IMPORTANT]
39-
> To generate deployment credentials and to configure the GitHub secrets for the GitHub actions workflow, see [here](https://learn.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=openid%2Caspnetcore&WT.mc_id=MVP_344197#set-up-a-github-actions-workflow-manually).
39+
> To generate deployment credentials and to configure the secrets for the GitHub actions workflow, see [here](https://learn.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=openid%2Caspnetcore&WT.mc_id=MVP_344197#set-up-a-github-actions-workflow-manually).
4040
> There are currently two GitHub environments set up for this repository: `dev` and `dev-iac`.
4141
> For both of them a separate federated credential is set up in the Entra app which got created while generating deployment credentials.
4242
> Furthermore the service principal of the Entra app is a member of the Entra group `kv-secret-rotation-sample-contributor-iac` and the following Microsoft Graph application permissions got added

iac-core/.terraform.lock.hcl

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iac-core/backend.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
terraform {
2+
backend "local" {
3+
path = "dev.core.tfstate"
4+
}
5+
}

iac-core/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
data "azurerm_client_config" "current" {}
22

33
locals {
4-
name_template = "${var.resource_prefix}-<service>-iac"
4+
name_template = "${var.resource_prefix}-<service>-iac"
55
}
66

77
# Resource Group
@@ -35,8 +35,8 @@ resource "azurerm_storage_account" "sa" {
3535

3636
# container iac-state
3737
resource "azurerm_storage_container" "tfstate" {
38-
name = "tfstate"
39-
storage_account_name = azurerm_storage_account.sa.name
38+
name = "tfstate"
39+
storage_account_id = azurerm_storage_account.sa.id
4040
}
4141

4242
resource "azurerm_role_assignment" "blob-data-owner" {

iac-core/versions.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
terraform {
2-
required_version = "~> 1.9.8"
2+
required_version = "~> 1.13.3"
33
required_providers {
44
azuread = {
55
source = "hashicorp/azuread"
6-
version = "~> 3.0.2"
6+
version = "~> 3.6.0"
77
}
88
azurerm = {
99
source = "hashicorp/azurerm"
10-
version = "~> 4.7.0"
10+
version = "~> 4.49.0"
1111
}
1212
}
1313
}

0 commit comments

Comments
 (0)