Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 4 additions & 3 deletions reference-artifacts/Custom-Scripts/resolver-rule-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

# Domain name to search for resolver rule
Domain="dept.cloud-nuage.gc.ca"
region="ca-central-1"

# Finds the resolver rule Id for the given domain name
function get_resolver_id() {
resolver_id=$(aws route53resolver list-resolver-rules --filters Name=DomainName,Values=$Domain --query ResolverRules[].Id --output text)
resolver_id=$(aws route53resolver list-resolver-rules --region $region --filters Name=DomainName,Values=$Domain --query ResolverRules[].Id --output text)
}

# Finds VPCs associated to the resolver rule Id
function get_vpc_ids() {
vpc_ids=$(aws route53resolver list-resolver-rule-associations --filters Name=ResolverRuleId,Values=$1 --query ResolverRuleAssociations[].VPCId --output json | awk '{print $1}' | tr -d '[]",')
vpc_ids=$(aws route53resolver list-resolver-rule-associations --region $region --filters Name=ResolverRuleId,Values=$1 --query ResolverRuleAssociations[].VPCId --output json | awk '{print $1}' | tr -d '[]",')
}

# Checks association of VPCs from the resolver rule
Expand Down Expand Up @@ -39,7 +40,7 @@ function disassociate_vpc_ids() {
else
echo "started disassociating VPCs from resolver rule $resolver_id"
for vpc_id in $vpc_ids; do
result=$(aws route53resolver disassociate-resolver-rule --resolver-rule-id ${resolver_id} --vpc-id $vpc_id)
result=$(aws route53resolver disassociate-resolver-rule --region $region --resolver-rule-id ${resolver_id} --vpc-id $vpc_id)
done
_checkStatus
fi
Expand Down
79 changes: 1 addition & 78 deletions reference-artifacts/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,84 +403,7 @@
"Auto-accept-sharing-attachments": true
},
"route-tables": ["core", "segregated", "shared", "standalone"],
"tgw-routes": [
{
"name": "{TGW_ALL}",
"routes": [
{
"destination": "1.1.0.0/32",
"target-tgw": "East"
}
]
},
{
"name": "segregated",
"routes": [
{
"destination": "1.0.4.0/32",
"blackhole-route": true
}
]
},
{
"name": "shared",
"routes": [{
"destination": "1.0.2.0/32",
"target-vpc": "Dev"
}]
},
{
"name": "standalone",
"routes": [{
"destination": "1.0.3.0/32",
"target-vpn": {
"name": "Perimeter_fw",
"az": "b",
"subnet": "Public"
}
}]
}
]
},
{
"name": "East",
"asn": 64526,
"region": "us-east-1",
"features": {
"DNS-support": true,
"VPN-ECMP-support": true,
"Default-route-table-association": false,
"Default-route-table-propagation": false,
"Auto-accept-sharing-attachments": true
},
"route-tables": ["core", "segregated", "shared", "standalone"],
"tgw-attach": {
"associate-to-tgw": "Main",
"account": "shared-network",
"region": "ca-central-1",
"tgw-rt-associate-local": ["core"],
"tgw-rt-associate-remote": ["core"]
},
"tgw-routes": [
{
"name": "core",
"routes": [
{
"destination": "1.1.0.0/32",
"target-tgw": "Main"
}
]
},
{
"name": "segregated",
"routes": [
{
"destination": "1.1.1.0/32",
"target-tgw": "Main"
}
]
}
]
"tgw-routes": []
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,6 @@ exports[`there should not be any unsupported resource changes for AWS::Budgets::

exports[`there should not be any unsupported resource changes for AWS::Budgets::Budget: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::Budgets::Budget: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::Budgets::Budget: SharedNetworkPhase1 1`] = `
Array [
Object {
Expand Down Expand Up @@ -811,8 +809,6 @@ exports[`there should not be any unsupported resource changes for AWS::Directory

exports[`there should not be any unsupported resource changes for AWS::DirectoryService::MicrosoftAD: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::DirectoryService::MicrosoftAD: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::DirectoryService::MicrosoftAD: SharedNetworkPhase1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::DirectoryService::MicrosoftAD: SharedNetworkPhase1Endpoint0CD50B8FF 1`] = `Array []`;
Expand Down Expand Up @@ -1076,8 +1072,6 @@ exports[`there should not be any unsupported resource changes for AWS::EC2::Inst

exports[`there should not be any unsupported resource changes for AWS::EC2::Instance: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::EC2::Instance: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::EC2::Instance: SharedNetworkPhase1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::EC2::Instance: SharedNetworkPhase1Endpoint0CD50B8FF 1`] = `Array []`;
Expand Down Expand Up @@ -1211,33 +1205,6 @@ Array [
]
`;

exports[`there should not be any unsupported resource changes for AWS::EC2::TransitGateway: SharedNetworkPhase0UsEast1 1`] = `
Array [
Object {
"LogicalId": "TgwEast2B76AF66",
"Properties": Object {
"AmazonSideAsn": 64526,
"AutoAcceptSharedAttachments": "enable",
"DefaultRouteTableAssociation": "disable",
"DefaultRouteTablePropagation": "disable",
"Description": undefined,
"DnsSupport": "enable",
"Tags": Array [
Object {
"Key": "Accelerator",
"Value": "PBMM",
},
Object {
"Key": "Name",
"Value": "East_tgw",
},
],
"VpnEcmpSupport": "enable",
},
},
]
`;

exports[`there should not be any unsupported resource changes for AWS::EC2::TransitGateway: SharedNetworkPhase1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::EC2::TransitGateway: SharedNetworkPhase1Endpoint0CD50B8FF 1`] = `Array []`;
Expand Down Expand Up @@ -1367,8 +1334,6 @@ exports[`there should not be any unsupported resource changes for AWS::ElasticLo

exports[`there should not be any unsupported resource changes for AWS::ElasticLoadBalancingV2::LoadBalancer: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::ElasticLoadBalancingV2::LoadBalancer: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::ElasticLoadBalancingV2::LoadBalancer: SharedNetworkPhase1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::ElasticLoadBalancingV2::LoadBalancer: SharedNetworkPhase1Endpoint0CD50B8FF 1`] = `Array []`;
Expand Down Expand Up @@ -1564,8 +1529,6 @@ exports[`there should not be any unsupported resource changes for AWS::S3::Bucke

exports[`there should not be any unsupported resource changes for AWS::S3::Bucket: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::S3::Bucket: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::S3::Bucket: SharedNetworkPhase1 1`] = `
Array [
Object {
Expand Down Expand Up @@ -1761,8 +1724,6 @@ exports[`there should not be any unsupported resource changes for AWS::SecretsMa

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::ResourcePolicy: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::ResourcePolicy: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::ResourcePolicy: SharedNetworkPhase1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::ResourcePolicy: SharedNetworkPhase1Endpoint0CD50B8FF 1`] = `Array []`;
Expand Down Expand Up @@ -1940,8 +1901,6 @@ exports[`there should not be any unsupported resource changes for AWS::SecretsMa

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::Secret: SharedNetworkPhase0 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::Secret: SharedNetworkPhase0UsEast1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::Secret: SharedNetworkPhase1 1`] = `Array []`;

exports[`there should not be any unsupported resource changes for AWS::SecretsManager::Secret: SharedNetworkPhase1Endpoint0CD50B8FF 1`] = `Array []`;
Expand Down