-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding mmv1 generated Resource: google_composer_user_workloads_config…
…_map (#10865) (#18378) [upstream:7f78f530c63a52654dfcbc2719867a50ceb95cfa] Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
510ddd1
commit 3c456fc
Showing
8 changed files
with
176 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
google/services/composer/resource_composer_user_workloads_config_map_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 composer_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
website/docs/r/composer_user_workloads_config_map.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
--- | ||
# ---------------------------------------------------------------------------- | ||
# | ||
# *** 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: "Cloud Composer" | ||
description: |- | ||
User workloads ConfigMap used by Airflow tasks that run with Kubernetes Executor or KubernetesPodOperator. | ||
--- | ||
|
||
# google_composer_user_workloads_config_map | ||
|
||
User workloads ConfigMap used by Airflow tasks that run with Kubernetes Executor or KubernetesPodOperator. | ||
Intended for Composer 3 Environments. | ||
|
||
~> **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 UserWorkloadsConfigMap, see: | ||
|
||
* [API documentation](https://cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments.userWorkloadsConfigMaps) | ||
|
||
<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%2Fgit.luolix.top%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=composer_user_workloads_config_map_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 - Composer User Workloads Config Map Basic | ||
|
||
|
||
```hcl | ||
resource "google_composer_environment" "environment" { | ||
provider = google-beta | ||
name = "test-environment" | ||
region = "us-central1" | ||
config { | ||
software_config { | ||
image_version = "composer-3-airflow-2" | ||
} | ||
} | ||
} | ||
resource "google_composer_user_workloads_config_map" "config_map" { | ||
provider = google-beta | ||
name = "test-config-map" | ||
region = "us-central1" | ||
environment = google_composer_environment.environment.name | ||
data = { | ||
api_host: "apihost:443", | ||
} | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
|
||
* `name` - | ||
(Required) | ||
Name of the Kubernetes ConfigMap. | ||
|
||
* `environment` - | ||
(Required) | ||
Environment where the Kubernetes ConfigMap will be stored and used. | ||
|
||
|
||
- - - | ||
|
||
|
||
* `data` - | ||
(Optional) | ||
The "data" field of Kubernetes ConfigMap, organized in key-value pairs. | ||
For details see: https://kubernetes.io/docs/concepts/configuration/configmap/ | ||
|
||
* `region` - | ||
(Optional) | ||
The location or Compute Engine region for the environment. | ||
|
||
* `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/{{region}}/environments/{{environment}}/userWorkloadsConfigMaps/{{name}}` | ||
|
||
|
||
## Timeouts | ||
|
||
This resource provides the following | ||
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: | ||
|
||
- `create` - Default is 1 minutes. | ||
- `update` - Default is 1 minutes. | ||
- `delete` - Default is 1 minutes. | ||
|
||
## Import | ||
|
||
|
||
UserWorkloadsConfigMap can be imported using any of these accepted formats: | ||
|
||
* `projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsConfigMaps/{{name}}` | ||
* `{{project}}/{{region}}/{{environment}}/{{name}}` | ||
* `{{region}}/{{environment}}/{{name}}` | ||
* `{{environment}}/{{name}}` | ||
|
||
|
||
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import UserWorkloadsConfigMap using one of the formats above. For example: | ||
|
||
```tf | ||
import { | ||
id = "projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsConfigMaps/{{name}}" | ||
to = google_composer_user_workloads_config_map.default | ||
} | ||
``` | ||
|
||
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), UserWorkloadsConfigMap can be imported using one of the formats above. For example: | ||
|
||
``` | ||
$ terraform import google_composer_user_workloads_config_map.default projects/{{project}}/locations/{{region}}/environments/{{environment}}/userWorkloadsConfigMaps/{{name}} | ||
$ terraform import google_composer_user_workloads_config_map.default {{project}}/{{region}}/{{environment}}/{{name}} | ||
$ terraform import google_composer_user_workloads_config_map.default {{region}}/{{environment}}/{{name}} | ||
$ terraform import google_composer_user_workloads_config_map.default {{environment}}/{{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). |