alicloud_vpc_gateway_endpoint

Provides a VPC Gateway Endpoint resource. VPC gateway endpoint.

For information about VPC Gateway Endpoint and how to use it, see What is Gateway Endpoint.

Example Usage

Basic Usage

provider "alicloud" {
  region = "cn-hangzhou"
}
variable "name" {
  default = "terraform-example"
}

variable "domain" {
  default = "com.aliyun.cn-hangzhou.oss"
}

resource "alicloud_vpc" "defaultVpc" {
  description = "tf-example"
}

resource "alicloud_resource_manager_resource_group" "defaultRg" {
  display_name        = "tf-example-497"
  resource_group_name = var.name
}

resource "alicloud_vpc_gateway_endpoint" "default" {
  gateway_endpoint_descrption = "test-gateway-endpoint"
  gateway_endpoint_name       = var.name
  vpc_id                      = alicloud_vpc.defaultVpc.id
  resource_group_id           = alicloud_resource_manager_resource_group.defaultRg.id
  service_name                = var.domain
  policy_document             = <<EOF
      {
        "Version": "1",
        "Statement": [{
          "Effect": "Allow",
          "Resource": ["*"],
          "Action": ["*"],
          "Principal": ["*"]
        }]
      }
      EOF
}
      {
        "Version": "1",
        "Statement": [{
          "Effect": "Allow",
          "Resource": ["*"],
          "Action": ["*"],
          "Principal": ["*"]
        }]
      }
      EOF
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

VPC Gateway Endpoint can be imported using the id, e.g.

$ terraform import alicloud_vpc_gateway_endpoint.example <id>