|
| 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/saasservicemgmt/Release.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: "SaaS Runtime" |
| 18 | +description: |- |
| 19 | + A version to be propagated and deployed to Units. |
| 20 | +--- |
| 21 | + |
| 22 | +# google_saas_runtime_release |
| 23 | + |
| 24 | +A version to be propagated and deployed to Units. It points to a specific version of a Blueprint that can be applied to Units, for example, via a Rollout. |
| 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 | + |
| 30 | +## Example Usage - Saas Runtime Release Basic |
| 31 | + |
| 32 | + |
| 33 | +```hcl |
| 34 | +resource "google_saas_runtime_saas" "example_saas" { |
| 35 | + provider = google-beta |
| 36 | + saas_id = "example-saas" |
| 37 | + location = "global" |
| 38 | +
|
| 39 | + locations { |
| 40 | + name = "us-central1" |
| 41 | + } |
| 42 | +} |
| 43 | +
|
| 44 | +resource "google_saas_runtime_unit_kind" "example_unitkind" { |
| 45 | + provider = google-beta |
| 46 | + location = "global" |
| 47 | + unit_kind_id = "example-unitkind" |
| 48 | + saas = google_saas_runtime_saas.example_saas.id |
| 49 | +} |
| 50 | +
|
| 51 | +resource "google_saas_runtime_release" "example_previous" { |
| 52 | + provider = google-beta |
| 53 | + location = "global" |
| 54 | + release_id = "previous-release" |
| 55 | + unit_kind = google_saas_runtime_unit_kind.example_unitkind.id |
| 56 | + blueprint { |
| 57 | + package = "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-alpha-image@sha256:7992fdbaeaf998ecd31a7f937bb26e38a781ecf49b24857a6176c1e9bfc299ee" |
| 58 | + } |
| 59 | +} |
| 60 | +
|
| 61 | +resource "google_saas_runtime_release" "example" { |
| 62 | + provider = google-beta |
| 63 | + location = "global" |
| 64 | + release_id = "example-release" |
| 65 | + unit_kind = google_saas_runtime_unit_kind.example_unitkind.id |
| 66 | + blueprint { |
| 67 | + package = "us-central1-docker.pkg.dev/ci-test-project-188019/test-repo/tf-test-easysaas-beta-image@sha256:7bba0fa85b2956df7768f7b32e715b6fe11f4f4193e2a70a35bf3f286a6cdf9e" |
| 68 | + } |
| 69 | + input_variable_defaults { |
| 70 | + variable = "name" |
| 71 | + value = "test" |
| 72 | + type = "STRING" |
| 73 | + } |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | +## Argument Reference |
| 78 | + |
| 79 | +The following arguments are supported: |
| 80 | + |
| 81 | + |
| 82 | +* `unit_kind` - |
| 83 | + (Required) |
| 84 | + Reference to the UnitKind this Release corresponds to (required and |
| 85 | + immutable once created). |
| 86 | + |
| 87 | +* `location` - |
| 88 | + (Required) |
| 89 | + Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. |
| 90 | + |
| 91 | +* `release_id` - |
| 92 | + (Required) |
| 93 | + The ID value for the new release. |
| 94 | + |
| 95 | + |
| 96 | +* `annotations` - |
| 97 | + (Optional) |
| 98 | + Annotations is an unstructured key-value map stored with a resource that |
| 99 | + may be set by external tools to store and retrieve arbitrary metadata. |
| 100 | + They are not queryable and should be preserved when modifying objects. |
| 101 | + More info: https://kubernetes.io/docs/user-guide/annotations |
| 102 | + **Note**: This field is non-authoritative, and will only manage the annotations present in your configuration. |
| 103 | + Please refer to the field `effective_annotations` for all of the annotations present on the resource. |
| 104 | + |
| 105 | +* `blueprint` - |
| 106 | + (Optional) |
| 107 | + Blueprints are OCI Images that contain all of the artifacts needed to |
| 108 | + provision a unit. Metadata such as, type of the engine used to actuate the |
| 109 | + blueprint (e.g. terraform, helm etc) and version will come from the image |
| 110 | + manifest. If the hostname is omitted, it will be assumed to be the regional |
| 111 | + path to Artifact Registry (eg. us-east1-docker.pkg.dev). |
| 112 | + Structure is [documented below](#nested_blueprint). |
| 113 | + |
| 114 | +* `input_variable_defaults` - |
| 115 | + (Optional) |
| 116 | + Mapping of input variables to default values. Maximum 100 |
| 117 | + Structure is [documented below](#nested_input_variable_defaults). |
| 118 | + |
| 119 | +* `labels` - |
| 120 | + (Optional) |
| 121 | + The labels on the resource, which can be used for categorization. |
| 122 | + similar to Kubernetes resource labels. |
| 123 | + **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. |
| 124 | + Please refer to the field `effective_labels` for all of the labels present on the resource. |
| 125 | + |
| 126 | +* `release_requirements` - |
| 127 | + (Optional) |
| 128 | + Set of requirements to be fulfilled on the Unit when using this Release. |
| 129 | + Structure is [documented below](#nested_release_requirements). |
| 130 | + |
| 131 | +* `project` - (Optional) The ID of the project in which the resource belongs. |
| 132 | + If it is not provided, the provider project is used. |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | +<a name="nested_blueprint"></a>The `blueprint` block supports: |
| 137 | + |
| 138 | +* `engine` - |
| 139 | + (Output) |
| 140 | + Type of the engine used to actuate the blueprint. e.g. terraform, helm etc. |
| 141 | + |
| 142 | +* `package` - |
| 143 | + (Optional) |
| 144 | + URI to a blueprint used by the Unit (required unless unitKind or release is |
| 145 | + set). |
| 146 | + |
| 147 | +* `version` - |
| 148 | + (Output) |
| 149 | + Version metadata if present on the blueprint. |
| 150 | + |
| 151 | +<a name="nested_input_variable_defaults"></a>The `input_variable_defaults` block supports: |
| 152 | + |
| 153 | +* `type` - |
| 154 | + (Optional) |
| 155 | + Name of a supported variable type. Supported types are STRING, INT, BOOL. |
| 156 | + Possible values are: `TYPE_UNSPECIFIED`, `STRING`, `INT`, `BOOL`. |
| 157 | + |
| 158 | +* `value` - |
| 159 | + (Optional) |
| 160 | + String encoded value for the variable. |
| 161 | + |
| 162 | +* `variable` - |
| 163 | + (Required) |
| 164 | + Name of the variable from actuation configs. |
| 165 | + |
| 166 | +<a name="nested_release_requirements"></a>The `release_requirements` block supports: |
| 167 | + |
| 168 | +* `upgradeable_from_releases` - |
| 169 | + (Optional) |
| 170 | + A list of releases from which a unit can be upgraded to this one |
| 171 | + (optional). If left empty no constraints will be applied. When provided, |
| 172 | + unit upgrade requests to this release will check and enforce this |
| 173 | + constraint. |
| 174 | + |
| 175 | +## Attributes Reference |
| 176 | + |
| 177 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 178 | + |
| 179 | +* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/releases/{{release_id}}` |
| 180 | + |
| 181 | +* `create_time` - |
| 182 | + The timestamp when the resource was created. |
| 183 | + |
| 184 | +* `etag` - |
| 185 | + An opaque value that uniquely identifies a version or |
| 186 | + generation of a resource. It can be used to confirm that the client |
| 187 | + and server agree on the ordering of a resource being written. |
| 188 | + |
| 189 | +* `input_variables` - |
| 190 | + List of input variables declared on the blueprint and can be present with |
| 191 | + their values on the unit spec |
| 192 | + Structure is [documented below](#nested_input_variables). |
| 193 | + |
| 194 | +* `name` - |
| 195 | + Identifier. The resource name (full URI of the resource) following the standard naming |
| 196 | + scheme: |
| 197 | + "projects/{project}/locations/{location}/releases/{release}" |
| 198 | + |
| 199 | +* `output_variables` - |
| 200 | + List of output variables declared on the blueprint and can be present with |
| 201 | + their values on the unit status |
| 202 | + Structure is [documented below](#nested_output_variables). |
| 203 | + |
| 204 | +* `uid` - |
| 205 | + The unique identifier of the resource. UID is unique in the time |
| 206 | + and space for this resource within the scope of the service. It is |
| 207 | + typically generated by the server on successful creation of a resource |
| 208 | + and must not be changed. UID is used to uniquely identify resources |
| 209 | + with resource name reuses. This should be a UUID4. |
| 210 | + |
| 211 | +* `update_time` - |
| 212 | + The timestamp when the resource was last updated. Any |
| 213 | + change to the resource made by users must refresh this value. |
| 214 | + Changes to a resource made by the service should refresh this value. |
| 215 | + |
| 216 | +* `effective_annotations` - |
| 217 | + All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services. |
| 218 | + |
| 219 | +* `terraform_labels` - |
| 220 | + The combination of labels configured directly on the resource |
| 221 | + and default labels configured on the provider. |
| 222 | + |
| 223 | +* `effective_labels` - |
| 224 | + All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services. |
| 225 | + |
| 226 | + |
| 227 | +<a name="nested_input_variables"></a>The `input_variables` block contains: |
| 228 | + |
| 229 | +* `type` - |
| 230 | + (Optional) |
| 231 | + Name of a supported variable type. Supported types are STRING, INT, BOOL. |
| 232 | + Possible values are: `TYPE_UNSPECIFIED`, `STRING`, `INT`, `BOOL`. |
| 233 | + |
| 234 | +* `value` - |
| 235 | + (Optional) |
| 236 | + String encoded value for the variable. |
| 237 | + |
| 238 | +* `variable` - |
| 239 | + (Required) |
| 240 | + Name of the variable from actuation configs. |
| 241 | + |
| 242 | +<a name="nested_output_variables"></a>The `output_variables` block contains: |
| 243 | + |
| 244 | +* `type` - |
| 245 | + (Optional) |
| 246 | + Name of a supported variable type. Supported types are STRING, INT, BOOL. |
| 247 | + Possible values are: `TYPE_UNSPECIFIED`, `STRING`, `INT`, `BOOL`. |
| 248 | + |
| 249 | +* `value` - |
| 250 | + (Optional) |
| 251 | + String encoded value for the variable. |
| 252 | + |
| 253 | +* `variable` - |
| 254 | + (Required) |
| 255 | + Name of the variable from actuation configs. |
| 256 | + |
| 257 | +## Timeouts |
| 258 | + |
| 259 | +This resource provides the following |
| 260 | +[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| 261 | + |
| 262 | +- `create` - Default is 20 minutes. |
| 263 | +- `update` - Default is 20 minutes. |
| 264 | +- `delete` - Default is 20 minutes. |
| 265 | + |
| 266 | +## Import |
| 267 | + |
| 268 | + |
| 269 | +Release can be imported using any of these accepted formats: |
| 270 | + |
| 271 | +* `projects/{{project}}/locations/{{location}}/releases/{{release_id}}` |
| 272 | +* `{{project}}/{{location}}/{{release_id}}` |
| 273 | +* `{{location}}/{{release_id}}` |
| 274 | + |
| 275 | + |
| 276 | +In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Release using one of the formats above. For example: |
| 277 | + |
| 278 | +```tf |
| 279 | +import { |
| 280 | + id = "projects/{{project}}/locations/{{location}}/releases/{{release_id}}" |
| 281 | + to = google_saas_runtime_release.default |
| 282 | +} |
| 283 | +``` |
| 284 | + |
| 285 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Release can be imported using one of the formats above. For example: |
| 286 | + |
| 287 | +``` |
| 288 | +$ terraform import google_saas_runtime_release.default projects/{{project}}/locations/{{location}}/releases/{{release_id}} |
| 289 | +$ terraform import google_saas_runtime_release.default {{project}}/{{location}}/{{release_id}} |
| 290 | +$ terraform import google_saas_runtime_release.default {{location}}/{{release_id}} |
| 291 | +``` |
| 292 | + |
| 293 | +## User Project Overrides |
| 294 | + |
| 295 | +This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |
0 commit comments