Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Intercept Endpoint Group resource to Network Security. #20692

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/12522.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_network_security_intercept_endpoint_group` (beta)
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package networksecurity_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Network security"
description: |-
An intercept endpoint group is a global resource in the consumer account representing the producer’s deployment group.
---

# google_network_security_intercept_endpoint_group

An intercept endpoint group is a global resource in the consumer account representing the producer’s deployment group.

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.


<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=network_security_intercept_endpoint_group_basic&open_in_editor=main.tf" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Network Security Intercept Endpoint Group Basic


```hcl
resource "google_compute_network" "network" {
provider = google-beta
name = "example-network"
auto_create_subnetworks = false
}

resource "google_network_security_intercept_deployment_group" "deployment_group" {
provider = google-beta
intercept_deployment_group_id = "example-dg"
location = "global"
network = google_compute_network.network.id
}

resource "google_network_security_intercept_endpoint_group" "default" {
provider = google-beta
intercept_endpoint_group_id = "example-eg"
location = "global"
intercept_deployment_group = google_network_security_intercept_deployment_group.deployment_group.id
labels = {
foo = "bar"
}
}
```

## Argument Reference

The following arguments are supported:


* `intercept_deployment_group` -
(Required)
Immutable. The Intercept Deployment Group that this resource is connected to. Format
is:
`projects/{project}/locations/global/interceptDeploymentGroups/{interceptDeploymentGroup}`

* `location` -
(Required)
The location of the Intercept Endpoint Group, currently restricted to `global`.

* `intercept_endpoint_group_id` -
(Required)
ID of the Intercept Endpoint Group.


- - -


* `labels` -
(Optional)
Optional. Labels as key value pairs
**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field `effective_labels` for all of the labels present on the resource.

* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.


## Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}`

* `name` -
Identifier. The name of the Intercept Endpoint Group.

* `create_time` -
Create time stamp.

* `update_time` -
Update time stamp.

* `state` -
Current state of the endpoint group.
Possible values:
STATE_UNSPECIFIED
ACTIVE
CLOSED
CREATING
DELETING
OUT_OF_SYNC

* `reconciling` -
Whether reconciling is in progress, recommended per
https://google.aip.dev/128.

* `terraform_labels` -
The combination of labels configured directly on the resource
and default labels configured on the provider.

* `effective_labels` -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.


## Timeouts

This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:

- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.

## Import


InterceptEndpointGroup can be imported using any of these accepted formats:

* `projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}`
* `{{project}}/{{location}}/{{intercept_endpoint_group_id}}`
* `{{location}}/{{intercept_endpoint_group_id}}`


In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import InterceptEndpointGroup using one of the formats above. For example:

```tf
import {
id = "projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}"
to = google_network_security_intercept_endpoint_group.default
}
```

When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), InterceptEndpointGroup can be imported using one of the formats above. For example:

```
$ terraform import google_network_security_intercept_endpoint_group.default projects/{{project}}/locations/{{location}}/interceptEndpointGroups/{{intercept_endpoint_group_id}}
$ terraform import google_network_security_intercept_endpoint_group.default {{project}}/{{location}}/{{intercept_endpoint_group_id}}
$ terraform import google_network_security_intercept_endpoint_group.default {{location}}/{{intercept_endpoint_group_id}}
```

## User Project Overrides

This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).
Loading