Skip to content

Commit

Permalink
AV-78888 vpc peering aws gcp (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulomeeCb committed Aug 9, 2024
1 parent a1bec35 commit 4f93eff
Show file tree
Hide file tree
Showing 22 changed files with 2,964 additions and 120 deletions.
234 changes: 218 additions & 16 deletions examples/getting_started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ In this demo, we will perform the following operations:
13. Create a new collection in the scope of a bucket.
14. Create a new on/off schedule for the cluster.
15. Create a new audit log settings.
16. Create a new network peer.

## Pre-Requisites:

Expand All @@ -39,7 +40,7 @@ $ terraform plan
│ Warning: Provider development overrides are in effect
│ The following provider development overrides are set in the CLI configuration:
│ - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│ - couchbasecloud/couchbase-capella in /Users/$USER/go/bin
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
Expand All @@ -48,12 +49,12 @@ var.collection
Enter a value: ^Z
zsh: suspended terraform plan
paulomee.de@FJL6N0YK9X getting_started % terraform plan
$USER@FJL6N0YK9X getting_started % terraform plan
│ Warning: Provider development overrides are in effect
│ The following provider development overrides are set in the CLI configuration:
│ - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│ - couchbasecloud/couchbase-capella in /Users/$USER/go/bin
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
Expand Down Expand Up @@ -200,7 +201,7 @@ Terraform will perform the following actions:
},
]
+ support = {
+ plan = "developer pro"
+ plan = "enterprise"
+ timezone = "PT"
}
}
Expand Down Expand Up @@ -465,7 +466,7 @@ Terraform will perform the following actions:
+ project_id = "ffffffff-aaaa-1414-eeee-000000000000"
}
Plan: 13 to add, 0 to change, 0 to destroy.
Plan: 14 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ apikey = (sensitive value)
Expand Down Expand Up @@ -539,7 +540,7 @@ Changes to Outputs:
},
]
+ support = {
+ plan = "developer pro"
+ plan = "enterprise"
+ timezone = "PT"
}
}
Expand Down Expand Up @@ -630,6 +631,26 @@ Changes to Outputs:
+ scope_name = "new_terraform_scope"
}
+ database_credential = (sensitive value)
+ network_peer = {
+ audit = (known after apply)
+ cluster_id = (known after apply)
+ commands = (known after apply)
+ id = (known after apply)
+ name = "VPCPeerTFTestAWS"
+ organization_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ project_id = (known after apply)
+ provider_config = {
+ aws_config = {
+ account_id = "123456789123"
+ cidr = "10.1.0.0/23"
+ provider_id = (known after apply)
+ region = "us-east-1"
+ vpc_id = "vpc-141f0fffff141aa00ff"
}
}
+ provider_type = "aws"
+ status = (known after apply)
}
+ organization = {
+ audit = {
+ created_at = "2020-07-22 12:38:57.437248116 +0000 UTC"
Expand Down Expand Up @@ -766,7 +787,7 @@ $ terraform apply
│ Warning: Provider development overrides are in effect
│ The following provider development overrides are set in the CLI configuration:
│ - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│ - couchbasecloud/couchbase-capella in /Users/$USER/go/bin
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
Expand Down Expand Up @@ -913,7 +934,7 @@ Terraform will perform the following actions:
},
]
+ support = {
+ plan = "developer pro"
+ plan = "enterprise"
+ timezone = "PT"
}
}
Expand Down Expand Up @@ -1040,6 +1061,29 @@ Terraform will perform the following actions:
+ password = (sensitive value)
+ project_id = (known after apply)
}
# couchbase-capella_network_peer.new_network_peer will be created
+ resource "couchbase-capella_network_peer" "new_network_peer" {
+ audit = (known after apply)
+ cluster_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ commands = (known after apply)
+ id = (known after apply)
+ name = "VPCPeerTFTestAWS"
+ organization_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ project_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ provider_config = {
+ aws_config = {
+ account_id = "123456789123"
+ cidr = "10.1.0.0/23"
+ provider_id = (known after apply)
+ region = "us-east-1"
+ vpc_id = "vpc-141f0fffff141aa00ff"
}
+ gcp_config = null
}
+ provider_type = "aws"
+ status = (known after apply)
}
# couchbase-capella_project.new_project will be created
+ resource "couchbase-capella_project" "new_project" {
Expand Down Expand Up @@ -1178,7 +1222,7 @@ Terraform will perform the following actions:
+ project_id = "ffffffff-aaaa-1414-eeee-000000000000"
}
Plan: 13 to add, 0 to change, 0 to destroy.
Plan: 14 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ apikey = (sensitive value)
Expand Down Expand Up @@ -1252,7 +1296,7 @@ Changes to Outputs:
},
]
+ support = {
+ plan = "developer pro"
+ plan = "enterprise"
+ timezone = "PT"
}
}
Expand Down Expand Up @@ -1358,6 +1402,27 @@ Changes to Outputs:
+ session_duration = 7200
}
}
+ network_peer = {
+ audit = (known after apply)
+ cluster_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ commands = (known after apply)
+ id = (known after apply)
+ name = "VPCPeerTFTestAWS"
+ organization_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ project_id = "ffffffff-aaaa-1414-eeee-000000000000"
+ provider_config = {
+ aws_config = {
+ account_id = "123456789123"
+ cidr = "10.1.0.0/23"
+ provider_id = (known after apply)
+ region = "us-east-1"
+ vpc_id = "vpc-141f0fffff141aa00ff"
}
}
+ provider_type = "aws"
+ status = (known after apply)
}
+ peer_id = (known after apply)
+ project = "My First Terraform Project"
+ sample_bucket = "gamesim-sample"
+ scope = {
Expand Down Expand Up @@ -1654,7 +1719,7 @@ cluster = {
},
])
"support" = {
"plan" = "developer pro"
"plan" = "enterprise"
"timezone" = "PT"
}
}
Expand Down Expand Up @@ -1745,6 +1810,40 @@ collection = {
"scope_name" = "new_terraform_scope"
}
database_credential = <sensitive>
network_peer = {
"audit" = {
"created_at" = "2024-06-27 19:34:00.202552084 +0000 UTC"
"created_by" = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi"
"modified_at" = "2024-06-27 19:34:18.661844385 +0000 UTC"
"modified_by" = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi"
"version" = 2
}
"cluster_id" = "ffffffff-aaaa-1414-eeee-000000000000"
"commands" = toset([
"aws ec2 accept-vpc-peering-connection --region=us-east-1 --vpc-peering-connection-id=pcx-12345678912345678",
"aws route53 associate-vpc-with-hosted-zone --hosted-zone-id=AAAAA000000FFFFFAAAAAA --vpc=VPCId=vpc-141f0fffff141aa00ff,VPCRegion=us-east-1 --region=us-east-1",
])
"id" = "ffffffff-aaaa-1414-eeee-000000000000"
"name" = "VPCPeerTFTestAWS"
"organization_id" = "ffffffff-aaaa-1414-eeee-000000000000"
"project_id" = "ffffffff-aaaa-1414-eeee-000000000000"
"provider_config" = {
"aws_config" = {
"account_id" = "123456789123"
"cidr" = "10.1.0.0/23"
"provider_id" = "pcx-12345678912345678"
"region" = "us-east-1"
"vpc_id" = "vpc-141f0fffff141aa00ff"
}
"gcp_config" = null /* object */
}
"provider_type" = "aws"
"status" = {
"reasoning" = ""
"state" = "complete"
}
}
peer_id = "ffffffff-aaaa-1414-eeee-000000000000"
organization = {
"audit" = {
"created_at" = "2020-07-22 12:38:57.437248116 +0000 UTC"
Expand Down Expand Up @@ -1987,7 +2086,7 @@ cluster = {
},
])
"support" = {
"plan" = "developer pro"
"plan" = "enterprise"
"timezone" = "PT"
}
}
Expand Down Expand Up @@ -2093,6 +2192,39 @@ organization = {
"session_duration" = 7200
}
}
network_peer = {
"audit" = {
"created_at" = "2024-06-27 19:34:00.202552084 +0000 UTC"
"created_by" = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi"
"modified_at" = "2024-06-27 19:34:18.661844385 +0000 UTC"
"modified_by" = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi"
"version" = 2
}
"cluster_id" = "ffffffff-aaaa-1414-eeee-000000000000"
"commands" = toset([
"aws ec2 accept-vpc-peering-connection --region=us-east-1 --vpc-peering-connection-id=pcx-12345678912345678",
"aws route53 associate-vpc-with-hosted-zone --hosted-zone-id=AAAAA000000FFFFFAAAAAA --vpc=VPCId=vpc-141f0fffff141aa00ff,VPCRegion=us-east-1 --region=us-east-1",
])
"id" = "ffffffff-aaaa-1414-eeee-000000000000"
"name" = "VPCPeerTFTestAWS"
"organization_id" = "ffffffff-aaaa-1414-eeee-000000000000"
"project_id" = "ffffffff-aaaa-1414-eeee-000000000000"
"provider_config" = {
"aws_config" = {
"account_id" = "123456789123"
"cidr" = "10.1.0.0/23"
"provider_id" = "pcx-12345678912345678"
"region" = "us-east-1"
"vpc_id" = "vpc-141f0fffff141aa00ff"
}
"gcp_config" = null /* object */
}
"provider_type" = "aws"
"status" = {
"reasoning" = ""
"state" = "complete"
}
}
project = "My First Terraform Project"
sample_bucket = "gamesim-sample"
scope = {
Expand Down Expand Up @@ -2214,7 +2346,7 @@ $ terraform destroy
│ Warning: Provider development overrides are in effect
│ The following provider development overrides are set in the CLI configuration:
│ - couchbasecloud/couchbase-capella in /Users/paulomee.de/go/bin
│ - couchbasecloud/couchbase-capella in /Users/$USER/go/bin
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
Expand Down Expand Up @@ -2392,7 +2524,7 @@ Terraform will perform the following actions:
},
] -> null
- support = {
- plan = "developer pro" -> null
- plan = "enterprise" -> null
- timezone = "PT" -> null
} -> null
}
Expand Down Expand Up @@ -2525,6 +2657,42 @@ Terraform will perform the following actions:
- password = (sensitive value) -> null
- project_id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
}
Terraform will perform the following actions:
# couchbase-capella_network_peer.new_network_peer will be destroyed
- resource "couchbase-capella_network_peer" "new_network_peer" {
- audit = {
- created_at = "2024-06-29 00:37:45.4338168 +0000 UTC" -> null
- created_by = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi" -> null
- modified_at = "2024-06-29 00:38:04.635673378 +0000 UTC" -> null
- modified_by = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi" -> null
- version = 2 -> null
} -> null
- cluster_id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
- commands = [
- "aws ec2 accept-vpc-peering-connection --region=us-east-1 --vpc-peering-connection-id=pcx-1234567891234567",
- "aws route53 associate-vpc-with-hosted-zone --hosted-zone-id=AAAAA000000FFFFFAAAAAA --vpc=VPCId=vpc-12345678912345678,VPCRegion=us-east-1 --region=us-east-1",
] -> null
- id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
- name = "VPCPeerTFTestAWS" -> null
- organization_id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
- project_id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
- provider_config = {
- aws_config = {
- account_id = "123456789123" -> null
- cidr = "10.2.0.0/23" -> null
- provider_id = "pcx-1234567891234567" -> null
- region = "us-east-1" -> null
- vpc_id = "vpc-12345678912345678" -> null
} -> null
} -> null
- provider_type = "aws" -> null
- status = {
- reasoning = "" -> null
- state = "complete" -> null
} -> null
}
# couchbase-capella_project.new_project will be destroyed
- resource "couchbase-capella_project" "new_project" {
Expand Down Expand Up @@ -2681,7 +2849,7 @@ Terraform will perform the following actions:
- project_id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
}
Plan: 0 to add, 0 to change, 13 to destroy.
Plan: 0 to add, 0 to change, 14 to destroy.
Changes to Outputs:
- apikey = (sensitive value) -> null
Expand Down Expand Up @@ -2793,7 +2961,7 @@ Changes to Outputs:
},
]
- support = {
- plan = "developer pro"
- plan = "enterprise"
- timezone = "PT"
}
} -> null
Expand Down Expand Up @@ -2884,6 +3052,40 @@ Changes to Outputs:
- scope_name = "new_terraform_scope"
} -> null
- database_credential = (sensitive value) -> null
- network_peer = {
- audit = {
- created_at = "2024-06-29 00:37:45.4338168 +0000 UTC"
- created_by = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi"
- modified_at = "2024-06-29 00:38:04.635673378 +0000 UTC"
- modified_by = "OqrQXTvtsD6PjHiP9Tt4ZhggaCzQVpPi"
- version = 2
}
- cluster_id = "ffffffff-aaaa-1414-eeee-000000000000"
- commands = [
- "aws ec2 accept-vpc-peering-connection --region=us-east-1 --vpc-peering-connection-id=pcx-1234567891234567",
- "aws route53 associate-vpc-with-hosted-zone --hosted-zone-id=AAAAA000000FFFFFAAAAAA --vpc=VPCId=vpc-12345678912345678,VPCRegion=us-east-1 --region=us-east-1",
]
- id = "ffffffff-aaaa-1414-eeee-000000000000"
- name = "VPCPeerTFTestAWS"
- organization_id = "ffffffff-aaaa-1414-eeee-000000000000"
- project_id = "ffffffff-aaaa-1414-eeee-000000000000"
- provider_config = {
- aws_config = {
- account_id = "123456789123"
- cidr = "10.2.0.0/23"
- provider_id = "pcx-1234567891234567"
- region = "us-east-1"
- vpc_id = "vpc-12345678912345678"
}
- gcp_config = null
}
- provider_type = "aws"
- status = {
- reasoning = ""
- state = "complete"
}
} -> null
- peer_id = "ffffffff-aaaa-1414-eeee-000000000000" -> null
- organization = {
- audit = {
- created_at = "2020-07-22 12:38:57.437248116 +0000 UTC"
Expand Down
Loading

0 comments on commit 4f93eff

Please sign in to comment.