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

2-sec-vnet/main.tf - Cannot initialize end_date in azuread_service_principal_password resource #7

Open
bluedog13 opened this issue Aug 31, 2021 · 0 comments

Comments

@bluedog13
Copy link

In the module : 2-sec-vnet/main.tf, line 114/115

value                = random_password.vnet_peering.result
end_date_relative    = "17520h"

gives the below error when I run "terraform validate".

Error: Unsupported argument

  • An argument named "end_date_relative" is not expected here.
  • Can't configure a value for "value": its value will be decided automatically based on the result of applying this configuration.

As an alternative, the below can be used

TERRAFORM CONFIG

time = {
      source  = "registry.terraform.io/hashicorp/time"
      version = "~> 0.7.2"
    }

RESOURCES

resource "time_rotating" "vnet_peering" {
  rotation_days = 7
}


resource "azuread_service_principal_password" "vnet_peering" {
  service_principal_id = azuread_service_principal.vnet_peering.id

  keepers = {
    rotation = time_rotating.vnet_peering.id
  }
}
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

1 participant