Skip to content

Commit

Permalink
iac: create alicloud vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
walbertus committed Dec 10, 2024
1 parent eab9a91 commit 6eef608
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions iac/alicloud/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
terraform.tfvars
*.tfstate*
3 changes: 3 additions & 0 deletions iac/alicloud/backend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
backend "local" {}
}
8 changes: 8 additions & 0 deletions iac/alicloud/network.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This resource caused issue https://github.com/aliyun/terraform-provider-alicloud/issues/7967
resource "alicloud_vpc" "default" {
is_default = true
description = "test"
cidr_block = "10.0.0.0/16"
vpc_name = "test-vpc"
enable_ipv6 = false
}
5 changes: 5 additions & 0 deletions iac/alicloud/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
provider "alicloud" {
access_key = var.access_key
secret_key = var.secret_key
region = var.region
}
16 changes: 16 additions & 0 deletions iac/alicloud/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
variable "access_key" {
description = "The Access Key ID for AliCloud"
type = string
}

variable "secret_key" {
description = "The Secret Access Key for AliCloud"
type = string
sensitive = true
}

variable "region" {
description = "The region to deploy resources in AliCloud"
type = string
default = "cn-hangzhou"
}

0 comments on commit 6eef608

Please sign in to comment.