generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
783 additions
and
308 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:feature | ||
New resource `hcp_packer_channel` | ||
``` |
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,111 @@ | ||
--- | ||
page_title: "Resource hcp_packer_channel - terraform-provider-hcp" | ||
subcategory: "" | ||
description: |- | ||
The Packer Channel resource allows you to manage image bucket channels within an active HCP Packer Registry. | ||
--- | ||
|
||
# hcp_packer_channel (Resource) | ||
|
||
The Packer Channel resource allows you to manage image bucket channels within an active HCP Packer Registry. | ||
|
||
## Example Usage | ||
|
||
To create a channel with no assigned iteration. | ||
```terraform | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
} | ||
``` | ||
|
||
To create, or update an existing, channel with an assigned iteration. | ||
```terraform | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration_assignment { | ||
id = "iteration-id" | ||
} | ||
} | ||
# Update assigned iteration using an iteration fingerprint | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration_assignment { | ||
fingerprint = "fingerprint-associated-to-iteration" | ||
} | ||
} | ||
# Update assigned iteration using an iteration incremental version | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration_assignment { | ||
// incremental_version is the version number assigned to a completed iteration. | ||
incremental_version = 1 | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `bucket_name` (String) The slug of the HCP Packer Registry image bucket where the channel should be managed in. | ||
- `name` (String) The name of the channel being managed. | ||
|
||
### Optional | ||
|
||
- `iteration_assignment` (Block List, Max: 1) The iteration assignment information that will be used to assign a completed iteration to the channel. (see [below for nested schema](#nestedblock--iteration_assignment)) | ||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `author_id` (String) The author of the channel. | ||
- `created_at` (String) Creation time of this build. | ||
- `id` (String) The ID of this resource. | ||
- `iteration` (List of Object) The iteration assigned to the channel. (see [below for nested schema](#nestedatt--iteration)) | ||
- `organization_id` (String) The ID of the organization this HCP Packer registry is located in. | ||
- `project_id` (String) The ID of the project this HCP Packer registry is located in. | ||
|
||
<a id="nestedblock--iteration_assignment"></a> | ||
### Nested Schema for `iteration_assignment` | ||
|
||
Optional: | ||
|
||
- `fingerprint` (String) The fingerprint of the iteration to assign to the channel. | ||
- `id` (String) The id of the iteration to assign to the channel. | ||
- `incremental_version` (Number) The incremental_version of the iteration to assign to the channel. | ||
|
||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `create` (String) | ||
- `default` (String) | ||
- `delete` (String) | ||
- `update` (String) | ||
|
||
|
||
<a id="nestedatt--iteration"></a> | ||
### Nested Schema for `iteration` | ||
|
||
Read-Only: | ||
|
||
- `fingerprint` (String) | ||
- `id` (String) | ||
- `incremental_version` (Number) | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# The import ID requires the bucket and channel name in the following format {bucket_name}:{name} | ||
terraform import hcp_packer_channel.staging alpine:staging | ||
``` |
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,2 @@ | ||
# The import ID requires the bucket and channel name in the following format {bucket_name}:{name} | ||
terraform import hcp_packer_channel.staging alpine:staging |
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,4 @@ | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
} |
27 changes: 27 additions & 0 deletions
27
examples/resources/hcp_packer_channel/resource_assignment.tf
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,27 @@ | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration_assignment { | ||
id = "iteration-id" | ||
} | ||
} | ||
|
||
# Update assigned iteration using an iteration fingerprint | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration_assignment { | ||
fingerprint = "fingerprint-associated-to-iteration" | ||
} | ||
} | ||
|
||
# Update assigned iteration using an iteration incremental version | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration_assignment { | ||
// incremental_version is the version number assigned to a completed iteration. | ||
incremental_version = 1 | ||
} | ||
} | ||
|
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
Binary file not shown.
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
Oops, something went wrong.