Skip to content

Commit a73421d

Browse files
Terraform Integration for Capability (#13282) (#22582)
[upstream:4c8da9d42bf631d5534578bbe2fc8255bf71381a] Signed-off-by: Modular Magician <[email protected]>
1 parent 05180aa commit a73421d

File tree

5 files changed

+137
-0
lines changed

5 files changed

+137
-0
lines changed

.changelog/13282.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_resource_manager_capability` (beta)
3+
```

.teamcity/components/inputs/services_beta.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,11 @@ var ServicesListBeta = mapOf(
671671
"displayName" to "Resourcemanager",
672672
"path" to "./google-beta/services/resourcemanager"
673673
),
674+
"resourcemanager3" to mapOf(
675+
"name" to "resourcemanager3",
676+
"displayName" to "Resourcemanager3",
677+
"path" to "./google-beta/services/resourcemanager3"
678+
),
674679
"runtimeconfig" to mapOf(
675680
"name" to "runtimeconfig",
676681
"displayName" to "Runtimeconfig",

.teamcity/components/inputs/services_ga.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,11 @@ var ServicesListGa = mapOf(
666666
"displayName" to "Resourcemanager",
667667
"path" to "./google/services/resourcemanager"
668668
),
669+
"resourcemanager3" to mapOf(
670+
"name" to "resourcemanager3",
671+
"displayName" to "Resourcemanager3",
672+
"path" to "./google/services/resourcemanager3"
673+
),
669674
"runtimeconfig" to mapOf(
670675
"name" to "runtimeconfig",
671676
"displayName" to "Runtimeconfig",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
package resourcemanager3_test
4+
5+
// Capability is only in beta version.
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This code is generated by Magic Modules using the following:
9+
#
10+
# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/resourcemanager3/Capability.yaml
11+
# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl
12+
#
13+
# DO NOT EDIT this file directly. Any changes made to this file will be
14+
# overwritten during the next generation cycle.
15+
#
16+
# ----------------------------------------------------------------------------
17+
subcategory: "Resource Manager"
18+
description: |-
19+
An app-enabled folder is a folder within the Google Cloud resource hierarchy that has been configured for application management.
20+
---
21+
22+
# google_resource_manager_capability
23+
24+
An app-enabled folder is a folder within the Google Cloud resource hierarchy that has been configured for application management. This folder lets you define and manage App Hub applications. These applications are functional groupings of services and workloads that span multiple projects within that folder and its descendant projects.
25+
26+
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
27+
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
28+
29+
To get more information about Capability, see:
30+
31+
* [API documentation](https://cloud.google.com/resource-manager/reference/rest)
32+
* How-to Guides
33+
* [Official Documentation](https://cloud.google.com/resource-manager/docs/manage-applications)
34+
35+
## Example Usage - Resource Manager Capability
36+
37+
38+
```hcl
39+
resource "google_folder" "folder" {
40+
provider = google-beta
41+
display_name = "my-folder"
42+
parent = "organizations/123456789"
43+
deletion_protection = false
44+
}
45+
resource "time_sleep" "wait_60s" {
46+
depends_on = [google_folder.folder]
47+
create_duration = "60s"
48+
}
49+
resource "google_resource_manager_capability" "capability" {
50+
provider = google-beta
51+
value = true
52+
parent = "${google_folder.folder.name}"
53+
capability_name = "app-management"
54+
depends_on = [time_sleep.wait_60s]
55+
}
56+
```
57+
58+
## Argument Reference
59+
60+
The following arguments are supported:
61+
62+
63+
* `parent` -
64+
(Required)
65+
Folder on which Capability needs to be updated in the format folders/folder_id.
66+
67+
* `capability_name` -
68+
(Required)
69+
Capability name that should be updated on the folder.
70+
71+
* `value` -
72+
(Required)
73+
Capability Value.
74+
75+
76+
- - -
77+
78+
79+
80+
## Attributes Reference
81+
82+
In addition to the arguments listed above, the following computed attributes are exported:
83+
84+
* `id` - an identifier for the resource with format `{{parent}}/capabilities/{{capability_name}}`
85+
86+
87+
## Timeouts
88+
89+
This resource provides the following
90+
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
91+
92+
- `create` - Default is 20 minutes.
93+
- `update` - Default is 20 minutes.
94+
- `delete` - Default is 0 minutes.
95+
96+
## Import
97+
98+
99+
Capability can be imported using any of these accepted formats:
100+
101+
* `{{parent}}/capabilities/{{capability_name}}`
102+
* `{{parent}}/{{capability_name}}`
103+
104+
105+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Capability using one of the formats above. For example:
106+
107+
```tf
108+
import {
109+
id = "{{parent}}/capabilities/{{capability_name}}"
110+
to = google_resource_manager_capability.default
111+
}
112+
```
113+
114+
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Capability can be imported using one of the formats above. For example:
115+
116+
```
117+
$ terraform import google_resource_manager_capability.default {{parent}}/capabilities/{{capability_name}}
118+
$ terraform import google_resource_manager_capability.default {{parent}}/{{capability_name}}
119+
```

0 commit comments

Comments
 (0)