chore: adjusted provider to allow use with tofu 1.11
This commit is contained in:
@@ -3,7 +3,6 @@ provider "aws" {
|
|||||||
|
|
||||||
default_tags {
|
default_tags {
|
||||||
tags = {
|
tags = {
|
||||||
ServiceProvider = "RackspaceTechnology"
|
|
||||||
Environment = var.environment
|
Environment = var.environment
|
||||||
Project = var.project
|
Project = var.project
|
||||||
Application = var.application
|
Application = var.application
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ module "TestInstance" {
|
|||||||
instance_type = "t4g.large"
|
instance_type = "t4g.large"
|
||||||
subnet_id = data.terraform_remote_state.vpc.outputs.private_subnets[0]
|
subnet_id = data.terraform_remote_state.vpc.outputs.private_subnets[0]
|
||||||
create_security_group = false
|
create_security_group = false
|
||||||
|
vpc_security_group_ids = [module.TestSg.id]
|
||||||
root_block_device = {
|
root_block_device = {
|
||||||
device_name = "/dev/xvda"
|
device_name = "/dev/xvda"
|
||||||
type = "gp3"
|
type = "gp3"
|
||||||
@@ -53,4 +54,20 @@ module "KmsKeys" {
|
|||||||
create-secret-key = false
|
create-secret-key = false
|
||||||
create-storage-key = false
|
create-storage-key = false
|
||||||
deletion_window_in_days = 7
|
deletion_window_in_days = 7
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module "TestSg" {
|
||||||
|
source = "../../../modules/compute/security_group"
|
||||||
|
name = "example-sg"
|
||||||
|
description = "SG of EC2 bastion instances"
|
||||||
|
vpc-id = data.terraform_remote_state.vpc.outputs.vpc_id
|
||||||
|
ingress = {
|
||||||
|
r1 = "tcp,4750,4750,1.2.3.4/32,Patch Management Tool"
|
||||||
|
r2 = "tcp,22,22,1.2.3.4/32,Patch Management Tool"
|
||||||
|
}
|
||||||
|
egress = {
|
||||||
|
r1 = "-1,-1,-1,0.0.0.0/0,Allow egress ipv4"
|
||||||
|
r2 = "-1,-1,-1,::/0,Allow egress ipv6"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
output "private_subnets" {
|
output "private_subnets" {
|
||||||
value = module.vpc.private_subnets
|
value = module.vpc.private_subnets
|
||||||
|
}
|
||||||
|
|
||||||
|
output "vpc_id" {
|
||||||
|
value = module.vpc.vpc_id
|
||||||
|
}
|
||||||
|
|
||||||
|
output "vpc_cidr_block" {
|
||||||
|
value = module.vpc.vpc_cidr_block
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user