-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from zzxwill/tencent-gcp
- Loading branch information
Showing
2 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
resource "google_storage_bucket" "bucket" { | ||
name = var.bucket | ||
name = var.bucket | ||
location = var.location | ||
} | ||
|
||
output "BUCKET_URL" { | ||
value = google_storage_bucket.bucket.url | ||
description = "Bucket URL" | ||
} | ||
|
||
variable "bucket" { | ||
default = "vela-website" | ||
description = "The name of the storage bucket to create" | ||
type = "string" | ||
} | ||
|
||
variable "location" { | ||
description = "The location of the storage bucket to create" | ||
type = "string" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
terraform { | ||
required_providers { | ||
tencentcloud = { | ||
source = "tencentcloudstack/tencentcloud" | ||
} | ||
} | ||
} | ||
|
||
resource "tencentcloud_vpc" "vpc" { | ||
name = var.vpc_name | ||
cidr_block = var.vpc_cidr | ||
is_multicast = var.vpc_is_multicast | ||
dns_servers = length(var.vpc_dns_servers) > 0 ? var.vpc_dns_servers : null | ||
tags = var.vpc_tags | ||
} | ||
|
||
variable "vpc_name" { | ||
description = "The vpc name used to launch a new vpc when 'vpc_id' is not specified." | ||
default = "tf-modules-vpc" | ||
} | ||
|
||
variable "vpc_cidr" { | ||
description = "The cidr block used to launch a new vpc when 'vpc_id' is not specified." | ||
default = "172.16.0.0/16" | ||
} | ||
|
||
variable "vpc_is_multicast" { | ||
description = "Specify the vpc is multicast when 'vpc_id' is not specified." | ||
default = true | ||
} | ||
|
||
variable "vpc_dns_servers" { | ||
description = "Specify the vpc dns servers when 'vpc_id' is not specified." | ||
type = list(string) | ||
default = [] | ||
} | ||
|
||
variable "vpc_tags" { | ||
description = "Additional tags for the vpc." | ||
type = map(string) | ||
default = {} | ||
} | ||
|
||
output "VPC_ID" { | ||
description = "The id of vpc." | ||
value = tencentcloud_vpc.vpc.id | ||
} |