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

Fix/depends on marketplace agreement #6

Merged
merged 5 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this module adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.4.1] - 2024-09-17
- VMs now depend on marketplace image agreement created by enable_plan=true

## [1.4.0] - 2024-09-16
- Added enable_plan option for marketplace images.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ resource "azurerm_subnet" "this" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >=1.5.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | >= 3.7.0 |
| <a name="requirement_azurerm"></a> [azurerm](#requirement\_azurerm) | ~> 3.116.0 |

## Inputs

Expand Down
7 changes: 5 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ resource "azurerm_linux_virtual_machine" "this" {
admin_password = var.admin_credential.admin_password
disable_password_authentication = var.admin_credential.admin_password == null


dynamic "admin_ssh_key" {
for_each = var.admin_credential.public_key != null ? [1] : []
content {
Expand Down Expand Up @@ -103,4 +102,8 @@ resource "azurerm_linux_virtual_machine" "this" {
admin_password
]
}
}

depends_on = [
azurerm_marketplace_agreement.default
]
}
2 changes: 1 addition & 1 deletion terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.7.0"
version = "~> 3.116.0"
}
}
}