Skip to content

Commit

Permalink
Artifact Registry: implement VPC SC Config (#8787) (#15840)
Browse files Browse the repository at this point in the history
* Artifact Registry: implement VPC SC Config

* Altering behavior from reset resource to simply drop resource

* removing skip_test

* re-adding skip_test since organization-level resources are out of scope for testing

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Sep 14, 2023
1 parent 7025f11 commit d86f279
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/8787.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
`google_artifact_registry_vpcsc_config`
```
101 changes: 101 additions & 0 deletions website/docs/r/artifact_registry_vpcsc_config.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
# ----------------------------------------------------------------------------
#
# *** 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: "Artifact Registry"
description: |-
The Artifact Registry VPC SC config that applies to a Project.
---

# google\_artifact\_registry\_vpcsc\_config

The Artifact Registry VPC SC config that applies to a Project.

~> **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.

To get more information about VPCSCConfig, see:

* [API documentation](https://cloud.google.com/artifact-registry/docs/reference/rest/v1/VPCSCConfig)

~> **Note:** VPC SC configs are automatically created for a given location. Creating a
resource of this type will acquire and update the resource that already
exists at the location. Deleting this resource will remove the config from
your Terraform state but leave the resource as is.
## Example Usage - Artifact Registry Vpcsc Config


```hcl
resource "google_artifact_registry_vpcsc_config" "my-config" {
provider = google-beta
location = "us-central1"
vpcsc_policy = "ALLOW"
}
```

## Argument Reference

The following arguments are supported:



- - -


* `vpcsc_policy` -
(Optional)
The VPC SC policy for project and location.
Possible values are: `DENY`, `ALLOW`.

* `location` -
(Optional)
The name of the location this config is located in.

* `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}}/vpcscConfig`

* `name` -
The name of the project's VPC SC Config.
Always of the form: projects/{project}/location/{location}/vpcscConfig


## 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


VPCSCConfig can be imported using any of these accepted formats:

```
$ terraform import google_artifact_registry_vpcsc_config.default projects/{{project}}/locations/{{location}}/vpcscConfig/{{name}}
$ terraform import google_artifact_registry_vpcsc_config.default {{project}}/{{location}}/{{name}}
$ terraform import google_artifact_registry_vpcsc_config.default {{location}}/{{name}}
```

## User Project Overrides

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

0 comments on commit d86f279

Please sign in to comment.