Skip to content

Commit

Permalink
Merge pull request #248 from zzxwill/tencent-gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
zzxwill authored Feb 20, 2022
2 parents adac29b + a74faed commit 117756c
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
12 changes: 10 additions & 2 deletions examples/tf-native/gcp/hcl/bucket.tf
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"
}
47 changes: 47 additions & 0 deletions examples/tf-native/tencent/vpc/main.tf
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
}

0 comments on commit 117756c

Please sign in to comment.