FIX: added provider default tags validation
This commit is contained in:
parent
ef27e2f320
commit
d043b530b8
@ -1,6 +1,4 @@
|
|||||||
# vpc-endpoints module
|
# vpc-endpoints module
|
||||||
This module uses provider default_tags!
|
|
||||||
|
|
||||||
This module deploys VPC endpoints.
|
This module deploys VPC endpoints.
|
||||||
|
|
||||||
Automatically, this module performs the following additional tasks
|
Automatically, this module performs the following additional tasks
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
data "aws_region" "this" {}
|
data "aws_region" "this" {}
|
||||||
data aws_default_tags this {}
|
data "aws_default_tags" "this" {
|
||||||
|
lifecycle {
|
||||||
|
postcondition {
|
||||||
|
condition = length(self.tags) >= 1
|
||||||
|
error_message = "Validation failed: Provider default_tags not set."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resource "aws_vpc_endpoint" "vpc-interface-ep" {
|
resource "aws_vpc_endpoint" "vpc-interface-ep" {
|
||||||
for_each = toset(var.interface-ep-services)
|
for_each = toset(var.interface-ep-services)
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
# Overview
|
# Overview
|
||||||
This module uses provider default_tags!
|
|
||||||
|
|
||||||
This module performs the following tasks:
|
This module performs the following tasks:
|
||||||
|
|
||||||
- Create VPC, vpcflow log
|
- Create VPC, vpcflow log
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
data aws_caller_identity this {}
|
data "aws_caller_identity" "this" {}
|
||||||
|
|
||||||
data "aws_availability_zones" "available-az" {
|
data "aws_availability_zones" "available-az" {
|
||||||
state = "available"
|
state = "available"
|
||||||
}
|
}
|
||||||
|
|
||||||
data "aws_default_tags" "this" {}
|
data "aws_default_tags" "this" {
|
||||||
|
lifecycle {
|
||||||
|
postcondition {
|
||||||
|
condition = length(self.tags) >= 1
|
||||||
|
error_message = "Validation failed: Provider default_tags not set."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
no-az = 2 # hard-coding to 2AZ
|
no-az = 2 # hard-coding to 2AZ
|
||||||
|
Loading…
Reference in New Issue
Block a user