mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-04 17:51:11 +00:00
Merge branch 'master' into mchalek-fix-services-pagetoken
This commit is contained in:
commit
1c4f1a0bec
@ -6,12 +6,14 @@ FEATURES:
|
||||
IMPROVEMENTS:
|
||||
* compute: Autogenerate `google_compute_forwarding_rule`, adding labels, service labels, and service name attribute.
|
||||
* compute: add `quic_override` to `google_compute_target_https_proxy` [GH-1718]
|
||||
* comppute: add support for licenses to `compute_image` [GH-1717]
|
||||
* container: add ability to configure resource labels on `google_container_cluster` [GH-1663]
|
||||
* container: increase max number of `master_authorized_networks` to 20 [GH-1733]
|
||||
* container: support specifying `disk_type` for `node_config` [GH-1665]
|
||||
* redis: Support Redis Configuration [GH-1706]
|
||||
|
||||
BUG FIXES:
|
||||
* compute: Fix opportunistic rolling updates for instance group managers [GH-1742]
|
||||
* iot: Retry creation of Cloud IoT registry [GH-1713]
|
||||
|
||||
## 1.15.0 (June 25, 2018)
|
||||
|
@ -1,6 +1,7 @@
|
||||
package google
|
||||
|
||||
import (
|
||||
computeBeta "google.golang.org/api/compute/v0.beta"
|
||||
"google.golang.org/api/compute/v1"
|
||||
)
|
||||
|
||||
@ -13,3 +14,13 @@ func readDiskType(c *Config, zone *compute.Zone, project, name string) (*compute
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// readRegionDiskType finds the disk type with the given name.
|
||||
func readRegionDiskType(c *Config, region *compute.Region, project, name string) (*computeBeta.DiskType, error) {
|
||||
diskType, err := c.clientComputeBeta.RegionDiskTypes.Get(project, region.Name, name).Do()
|
||||
if err == nil && diskType != nil && diskType.SelfLink != "" {
|
||||
return diskType, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,10 @@ func ParseDiskFieldValue(disk string, d TerraformResourceData, config *Config) (
|
||||
return parseZonalFieldValue("disks", disk, "project", "zone", d, config, false)
|
||||
}
|
||||
|
||||
func ParseRegionDiskFieldValue(disk string, d TerraformResourceData, config *Config) (*RegionalFieldValue, error) {
|
||||
return parseRegionalFieldValue("disks", disk, "project", "region", "zone", d, config, false)
|
||||
}
|
||||
|
||||
func ParseOrganizationCustomRoleName(role string) (*OrganizationFieldValue, error) {
|
||||
return parseOrganizationFieldValue("roles", role, false)
|
||||
}
|
||||
|
@ -292,10 +292,11 @@ func resourceComputeDisk() *schema.Resource {
|
||||
DiffSuppressFunc: diskImageDiffSuppress,
|
||||
},
|
||||
"type": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Default: "pd-standard",
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
DiffSuppressFunc: compareSelfLinkOrResourceName,
|
||||
Default: "pd-standard",
|
||||
},
|
||||
"zone": {
|
||||
Type: schema.TypeString,
|
||||
@ -1009,7 +1010,11 @@ func expandComputeDiskImage(v interface{}, d *schema.ResourceData, config *Confi
|
||||
}
|
||||
|
||||
func expandComputeDiskType(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
||||
return v, nil
|
||||
f, err := parseZonalFieldValue("diskTypes", v.(string), "project", "zone", d, config, true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Invalid value for type: %s", err)
|
||||
}
|
||||
return f.RelativeLink(), nil
|
||||
}
|
||||
|
||||
func expandComputeDiskZone(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
||||
|
@ -106,6 +106,13 @@ func resourceComputeImage() *schema.Resource {
|
||||
Set: schema.HashString,
|
||||
},
|
||||
|
||||
"licenses": &schema.Schema{
|
||||
Type: schema.TypeList,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
|
||||
"label_fingerprint": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
@ -158,6 +165,11 @@ func resourceComputeImageCreate(d *schema.ResourceData, meta interface{}) error
|
||||
image.Labels = expandLabels(d)
|
||||
}
|
||||
|
||||
// Load up the licenses for this image if specified
|
||||
if _, ok := d.GetOk("licenses"); ok {
|
||||
image.Licenses = licenses(d)
|
||||
}
|
||||
|
||||
// Read create timeout
|
||||
var createTimeout int
|
||||
if v, ok := d.GetOk("create_timeout"); ok {
|
||||
@ -213,6 +225,7 @@ func resourceComputeImageRead(d *schema.ResourceData, meta interface{}) error {
|
||||
d.Set("family", image.Family)
|
||||
d.Set("self_link", image.SelfLink)
|
||||
d.Set("labels", image.Labels)
|
||||
d.Set("licenses", image.Licenses)
|
||||
d.Set("label_fingerprint", image.LabelFingerprint)
|
||||
d.Set("project", project)
|
||||
|
||||
@ -287,3 +300,12 @@ func resourceComputeImageDelete(d *schema.ResourceData, meta interface{}) error
|
||||
d.SetId("")
|
||||
return nil
|
||||
}
|
||||
|
||||
func licenses(d *schema.ResourceData) []string {
|
||||
licensesCount := d.Get("licenses.#").(int)
|
||||
data := make([]string, licensesCount)
|
||||
for i := 0; i < licensesCount; i++ {
|
||||
data[i] = d.Get(fmt.Sprintf("licenses.%d", i)).(string)
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
@ -36,6 +36,33 @@ func TestAccComputeImage_basic(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestAccComputeImage_withLicense(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var image compute.Image
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckComputeImageDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccComputeImage_license("image-test-" + acctest.RandString(10)),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckComputeImageExists(
|
||||
"google_compute_image.foobar", &image),
|
||||
testAccCheckComputeImageDescription(&image, "description-test"),
|
||||
testAccCheckComputeImageFamily(&image, "family-test"),
|
||||
testAccCheckComputeImageContainsLabel(&image, "my-label", "my-label-value"),
|
||||
testAccCheckComputeImageContainsLabel(&image, "empty-label", ""),
|
||||
testAccCheckComputeImageContainsLicense(&image, "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"),
|
||||
testAccCheckComputeImageHasComputedFingerprint(&image, "google_compute_image.foobar"),
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestAccComputeImage_update(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@ -184,6 +211,19 @@ func testAccCheckComputeImageContainsLabel(image *compute.Image, key string, val
|
||||
}
|
||||
}
|
||||
|
||||
func testAccCheckComputeImageContainsLicense(image *compute.Image, expectedLicense string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
|
||||
for _, thisLicense := range image.Licenses {
|
||||
if thisLicense == expectedLicense {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("Expected license '%s' was not found", expectedLicense)
|
||||
}
|
||||
}
|
||||
|
||||
func testAccCheckComputeImageDoesNotContainLabel(image *compute.Image, key string) resource.TestCheckFunc {
|
||||
return func(s *terraform.State) error {
|
||||
if v, ok := image.Labels[key]; ok {
|
||||
@ -242,6 +282,26 @@ resource "google_compute_image" "foobar" {
|
||||
}`, name)
|
||||
}
|
||||
|
||||
func testAccComputeImage_license(name string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_compute_image" "foobar" {
|
||||
name = "%s"
|
||||
description = "description-test"
|
||||
family = "family-test"
|
||||
raw_disk {
|
||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
||||
}
|
||||
create_timeout = 5
|
||||
labels = {
|
||||
my-label = "my-label-value"
|
||||
empty-label = ""
|
||||
}
|
||||
licenses = [
|
||||
"https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx",
|
||||
]
|
||||
}`, name)
|
||||
}
|
||||
|
||||
func testAccComputeImage_update(name string) string {
|
||||
return fmt.Sprintf(`
|
||||
resource "google_compute_image" "foobar" {
|
||||
|
@ -251,7 +251,7 @@ func resourceComputeInstance() *schema.Resource {
|
||||
"source": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
DiffSuppressFunc: linkDiffSuppress,
|
||||
DiffSuppressFunc: compareSelfLinkOrResourceName,
|
||||
},
|
||||
|
||||
"device_name": &schema.Schema{
|
||||
@ -863,11 +863,22 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
|
||||
continue
|
||||
}
|
||||
disk := v.(map[string]interface{})
|
||||
source, err := ParseDiskFieldValue(disk["source"].(string), d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
s := disk["source"].(string)
|
||||
var sourceLink string
|
||||
if strings.Contains(s, "regions/") {
|
||||
source, err := ParseRegionDiskFieldValue(disk["source"].(string), d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sourceLink = source.RelativeLink()
|
||||
} else {
|
||||
source, err := ParseDiskFieldValue(disk["source"].(string), d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sourceLink = source.RelativeLink()
|
||||
}
|
||||
attachedDiskSources[source.RelativeLink()] = i
|
||||
attachedDiskSources[sourceLink] = i
|
||||
}
|
||||
|
||||
attachedDisks := make([]map[string]interface{}, d.Get("attached_disk.#").(int))
|
||||
@ -878,11 +889,21 @@ func resourceComputeInstanceRead(d *schema.ResourceData, meta interface{}) error
|
||||
} else if disk.Type == "SCRATCH" {
|
||||
scratchDisks = append(scratchDisks, flattenScratchDisk(disk))
|
||||
} else {
|
||||
source, err := ParseDiskFieldValue(disk.Source, d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
var sourceLink string
|
||||
if strings.Contains(disk.Source, "regions/") {
|
||||
source, err := ParseRegionDiskFieldValue(disk.Source, d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sourceLink = source.RelativeLink()
|
||||
} else {
|
||||
source, err := ParseDiskFieldValue(disk.Source, d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sourceLink = source.RelativeLink()
|
||||
}
|
||||
adIndex, inConfig := attachedDiskSources[source.RelativeLink()]
|
||||
adIndex, inConfig := attachedDiskSources[sourceLink]
|
||||
di := map[string]interface{}{
|
||||
"source": ConvertSelfLinkToV1(disk.Source),
|
||||
"device_name": disk.DeviceName,
|
||||
@ -1408,13 +1429,24 @@ func resourceComputeInstanceUpdate(d *schema.ResourceData, meta interface{}) err
|
||||
func expandAttachedDisk(diskConfig map[string]interface{}, d *schema.ResourceData, meta interface{}) (*computeBeta.AttachedDisk, error) {
|
||||
config := meta.(*Config)
|
||||
|
||||
source, err := ParseDiskFieldValue(diskConfig["source"].(string), d, config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
s := diskConfig["source"].(string)
|
||||
var sourceLink string
|
||||
if strings.Contains(s, "regions/") {
|
||||
source, err := ParseRegionDiskFieldValue(s, d, config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sourceLink = source.RelativeLink()
|
||||
} else {
|
||||
source, err := ParseDiskFieldValue(s, d, config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sourceLink = source.RelativeLink()
|
||||
}
|
||||
|
||||
disk := &computeBeta.AttachedDisk{
|
||||
Source: source.RelativeLink(),
|
||||
Source: sourceLink,
|
||||
}
|
||||
|
||||
if v, ok := diskConfig["mode"]; ok {
|
||||
|
@ -489,7 +489,7 @@ func performUpdate(config *Config, id string, updateStrategy string, rollingUpda
|
||||
}
|
||||
|
||||
if updateStrategy == "ROLLING_UPDATE" {
|
||||
// UpdatePolicy is set for InstanceGroupManager on update only, because it is only relevant for `Patch` calls.
|
||||
// UpdatePolicy is set for InstanceGroupManager on update only, because it is only relevant for `Update` calls.
|
||||
// Other tools(gcloud and UI) capable of executing the same `ROLLING UPDATE` call
|
||||
// expect those values to be provided by user as part of the call
|
||||
// or provide their own defaults without respecting what was previously set on UpdateManager.
|
||||
@ -499,7 +499,7 @@ func performUpdate(config *Config, id string, updateStrategy string, rollingUpda
|
||||
Versions: versions,
|
||||
}
|
||||
|
||||
op, err := config.clientComputeBeta.InstanceGroupManagers.Patch(project, zone, id, manager).Do()
|
||||
op, err := config.clientComputeBeta.InstanceGroupManagers.Update(project, zone, id, manager).Do()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error updating managed group instances: %s", err)
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ resource "google_compute_address" "internal_with_subnet_and_address" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. The name must be 1-63 characters long, and
|
||||
@ -83,33 +84,38 @@ The following arguments are supported:
|
||||
following characters must be a dash, lowercase letter, or digit,
|
||||
except the last character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `address` -
|
||||
(Optional)
|
||||
The static external IP address represented by this resource. Only
|
||||
IPv4 is supported. An address may only be specified for INTERNAL
|
||||
address types. The IP address must be inside the specified subnetwork,
|
||||
if any.
|
||||
|
||||
* `address_type` -
|
||||
(Optional)
|
||||
The type of address to reserve, either INTERNAL or EXTERNAL.
|
||||
If unspecified, defaults to EXTERNAL.
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `network_tier` -
|
||||
(Optional)
|
||||
The networking tier used for configuring this address. This field can
|
||||
take the following values: PREMIUM or STANDARD. If this field is not
|
||||
specified, it is assumed to be PREMIUM.
|
||||
|
||||
* `subnetwork` -
|
||||
(Optional)
|
||||
The URL of the subnetwork in which to reserve the address. If an IP
|
||||
address is specified, it must be within the subnetwork's IP range.
|
||||
This field can only be used with INTERNAL type with
|
||||
GCE_ENDPOINT/DNS_RESOLVER purposes.
|
||||
|
||||
* `region` -
|
||||
(Optional)
|
||||
The Region in which the created address should reside.
|
||||
@ -122,14 +128,17 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `users` -
|
||||
The URLs of the resources that are using this address.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
||||
|
||||
* `address`: The IP of the created resource.
|
||||
|
||||
## Timeouts
|
||||
|
||||
This resource provides the following
|
||||
|
@ -94,6 +94,7 @@ resource "google_compute_autoscaler" "foobar" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. The name must be 1-63 characters long and match
|
||||
@ -101,31 +102,34 @@ The following arguments are supported:
|
||||
first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `autoscaling_policy` -
|
||||
(Required)
|
||||
The configuration parameters for the autoscaling algorithm. You can
|
||||
define one or more of the policies for an autoscaler: cpuUtilization,
|
||||
customMetricUtilizations, and loadBalancingUtilization.
|
||||
|
||||
If none of these are specified, the default will be to autoscale based
|
||||
on cpuUtilization to 0.6 or 60%. Structure is documented below.
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
URL of the managed instance group that this autoscaler will scale.
|
||||
|
||||
The `autoscaling_policy` block supports:
|
||||
|
||||
* `min_replicas` -
|
||||
(Required)
|
||||
The minimum number of replicas that the autoscaler can scale down
|
||||
to. This cannot be less than 0. If not provided, autoscaler will
|
||||
choose a default value depending on maximum number of instances
|
||||
allowed.
|
||||
|
||||
* `max_replicas` -
|
||||
(Required)
|
||||
The maximum number of instances that the autoscaler can scale up
|
||||
to. This is required when creating or updating an autoscaler. The
|
||||
maximum number of replicas should not be lower than minimal number
|
||||
of replicas.
|
||||
|
||||
* `cooldown_period` -
|
||||
(Optional)
|
||||
The number of seconds that the autoscaler should wait before it
|
||||
@ -133,59 +137,61 @@ The `autoscaling_policy` block supports:
|
||||
the autoscaler from collecting information when the instance is
|
||||
initializing, during which the collected usage would not be
|
||||
reliable. The default time autoscaler waits is 60 seconds.
|
||||
|
||||
Virtual machine initialization times might vary because of
|
||||
numerous factors. We recommend that you test how long an
|
||||
instance may take to initialize. To do this, create an instance
|
||||
and time the startup process.
|
||||
|
||||
* `cpu_utilization` -
|
||||
(Optional)
|
||||
Defines the CPU utilization policy that allows the autoscaler to
|
||||
scale based on the average CPU utilization of a managed instance
|
||||
group. Structure is documented below.
|
||||
|
||||
* `metric` -
|
||||
(Optional)
|
||||
Defines the CPU utilization policy that allows the autoscaler to
|
||||
scale based on the average CPU utilization of a managed instance
|
||||
group. Structure is documented below.
|
||||
|
||||
* `load_balancing_utilization` -
|
||||
(Optional)
|
||||
Configuration parameters of autoscaling based on a load balancer. Structure is documented below.
|
||||
The `cpu_utilization` block supports:
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
The target CPU utilization that the autoscaler should maintain.
|
||||
Must be a float value in the range (0, 1]. If not specified, the
|
||||
default is 0.6.
|
||||
|
||||
If the CPU level is below the target utilization, the autoscaler
|
||||
scales down the number of instances until it reaches the minimum
|
||||
number of instances you specified or until the average CPU of
|
||||
your instances reaches the target utilization.
|
||||
|
||||
If the average CPU is above the target utilization, the autoscaler
|
||||
scales up until it reaches the maximum number of instances you
|
||||
specified or until the average utilization reaches the target
|
||||
utilization.
|
||||
|
||||
The `metric` block supports:
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
The identifier (type) of the Stackdriver Monitoring metric.
|
||||
The metric cannot have negative values.
|
||||
|
||||
The metric must have a value type of INT64 or DOUBLE.
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
The target value of the metric that autoscaler should
|
||||
maintain. This must be a positive value. A utilization
|
||||
metric scales number of virtual machines handling requests
|
||||
to increase or decrease proportionally to the metric.
|
||||
|
||||
For example, a good metric to use as a utilizationTarget is
|
||||
www.googleapis.com/compute/instance/network/received_bytes_count.
|
||||
The autoscaler will work to keep this value constant for each
|
||||
of the instances.
|
||||
|
||||
* `type` -
|
||||
(Required)
|
||||
Defines how target utilization value is expressed for a
|
||||
@ -193,6 +199,7 @@ The `autoscaling_policy` block supports:
|
||||
or DELTA_PER_MINUTE.
|
||||
|
||||
The `load_balancing_utilization` block supports:
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
Fraction of backend capacity utilization (set in HTTP(s) load
|
||||
@ -202,9 +209,11 @@ The `autoscaling_policy` block supports:
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `zone` -
|
||||
(Optional)
|
||||
URL of the zone where the instance group resides.
|
||||
@ -216,6 +225,7 @@ The `autoscaling_policy` block supports:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -56,9 +56,11 @@ resource "google_storage_bucket" "image_bucket" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `bucket_name` -
|
||||
(Required)
|
||||
Cloud Storage bucket name.
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -69,13 +71,14 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the
|
||||
last character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional textual description of the resource; provided by the
|
||||
client when the resource is created.
|
||||
|
||||
* `enable_cdn` -
|
||||
(Optional)
|
||||
If true, enable Cloud CDN for this BackendBucket.
|
||||
@ -87,6 +90,7 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -66,6 +66,7 @@ resource "google_compute_disk" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -76,26 +77,28 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource. Provide this property when
|
||||
you create the resource.
|
||||
|
||||
* `labels` -
|
||||
(Optional)
|
||||
Labels to apply to this disk. A list of key->value pairs.
|
||||
|
||||
* `size` -
|
||||
(Optional)
|
||||
Size of the persistent disk, specified in GB. You can specify this
|
||||
field when creating a persistent disk using the sourceImage or
|
||||
sourceSnapshot parameter, or specify it alone to create an empty
|
||||
persistent disk.
|
||||
|
||||
If you specify this field along with sourceImage or sourceSnapshot,
|
||||
the value of sizeGb must not be less than the size of the sourceImage
|
||||
or the size of the snapshot.
|
||||
|
||||
* `image` -
|
||||
(Optional)
|
||||
The image from which to initialize this disk. This can be
|
||||
@ -107,42 +110,44 @@ The following arguments are supported:
|
||||
[google_compute_image data source](/docs/providers/google/d/datasource_compute_image.html).
|
||||
For instance, the image `centos-6-v20180104` includes its family name `centos-6`.
|
||||
These images can be referred by family name here.
|
||||
|
||||
* `type` -
|
||||
(Optional)
|
||||
URL of the disk type resource describing which disk type to use to
|
||||
create the disk. Provide this when creating the disk.
|
||||
|
||||
* `zone` -
|
||||
(Optional)
|
||||
A reference to the zone where the disk resides.
|
||||
|
||||
* `disk_encryption_key` -
|
||||
(Optional)
|
||||
Encrypts the disk using a customer-supplied encryption key.
|
||||
|
||||
After you encrypt a disk with a customer-supplied key, you must
|
||||
provide the same key if you use the disk later (e.g. to create a disk
|
||||
snapshot or an image, or to attach the disk to a virtual machine).
|
||||
|
||||
Customer-supplied encryption keys do not protect access to metadata of
|
||||
the disk.
|
||||
|
||||
If you do not provide an encryption key when creating the disk, then
|
||||
the disk will be encrypted using an automatically generated key and
|
||||
you do not need to provide a key to use the disk later. Structure is documented below.
|
||||
|
||||
* `source_image_encryption_key` -
|
||||
(Optional)
|
||||
The customer-supplied encryption key of the source image. Required if
|
||||
the source image is protected by a customer-supplied encryption key. Structure is documented below.
|
||||
|
||||
* `snapshot` -
|
||||
(Optional)
|
||||
The source snapshot used to create this disk. You can provide this as
|
||||
a partial or full URL to the resource. For example, the following are
|
||||
valid values:
|
||||
|
||||
* https://www.googleapis.com/compute/v1/projects/project/global/
|
||||
snapshots/snapshot
|
||||
* projects/project/global/snapshots/snapshot
|
||||
* global/snapshots/snapshot
|
||||
* snapshot
|
||||
|
||||
* `source_snapshot_encryption_key` -
|
||||
(Optional)
|
||||
The customer-supplied encryption key of the source snapshot. Required
|
||||
@ -152,28 +157,34 @@ The following arguments are supported:
|
||||
If it is not provided, the provider project is used.
|
||||
|
||||
The `disk_encryption_key` block supports:
|
||||
|
||||
* `raw_key` -
|
||||
(Optional)
|
||||
Specifies a 256-bit customer-supplied encryption key, encoded in
|
||||
RFC 4648 base64 to either encrypt or decrypt this resource.
|
||||
|
||||
* `sha256` -
|
||||
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
|
||||
encryption key that protects this resource.
|
||||
|
||||
The `source_image_encryption_key` block supports:
|
||||
|
||||
* `raw_key` -
|
||||
(Optional)
|
||||
Specifies a 256-bit customer-supplied encryption key, encoded in
|
||||
RFC 4648 base64 to either encrypt or decrypt this resource.
|
||||
|
||||
* `sha256` -
|
||||
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
|
||||
encryption key that protects this resource.
|
||||
|
||||
The `source_snapshot_encryption_key` block supports:
|
||||
|
||||
* `raw_key` -
|
||||
(Optional)
|
||||
Specifies a 256-bit customer-supplied encryption key, encoded in
|
||||
RFC 4648 base64 to either encrypt or decrypt this resource.
|
||||
|
||||
* `sha256` -
|
||||
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
|
||||
encryption key that protects this resource.
|
||||
@ -183,28 +194,36 @@ The `source_snapshot_encryption_key` block supports:
|
||||
`disk_encryption_key.raw_key`. It is deprecated to enhance
|
||||
consistency with `source_image_encryption_key` and
|
||||
`source_snapshot_encryption_key`.
|
||||
|
||||
## Attributes Reference
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `label_fingerprint` -
|
||||
The fingerprint used for optimistic locking of this resource. Used
|
||||
internally during updates.
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `last_attach_timestamp` -
|
||||
Last attach timestamp in RFC3339 text format.
|
||||
|
||||
* `last_detach_timestamp` -
|
||||
Last dettach timestamp in RFC3339 text format.
|
||||
|
||||
* `users` -
|
||||
Links to the users of the disk (attached instances) in form:
|
||||
project/zones/zone/instances/instance
|
||||
|
||||
* `source_image_id` -
|
||||
The ID value of the image used to create this disk. This value
|
||||
identifies the exact image that was used to create this persistent
|
||||
disk. For example, if you created the persistent disk from an image
|
||||
that was later deleted and recreated under the same name, the source
|
||||
image ID would identify the exact version of the image that was used.
|
||||
|
||||
* `source_snapshot_id` -
|
||||
The unique ID of the snapshot used to create this disk. This value
|
||||
identifies the exact snapshot that was used to create this persistent
|
||||
@ -219,6 +238,7 @@ In addition to the arguments listed above, the following computed attributes are
|
||||
`disk_encryption_key.sha256`. It is deprecated to enhance
|
||||
consistency with `source_image_encryption_key` and
|
||||
`source_snapshot_encryption_key`.
|
||||
|
||||
## Timeouts
|
||||
|
||||
This resource provides the following
|
||||
|
@ -45,6 +45,7 @@ resource "google_compute_forwarding_rule" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource; provided by the client when the resource is
|
||||
@ -55,20 +56,19 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource. Provide this property when
|
||||
you create the resource.
|
||||
|
||||
* `ip_address` -
|
||||
(Optional)
|
||||
The IP address that this forwarding rule is serving on behalf of.
|
||||
|
||||
Addresses are restricted based on the forwarding rule's load balancing
|
||||
scheme (EXTERNAL or INTERNAL) and scope (global or regional).
|
||||
|
||||
When the load balancing scheme is EXTERNAL, for global forwarding
|
||||
rules, the address must be a global IP, and for regional forwarding
|
||||
rules, the address must live in the same region as the forwarding
|
||||
@ -76,17 +76,14 @@ The following arguments are supported:
|
||||
scope (global or regional) will be assigned. A regional forwarding
|
||||
rule supports IPv4 only. A global forwarding rule supports either IPv4
|
||||
or IPv6.
|
||||
|
||||
When the load balancing scheme is INTERNAL, this can only be an RFC
|
||||
1918 IP address belonging to the network/subnet configured for the
|
||||
forwarding rule. By default, if this field is empty, an ephemeral
|
||||
internal IP address will be automatically allocated from the IP range
|
||||
of the subnet or network configured for this forwarding rule.
|
||||
|
||||
An address can be specified either by a literal IP address or a URL
|
||||
reference to an existing Address resource. The following examples are
|
||||
all valid:
|
||||
|
||||
* 100.1.2.3
|
||||
* https://www.googleapis.com/compute/v1/projects/project/regions/
|
||||
region/addresses/address
|
||||
@ -94,24 +91,26 @@ The following arguments are supported:
|
||||
* regions/region/addresses/address
|
||||
* global/addresses/address
|
||||
* address
|
||||
|
||||
* `ip_protocol` -
|
||||
(Optional)
|
||||
The IP protocol to which this rule applies. Valid options are TCP,
|
||||
UDP, ESP, AH, SCTP or ICMP.
|
||||
|
||||
When the load balancing scheme is INTERNAL, only TCP and UDP are
|
||||
valid.
|
||||
|
||||
* `backend_service` -
|
||||
(Optional)
|
||||
A reference to a BackendService to receive the matched traffic.
|
||||
|
||||
This is used for internal load balancing.
|
||||
(not used for external load balancing)
|
||||
|
||||
* `ip_version` -
|
||||
(Optional)
|
||||
The IP Version that will be used by this forwarding rule. Valid
|
||||
options are IPV4 or IPV6. This can only be specified for a global
|
||||
forwarding rule.
|
||||
|
||||
* `load_balancing_scheme` -
|
||||
(Optional)
|
||||
This signifies what the ForwardingRule will be used for and can only
|
||||
@ -119,27 +118,25 @@ The following arguments are supported:
|
||||
means that this will be used for Internal Network Load Balancing (TCP,
|
||||
UDP). The value of EXTERNAL means that this will be used for External
|
||||
Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy)
|
||||
|
||||
* `network` -
|
||||
(Optional)
|
||||
For internal load balancing, this field identifies the network that
|
||||
the load balanced IP should belong to for this Forwarding Rule. If
|
||||
this field is not specified, the default network will be used.
|
||||
|
||||
This field is not used for external load balancing.
|
||||
|
||||
* `port_range` -
|
||||
(Optional)
|
||||
This field is used along with the target field for TargetHttpProxy,
|
||||
TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway,
|
||||
TargetPool, TargetInstance.
|
||||
|
||||
Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets
|
||||
addressed to ports in the specified range will be forwarded to target.
|
||||
Forwarding rules with the same [IPAddress, IPProtocol] pair must have
|
||||
disjoint port ranges.
|
||||
|
||||
Some types of forwarding target have constraints on the acceptable
|
||||
ports:
|
||||
|
||||
* TargetHttpProxy: 80, 8080
|
||||
* TargetHttpsProxy: 443
|
||||
* TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995,
|
||||
@ -147,29 +144,27 @@ The following arguments are supported:
|
||||
* TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995,
|
||||
1883, 5222
|
||||
* TargetVpnGateway: 500, 4500
|
||||
|
||||
* `ports` -
|
||||
(Optional)
|
||||
This field is used along with the backend_service field for internal
|
||||
load balancing.
|
||||
|
||||
When the load balancing scheme is INTERNAL, a single port or a comma
|
||||
separated list of ports can be configured. Only packets addressed to
|
||||
these ports will be forwarded to the backends configured with this
|
||||
forwarding rule.
|
||||
|
||||
You may specify a maximum of up to 5 ports.
|
||||
|
||||
* `subnetwork` -
|
||||
(Optional)
|
||||
A reference to a subnetwork.
|
||||
|
||||
For internal load balancing, this field identifies the subnetwork that
|
||||
the load balanced IP should belong to for this Forwarding Rule.
|
||||
|
||||
If the network specified is in auto subnet mode, this field is
|
||||
optional. However, if the network is in custom subnet mode, a
|
||||
subnetwork must be specified.
|
||||
|
||||
This field is not used for external load balancing.
|
||||
|
||||
* `target` -
|
||||
(Optional)
|
||||
A reference to a TargetPool resource to receive the matched traffic.
|
||||
@ -177,30 +172,31 @@ The following arguments are supported:
|
||||
region as the forwarding rule. For global forwarding rules, this
|
||||
target must be a global load balancing resource. The forwarded traffic
|
||||
must be of a type appropriate to the target object.
|
||||
|
||||
This field is not used for internal load balancing.
|
||||
|
||||
* `labels` -
|
||||
(Optional)
|
||||
Labels to apply to this forwarding rule. A list of key->value pairs.
|
||||
|
||||
* `network_tier` -
|
||||
(Optional)
|
||||
The networking tier used for configuring this address. This field can
|
||||
take the following values: PREMIUM or STANDARD. If this field is not
|
||||
specified, it is assumed to be PREMIUM.
|
||||
|
||||
* `service_label` -
|
||||
(Optional)
|
||||
An optional prefix to the service name for this Forwarding Rule.
|
||||
If specified, will be the first label of the fully qualified service
|
||||
name.
|
||||
|
||||
The label must be 1-63 characters long, and comply with RFC1035.
|
||||
Specifically, the label must be 1-63 characters long and match the
|
||||
regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
|
||||
character must be a lowercase letter, and all following characters
|
||||
must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
This field is only used for internal load balancing.
|
||||
|
||||
* `region` -
|
||||
(Optional)
|
||||
A reference to the region where the regional forwarding rule resides.
|
||||
@ -213,11 +209,14 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `label_fingerprint` -
|
||||
The fingerprint used for optimistic locking of this resource. Used
|
||||
internally during updates.
|
||||
|
||||
* `service_name` -
|
||||
The internal fully qualified service name for this Forwarding Rule.
|
||||
This field is only used for internal load balancing.
|
||||
|
@ -42,6 +42,7 @@ resource "google_compute_global_address" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -52,13 +53,14 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
Provide this property when you create the resource.
|
||||
|
||||
* `ip_version` -
|
||||
(Optional)
|
||||
The IP Version that will be used by this address. Valid options are
|
||||
@ -71,8 +73,10 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `address` -
|
||||
The static external IP address represented by this resource.
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -53,6 +53,7 @@ resource "google_compute_http_health_check" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -63,39 +64,46 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the
|
||||
last character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `check_interval_sec` -
|
||||
(Optional)
|
||||
How often (in seconds) to send a health check. The default value is 5
|
||||
seconds.
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource. Provide this property when
|
||||
you create the resource.
|
||||
|
||||
* `healthy_threshold` -
|
||||
(Optional)
|
||||
A so-far unhealthy instance will be marked healthy after this many
|
||||
consecutive successes. The default value is 2.
|
||||
|
||||
* `host` -
|
||||
(Optional)
|
||||
The value of the host header in the HTTP health check request. If
|
||||
left empty (default value), the public IP on behalf of which this
|
||||
health check is performed will be used.
|
||||
|
||||
* `port` -
|
||||
(Optional)
|
||||
The TCP port number for the HTTP health check request.
|
||||
The default value is 80.
|
||||
|
||||
* `request_path` -
|
||||
(Optional)
|
||||
The request path of the HTTP health check request.
|
||||
The default value is /.
|
||||
|
||||
* `timeout_sec` -
|
||||
(Optional)
|
||||
How long (in seconds) to wait before claiming failure.
|
||||
The default value is 5 seconds. It is invalid for timeoutSec to have
|
||||
greater value than checkIntervalSec.
|
||||
|
||||
* `unhealthy_threshold` -
|
||||
(Optional)
|
||||
A so-far healthy instance will be marked unhealthy after this many
|
||||
@ -108,6 +116,7 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -53,6 +53,7 @@ resource "google_compute_https_health_check" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -63,39 +64,46 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the
|
||||
last character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `check_interval_sec` -
|
||||
(Optional)
|
||||
How often (in seconds) to send a health check. The default value is 5
|
||||
seconds.
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource. Provide this property when
|
||||
you create the resource.
|
||||
|
||||
* `healthy_threshold` -
|
||||
(Optional)
|
||||
A so-far unhealthy instance will be marked healthy after this many
|
||||
consecutive successes. The default value is 2.
|
||||
|
||||
* `host` -
|
||||
(Optional)
|
||||
The value of the host header in the HTTPS health check request. If
|
||||
left empty (default value), the public IP on behalf of which this
|
||||
health check is performed will be used.
|
||||
|
||||
* `port` -
|
||||
(Optional)
|
||||
The TCP port number for the HTTPS health check request.
|
||||
The default value is 80.
|
||||
|
||||
* `request_path` -
|
||||
(Optional)
|
||||
The request path of the HTTPS health check request.
|
||||
The default value is /.
|
||||
|
||||
* `timeout_sec` -
|
||||
(Optional)
|
||||
How long (in seconds) to wait before claiming failure.
|
||||
The default value is 5 seconds. It is invalid for timeoutSec to have
|
||||
greater value than checkIntervalSec.
|
||||
|
||||
* `unhealthy_threshold` -
|
||||
(Optional)
|
||||
A so-far healthy instance will be marked unhealthy after this many
|
||||
@ -108,6 +116,7 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -22,6 +22,10 @@ resource "google_compute_image" "bootable-image" {
|
||||
raw_disk {
|
||||
source = "https://storage.googleapis.com/my-bucket/my-disk-image-tarball.tar.gz"
|
||||
}
|
||||
|
||||
licenses = [
|
||||
"https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx",
|
||||
]
|
||||
}
|
||||
|
||||
resource "google_compute_instance" "vm" {
|
||||
@ -67,6 +71,9 @@ The following arguments are supported: (Note that one of either source_disk or
|
||||
Changing this forces a new resource to be created. Structure is documented
|
||||
below.
|
||||
|
||||
* `licenses` - (Optional) A list of license URIs to apply to this image. Changing this
|
||||
forces a new resource to be created.
|
||||
|
||||
* `create_timeout` - (Deprecated) Configurable timeout in minutes for creating images. Default is 4 minutes.
|
||||
|
||||
The `raw_disk` block supports:
|
||||
|
@ -206,7 +206,8 @@ The `disk` block supports:
|
||||
read-write mode.
|
||||
|
||||
* `source` - (Required if source_image not set) The name of the disk (such as
|
||||
those managed by `google_compute_disk`) to attach.
|
||||
those managed by `google_compute_disk`) to attach. This cannot be a regional
|
||||
disk.
|
||||
|
||||
* `disk_type` - (Optional) The GCE disk type. Can be either `"pd-ssd"`,
|
||||
`"local-ssd"`, or `"pd-standard"`.
|
||||
|
@ -94,6 +94,7 @@ resource "google_compute_region_autoscaler" "foobar" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. The name must be 1-63 characters long and match
|
||||
@ -101,31 +102,34 @@ The following arguments are supported:
|
||||
first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `autoscaling_policy` -
|
||||
(Required)
|
||||
The configuration parameters for the autoscaling algorithm. You can
|
||||
define one or more of the policies for an autoscaler: cpuUtilization,
|
||||
customMetricUtilizations, and loadBalancingUtilization.
|
||||
|
||||
If none of these are specified, the default will be to autoscale based
|
||||
on cpuUtilization to 0.6 or 60%. Structure is documented below.
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
URL of the managed instance group that this autoscaler will scale.
|
||||
|
||||
The `autoscaling_policy` block supports:
|
||||
|
||||
* `min_replicas` -
|
||||
(Required)
|
||||
The minimum number of replicas that the autoscaler can scale down
|
||||
to. This cannot be less than 0. If not provided, autoscaler will
|
||||
choose a default value depending on maximum number of instances
|
||||
allowed.
|
||||
|
||||
* `max_replicas` -
|
||||
(Required)
|
||||
The maximum number of instances that the autoscaler can scale up
|
||||
to. This is required when creating or updating an autoscaler. The
|
||||
maximum number of replicas should not be lower than minimal number
|
||||
of replicas.
|
||||
|
||||
* `cooldown_period` -
|
||||
(Optional)
|
||||
The number of seconds that the autoscaler should wait before it
|
||||
@ -133,59 +137,61 @@ The `autoscaling_policy` block supports:
|
||||
the autoscaler from collecting information when the instance is
|
||||
initializing, during which the collected usage would not be
|
||||
reliable. The default time autoscaler waits is 60 seconds.
|
||||
|
||||
Virtual machine initialization times might vary because of
|
||||
numerous factors. We recommend that you test how long an
|
||||
instance may take to initialize. To do this, create an instance
|
||||
and time the startup process.
|
||||
|
||||
* `cpu_utilization` -
|
||||
(Optional)
|
||||
Defines the CPU utilization policy that allows the autoscaler to
|
||||
scale based on the average CPU utilization of a managed instance
|
||||
group. Structure is documented below.
|
||||
|
||||
* `metric` -
|
||||
(Optional)
|
||||
Defines the CPU utilization policy that allows the autoscaler to
|
||||
scale based on the average CPU utilization of a managed instance
|
||||
group. Structure is documented below.
|
||||
|
||||
* `load_balancing_utilization` -
|
||||
(Optional)
|
||||
Configuration parameters of autoscaling based on a load balancer. Structure is documented below.
|
||||
The `cpu_utilization` block supports:
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
The target CPU utilization that the autoscaler should maintain.
|
||||
Must be a float value in the range (0, 1]. If not specified, the
|
||||
default is 0.6.
|
||||
|
||||
If the CPU level is below the target utilization, the autoscaler
|
||||
scales down the number of instances until it reaches the minimum
|
||||
number of instances you specified or until the average CPU of
|
||||
your instances reaches the target utilization.
|
||||
|
||||
If the average CPU is above the target utilization, the autoscaler
|
||||
scales up until it reaches the maximum number of instances you
|
||||
specified or until the average utilization reaches the target
|
||||
utilization.
|
||||
|
||||
The `metric` block supports:
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
The identifier (type) of the Stackdriver Monitoring metric.
|
||||
The metric cannot have negative values.
|
||||
|
||||
The metric must have a value type of INT64 or DOUBLE.
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
The target value of the metric that autoscaler should
|
||||
maintain. This must be a positive value. A utilization
|
||||
metric scales number of virtual machines handling requests
|
||||
to increase or decrease proportionally to the metric.
|
||||
|
||||
For example, a good metric to use as a utilizationTarget is
|
||||
www.googleapis.com/compute/instance/network/received_bytes_count.
|
||||
The autoscaler will work to keep this value constant for each
|
||||
of the instances.
|
||||
|
||||
* `type` -
|
||||
(Required)
|
||||
Defines how target utilization value is expressed for a
|
||||
@ -193,6 +199,7 @@ The `autoscaling_policy` block supports:
|
||||
or DELTA_PER_MINUTE.
|
||||
|
||||
The `load_balancing_utilization` block supports:
|
||||
|
||||
* `target` -
|
||||
(Required)
|
||||
Fraction of backend capacity utilization (set in HTTP(s) load
|
||||
@ -202,9 +209,11 @@ The `autoscaling_policy` block supports:
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `region` -
|
||||
(Optional)
|
||||
URL of the region where the instance group resides.
|
||||
@ -216,6 +225,7 @@ The `autoscaling_policy` block supports:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -76,10 +76,12 @@ resource "google_compute_route" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `dest_range` -
|
||||
(Required)
|
||||
The destination range of outgoing packets that this route applies to.
|
||||
Only IPv4 is supported.
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -89,53 +91,54 @@ The following arguments are supported:
|
||||
the first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the
|
||||
last character, which cannot be a dash.
|
||||
|
||||
* `network` -
|
||||
(Required)
|
||||
The network that this route applies to.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource. Provide this property
|
||||
when you create the resource.
|
||||
|
||||
* `priority` -
|
||||
(Optional)
|
||||
The priority of this route. Priority is used to break ties in cases
|
||||
where there is more than one matching route of equal prefix length.
|
||||
|
||||
In the case of two routes with equal prefix length, the one with the
|
||||
lowest-numbered priority value wins.
|
||||
|
||||
Default value is 1000. Valid range is 0 through 65535.
|
||||
|
||||
* `tags` -
|
||||
(Optional)
|
||||
A list of instance tags to which this route applies.
|
||||
|
||||
* `next_hop_gateway` -
|
||||
(Optional)
|
||||
URL to a gateway that should handle matching packets.
|
||||
|
||||
Currently, you can only specify the internet gateway, using a full or
|
||||
partial valid URL:
|
||||
* `https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway`
|
||||
* `projects/project/global/gateways/default-internet-gateway`
|
||||
* `global/gateways/default-internet-gateway`
|
||||
* The string `default-internet-gateway`.
|
||||
|
||||
* https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway
|
||||
* projects/project/global/gateways/default-internet-gateway
|
||||
* global/gateways/default-internet-gateway
|
||||
You can also provide the string 'default-internet-gateway'.
|
||||
* `next_hop_instance` -
|
||||
(Optional)
|
||||
URL to an instance that should handle matching packets.
|
||||
You can specify this as a full or partial URL. For example:
|
||||
* `https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance`
|
||||
* `projects/project/zones/zone/instances/instance`
|
||||
* `zones/zone/instances/instance`
|
||||
* Just the instance name, with the zone in `next_hop_instance_zone`.
|
||||
|
||||
* https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance
|
||||
* projects/project/zones/zone/instances/instance
|
||||
* zones/zone/instances/instance
|
||||
You can also provide just the instance name, with the zone in
|
||||
`next_hop_instance_zone`.
|
||||
* `next_hop_ip` -
|
||||
(Optional)
|
||||
Network IP address of an instance that should handle matching packets.
|
||||
|
||||
* `next_hop_vpn_tunnel` -
|
||||
(Optional)
|
||||
URL to a VpnTunnel that should handle matching packets.
|
||||
@ -147,10 +150,13 @@ The following arguments are supported:
|
||||
specified) The zone of the instance specified in
|
||||
`next_hop_instance`. Omit if `next_hop_instance` is specified as
|
||||
a URL.
|
||||
|
||||
|
||||
## Attributes Reference
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `next_hop_network` -
|
||||
URL to a Network that should handle matching packets.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -22,6 +22,35 @@ resource "google_compute_ssl_certificate" "default" {
|
||||
description = "a description"
|
||||
private_key = "${file("path/to/private.key")}"
|
||||
certificate = "${file("path/to/certificate.crt")}"
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
}
|
||||
}
|
||||
|
||||
# You may also want to control name generation explicitly:
|
||||
|
||||
resource "random_id" "certificate" {
|
||||
byte_length = 4
|
||||
prefix = "my-certificate-"
|
||||
|
||||
# For security, do not expose raw certificate values in the output
|
||||
keepers {
|
||||
private_key = "${base64sha256(file("path/to/private.key"))}"
|
||||
certificate = "${base64sha256(file("path/to/certificate.crt"))}"
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_compute_ssl_certificate" "default" {
|
||||
# The name will contain 8 random hex digits,
|
||||
# e.g. "my-certificate-48ab27cd2a"
|
||||
name = "${random_id.certificate.hex}"
|
||||
private_key = "${file("path/to/private.key")}"
|
||||
certificate = "${file("path/to/certificate.crt")}"
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@ -32,8 +61,8 @@ specified configuration, Terraform will destroy the existing resource
|
||||
and create a replacement. To effectively use an SSL certificate resource
|
||||
with a [Target HTTPS Proxy resource][1], it's recommended to specify
|
||||
`create_before_destroy` in a [lifecycle][2] block. Either omit the
|
||||
Instance Template `name` attribute, or specify a partial name with
|
||||
`name_prefix`. Example:
|
||||
Instance Template `name` attribute, specify a partial name with
|
||||
`name_prefix`, or use [random_id][3] resource. Example:
|
||||
|
||||
```hcl
|
||||
resource "google_compute_ssl_certificate" "default" {
|
||||
@ -90,6 +119,7 @@ exported:
|
||||
|
||||
[1]: /docs/providers/google/r/compute_target_https_proxy.html
|
||||
[2]: /docs/configuration/resources.html#lifecycle
|
||||
[3]: /docs/providers/random/r/id.html
|
||||
|
||||
## Import
|
||||
|
||||
|
@ -56,6 +56,7 @@ resource "google_compute_ssl_policy" "custom-ssl-policy" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -66,12 +67,13 @@ The following arguments are supported:
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `profile` -
|
||||
(Optional)
|
||||
Profile specifies the set of SSL features that can be used by the
|
||||
@ -79,17 +81,18 @@ The following arguments are supported:
|
||||
`COMPATIBLE`, `MODERN`, `RESTRICTED`, or `CUSTOM`. If using `CUSTOM`,
|
||||
the set of SSL features to enable must be specified in the
|
||||
`customFeatures` field.
|
||||
|
||||
See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport)
|
||||
for information on what cipher suites each profile provides. If
|
||||
`CUSTOM` is used, the `custom_features` attribute **must be set**.
|
||||
Default is `COMPATIBLE`.
|
||||
|
||||
* `min_tls_version` -
|
||||
(Optional)
|
||||
The minimum version of SSL protocol that can be used by the clients
|
||||
to establish a connection with the load balancer. This can be one of
|
||||
`TLS_1_0`, `TLS_1_1`, `TLS_1_2`.
|
||||
Default is `TLS_1_0`.
|
||||
|
||||
* `custom_features` -
|
||||
(Optional)
|
||||
Profile specifies the set of SSL features that can be used by the
|
||||
@ -97,7 +100,6 @@ The following arguments are supported:
|
||||
`COMPATIBLE`, `MODERN`, `RESTRICTED`, or `CUSTOM`. If using `CUSTOM`,
|
||||
the set of SSL features to enable must be specified in the
|
||||
`customFeatures` field.
|
||||
|
||||
See the [official documentation](https://cloud.google.com/compute/docs/load-balancing/ssl-policies#profilefeaturesupport)
|
||||
for which ciphers are available to use. **Note**: this argument
|
||||
*must* be present when using the `CUSTOM` profile. This argument
|
||||
@ -110,10 +112,13 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `enabled_features` -
|
||||
The list of features enabled in the SSL policy.
|
||||
|
||||
* `fingerprint` -
|
||||
Fingerprint of this resource. A hash of the contents stored in this
|
||||
object. This field is used in optimistic locking.
|
||||
|
@ -76,12 +76,14 @@ To get more information about Subnetwork, see:
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `ip_cidr_range` -
|
||||
(Required)
|
||||
The range of internal addresses that are owned by this subnetwork.
|
||||
Provide this property when you create the subnetwork. For example,
|
||||
10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and
|
||||
non-overlapping within a network. Only IPv4 is supported.
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
The name of the resource, provided by the client when initially
|
||||
@ -91,32 +93,37 @@ The following arguments are supported:
|
||||
means the first character must be a lowercase letter, and all
|
||||
following characters must be a dash, lowercase letter, or digit,
|
||||
except the last character, which cannot be a dash.
|
||||
|
||||
* `network` -
|
||||
(Required)
|
||||
The network this subnet belongs to.
|
||||
Only networks that are in the distributed mode can have subnetworks.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource. Provide this property when
|
||||
you create the resource. This field can be set only at resource
|
||||
creation time.
|
||||
|
||||
* `enable_flow_logs` -
|
||||
(Optional)
|
||||
Whether to enable flow logging for this subnetwork.
|
||||
|
||||
* `secondary_ip_range` -
|
||||
(Optional)
|
||||
An array of configurations for secondary IP ranges for VM instances
|
||||
contained in this subnetwork. The primary IP of such VM must belong
|
||||
to the primary ipCidrRange of the subnetwork. The alias IPs may belong
|
||||
to either primary or secondary ranges. Structure is documented below.
|
||||
|
||||
* `private_ip_google_access` -
|
||||
(Optional)
|
||||
Whether the VMs in this subnet can access Google services without
|
||||
assigned external IP addresses.
|
||||
|
||||
* `region` -
|
||||
(Optional)
|
||||
URL of the GCP region for this subnetwork.
|
||||
@ -124,12 +131,14 @@ The following arguments are supported:
|
||||
If it is not provided, the provider project is used.
|
||||
|
||||
The `secondary_ip_range` block supports:
|
||||
|
||||
* `range_name` -
|
||||
(Required)
|
||||
The name associated with this subnetwork secondary range, used
|
||||
when adding an alias IP range to a VM instance. The name must
|
||||
be 1-63 characters long, and comply with RFC1035. The name
|
||||
must be unique within the subnetwork.
|
||||
|
||||
* `ip_cidr_range` -
|
||||
(Required)
|
||||
The range of IP addresses belonging to this subnetwork secondary
|
||||
@ -142,11 +151,14 @@ The `secondary_ip_range` block supports:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `gateway_address` -
|
||||
The gateway address for default routes to reach destination addresses
|
||||
outside this subnetwork.
|
||||
|
||||
* `fingerprint` -
|
||||
Fingerprint of this resource. This field is used internally during
|
||||
updates of this resource.
|
||||
|
@ -83,6 +83,7 @@ resource "google_compute_http_health_check" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -92,14 +93,15 @@ The following arguments are supported:
|
||||
first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `url_map` -
|
||||
(Required)
|
||||
A reference to the UrlMap resource that defines the mapping from URL
|
||||
to the BackendService.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
@ -111,8 +113,10 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `proxy_id` -
|
||||
The unique identifier for the resource.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -91,6 +91,7 @@ resource "google_compute_http_health_check" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -100,22 +101,25 @@ The following arguments are supported:
|
||||
first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `ssl_certificates` -
|
||||
(Required)
|
||||
A list of SslCertificate resources that are used to authenticate
|
||||
connections between users and the load balancer. Currently, exactly
|
||||
one SSL certificate must be specified.
|
||||
|
||||
* `url_map` -
|
||||
(Required)
|
||||
A reference to the UrlMap resource that defines the mapping from URL
|
||||
to the BackendService.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `quic_override` -
|
||||
(Optional)
|
||||
Specifies the QUIC override policy for this resource. This determines
|
||||
@ -124,6 +128,7 @@ The following arguments are supported:
|
||||
specified, uses the QUIC policy with no user overrides, which is
|
||||
equivalent to DISABLE. Not specifying this field is equivalent to
|
||||
specifying NONE.
|
||||
|
||||
* `ssl_policy` -
|
||||
(Optional)
|
||||
A reference to the SslPolicy resource that will be associated with
|
||||
@ -137,8 +142,10 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `proxy_id` -
|
||||
The unique identifier for the resource.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -68,6 +68,7 @@ resource "google_compute_health_check" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -77,25 +78,29 @@ The following arguments are supported:
|
||||
first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `backend_service` -
|
||||
(Required)
|
||||
A reference to the BackendService resource.
|
||||
|
||||
* `ssl_certificates` -
|
||||
(Required)
|
||||
A list of SslCertificate resources that are used to authenticate
|
||||
connections between users and the load balancer. Currently, exactly
|
||||
one SSL certificate must be specified.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `proxy_header` -
|
||||
(Optional)
|
||||
Specifies the type of proxy header to append before sending data to
|
||||
the backend, either NONE or PROXY_V1. The default is NONE.
|
||||
|
||||
* `ssl_policy` -
|
||||
(Optional)
|
||||
A reference to the SslPolicy resource that will be associated with
|
||||
@ -109,8 +114,10 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `proxy_id` -
|
||||
The unique identifier for the resource.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -65,6 +65,7 @@ resource "google_compute_health_check" "default" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -74,16 +75,18 @@ The following arguments are supported:
|
||||
first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `backend_service` -
|
||||
(Required)
|
||||
A reference to the BackendService resource.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `proxy_header` -
|
||||
(Optional)
|
||||
Specifies the type of proxy header to append before sending data to
|
||||
@ -96,8 +99,10 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
|
||||
* `proxy_id` -
|
||||
The unique identifier for the resource.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -102,6 +102,7 @@ resource "google_compute_route" "route1" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
Name of the resource. Provided by the client when the resource is
|
||||
@ -111,16 +112,18 @@ The following arguments are supported:
|
||||
the first character must be a lowercase letter, and all following
|
||||
characters must be a dash, lowercase letter, or digit, except the last
|
||||
character, which cannot be a dash.
|
||||
|
||||
* `network` -
|
||||
(Required)
|
||||
The network this VPN gateway is accepting traffic for.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `description` -
|
||||
(Optional)
|
||||
An optional description of this resource.
|
||||
|
||||
* `region` -
|
||||
(Optional)
|
||||
The region this gateway should sit in.
|
||||
@ -132,6 +135,7 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `creation_timestamp` -
|
||||
Creation timestamp in RFC3339 text format.
|
||||
* `self_link` - The URI of the created resource.
|
||||
|
@ -71,36 +71,43 @@ resource "google_redis_instance" "test" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `name` -
|
||||
(Required)
|
||||
The ID of the instance or a fully qualified identifier for the instance.
|
||||
|
||||
* `memory_size_gb` -
|
||||
(Required)
|
||||
Redis memory size in GiB.
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
* `alternative_location_id` -
|
||||
(Optional)
|
||||
Only applicable to STANDARD_HA tier which protects the instance
|
||||
against zonal failures by provisioning it across two zones.
|
||||
If provided, it must be a different zone from the one provided in
|
||||
[locationId].
|
||||
|
||||
* `authorized_network` -
|
||||
(Optional)
|
||||
The full name of the Google Compute Engine network to which the
|
||||
instance is connected. If left unspecified, the default network
|
||||
will be used.
|
||||
|
||||
* `display_name` -
|
||||
(Optional)
|
||||
An arbitrary and optional user-provided name for the instance.
|
||||
|
||||
* `labels` -
|
||||
(Optional)
|
||||
Resource labels to represent user provided metadata.
|
||||
|
||||
* `redis_configs` -
|
||||
(Optional)
|
||||
Redis configuration parameters, according to http://redis.io/topics/config.
|
||||
|
||||
* `location_id` -
|
||||
(Optional)
|
||||
The zone where the instance will be provisioned. If not provided,
|
||||
@ -108,12 +115,14 @@ The following arguments are supported:
|
||||
instances will be created across two zones for protection against
|
||||
zonal failures. If [alternativeLocationId] is also provided, it must
|
||||
be different from [locationId].
|
||||
|
||||
* `redis_version` -
|
||||
(Optional)
|
||||
The version of Redis software. If not provided, latest supported
|
||||
version will be used. Updating the version will perform an
|
||||
upgrade/downgrade to the new version. Currently, the supported values
|
||||
are REDIS_3_2 for Redis 3.2.
|
||||
|
||||
* `reserved_ip_range` -
|
||||
(Optional)
|
||||
The CIDR range of internal addresses that are reserved for this
|
||||
@ -121,12 +130,13 @@ The following arguments are supported:
|
||||
block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be
|
||||
unique and non-overlapping with existing subnets in an authorized
|
||||
network.
|
||||
|
||||
* `tier` -
|
||||
(Optional)
|
||||
The service tier of the instance. Must be one of these values:
|
||||
|
||||
- BASIC: standalone instance
|
||||
- STANDARD_HA: highly available primary/replica instances
|
||||
|
||||
* `region` -
|
||||
(Optional)
|
||||
The name of the Redis region of the instance.
|
||||
@ -138,18 +148,22 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `create_time` -
|
||||
The time the instance was created in RFC3339 UTC "Zulu" format,
|
||||
accurate to nanoseconds.
|
||||
|
||||
* `current_location_id` -
|
||||
The current zone where the Redis endpoint is placed.
|
||||
For Basic Tier instances, this will always be the same as the
|
||||
[locationId] provided by the user at creation time. For Standard Tier
|
||||
instances, this can be either [locationId] or [alternativeLocationId]
|
||||
and can change after a failover event.
|
||||
|
||||
* `host` -
|
||||
Hostname or IP address of the exposed Redis endpoint used by clients
|
||||
to connect to the service.
|
||||
|
||||
* `port` -
|
||||
The port number of the exposed Redis endpoint.
|
||||
|
||||
|
@ -48,21 +48,25 @@ resource "google_resourcemanager_lien" "lien" {
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
|
||||
* `reason` -
|
||||
(Required)
|
||||
Concise user-visible strings indicating why an action cannot be performed
|
||||
on a resource. Maximum length of 200 characters.
|
||||
|
||||
* `origin` -
|
||||
(Required)
|
||||
A stable, user-visible/meaningful string identifying the origin
|
||||
of the Lien, intended to be inspected programmatically. Maximum length of
|
||||
200 characters.
|
||||
|
||||
* `parent` -
|
||||
(Required)
|
||||
A reference to the resource this Lien is attached to.
|
||||
The server will validate the parent against those for which Liens are supported.
|
||||
Since a variety of objects can have Liens against them, you must provide the type
|
||||
prefix (e.g. "projects/my-project-name").
|
||||
|
||||
* `restrictions` -
|
||||
(Required)
|
||||
The types of operations which should be blocked as a result of this Lien.
|
||||
@ -71,7 +75,6 @@ The following arguments are supported:
|
||||
list is meaningless and will be rejected.
|
||||
e.g. ['resourcemanager.projects.delete']
|
||||
|
||||
|
||||
- - -
|
||||
|
||||
|
||||
@ -80,8 +83,10 @@ The following arguments are supported:
|
||||
|
||||
In addition to the arguments listed above, the following computed attributes are exported:
|
||||
|
||||
|
||||
* `name` -
|
||||
A system-generated unique identifier for this Lien.
|
||||
|
||||
* `create_time` -
|
||||
Time of creation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user