File tree Expand file tree Collapse file tree 3 files changed +31
-16
lines changed
examples/resources/altinitycloud_env_aws/peering Expand file tree Collapse file tree 3 files changed +31
-16
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 0.2.4] ( https://github.com/Altinity/terraform-provider-altinitycloud/compare/v0.2.3...v0.2.4 )
8+ > TBA
9+
710## [ 0.2.3] ( https://github.com/Altinity/terraform-provider-altinitycloud/compare/v0.2.2...v0.2.3 )
811
912### Changed
Original file line number Diff line number Diff line change @@ -132,8 +132,13 @@ resource "altinitycloud_env_certificate" "this" {
132132 env_name = "acme-staging"
133133}
134134
135+ locals {
136+ aws_account_id = "123456789012"
137+ region = "us-east-1"
138+ }
139+
135140provider "aws" {
136- region = "us-east-1"
141+ region = local.region
137142}
138143
139144module "altinitycloud_connect_aws" {
@@ -143,20 +148,21 @@ module "altinitycloud_connect_aws" {
143148
144149resource "altinitycloud_env_aws" "this" {
145150 name = altinitycloud_env_certificate.this.env_name
146- aws_account_id = "123456789012"
147- region = "us-east-1"
151+ aws_account_id = local.aws_account_id
152+ region = local.region
148153 zones = ["us-east-1a", "us-east-1b"]
149154 cidr = "10.67.0.0/21"
150155 load_balancers = {
151156 internal = {
152157 enabled = true
153- peering_connections = [
154- {
155- vcp_id = "vpc-xyz"
156- }
157- ]
158158 }
159159 }
160+ peering_connections = [
161+ {
162+ aws_account_id = local.aws_account_id # This only required if the VPC is it not in the same account as the environment.
163+ vpc_id = "vpc-xyz"
164+ }
165+ ]
160166 node_groups = [
161167 {
162168 node_type = "t4g.large"
Original file line number Diff line number Diff line change @@ -2,8 +2,13 @@ resource "altinitycloud_env_certificate" "this" {
22 env_name = " acme-staging"
33}
44
5+ locals {
6+ aws_account_id = " 123456789012"
7+ region = " us-east-1"
8+ }
9+
510provider "aws" {
6- region = " us-east-1 "
11+ region = local . region
712}
813
914module "altinitycloud_connect_aws" {
@@ -13,20 +18,21 @@ module "altinitycloud_connect_aws" {
1318
1419resource "altinitycloud_env_aws" "this" {
1520 name = altinitycloud_env_certificate. this . env_name
16- aws_account_id = " 123456789012 "
17- region = " us-east-1 "
21+ aws_account_id = local . aws_account_id
22+ region = local . region
1823 zones = [" us-east-1a" , " us-east-1b" ]
1924 cidr = " 10.67.0.0/21"
2025 load_balancers = {
2126 internal = {
2227 enabled = true
23- peering_connections = [
24- {
25- vcp_id = " vpc-xyz"
26- }
27- ]
2828 }
2929 }
30+ peering_connections = [
31+ {
32+ aws_account_id = local.aws_account_id # This only required if the VPC is it not in the same account as the environment.
33+ vpc_id = " vpc-xyz"
34+ }
35+ ]
3036 node_groups = [
3137 {
3238 node_type = " t4g.large"
You can’t perform that action at this time.
0 commit comments