generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from hashicorp/sync-public-and-internal-provider
[auto] Sync with Public Provider
- Loading branch information
Showing
98 changed files
with
2,446 additions
and
1,005 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,22 @@ | ||
# Overrides the copywrite config schema version | ||
# Default: 1 | ||
schema_version = 1 | ||
|
||
project { | ||
# SPDX-compatible license identifier | ||
# Leave blank if you don't wish to license the project | ||
# Default: "MPL-2.0" | ||
# license = "" | ||
|
||
# Represents the year that the project initially began | ||
# Default: <the year the repo was first created> | ||
# copyright_year = 0 | ||
|
||
# A list of globs that should not have copyright or license headers | ||
# Supports doublestar glob patterns for more flexibility in defining which | ||
# files or folders should be ignored | ||
# Default: [] | ||
header_ignore = [ | ||
"examples/**" | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: MPL-2.0 | ||
|
||
url_source_repository = "https://github.com/hashicorp/terraform-provider-hcp" | ||
url_license = "https://github.com/hashicorp/terraform-provider-hcp/blob/main/LICENSE" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
--- | ||
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) | ||
|
||
-> **Note:** This resource is currently in public beta. | ||
|
||
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 { | ||
id = "iteration-id" | ||
} | ||
} | ||
# Update assigned iteration using an iteration fingerprint | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration { | ||
fingerprint = "fingerprint-associated-to-iteration" | ||
} | ||
} | ||
# Update assigned iteration using an iteration incremental version | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration { | ||
// incremental_version is the version number assigned to a completed iteration. | ||
incremental_version = 1 | ||
} | ||
} | ||
``` | ||
|
||
Using the latest channel to create a new channel with an assigned iteration. | ||
```terraform | ||
data "hcp_packer_image_iteration" "latest" { | ||
bucket_name = "alpine" | ||
channel = "latest" | ||
} | ||
resource "hcp_packer_channel" "staging" { | ||
name = staging | ||
bucket_name = alpine | ||
iteration { | ||
id = data.hcp_packer_image_iteration.latest.id | ||
} | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `bucket_name` (String) The slug of the HCP Packer Registry image bucket where the channel should be created in. | ||
- `name` (String) The name of the channel being managed. | ||
|
||
### Optional | ||
|
||
- `iteration` (Block List, Max: 1) The iteration assigned to the channel. (see [below for nested schema](#nestedblock--iteration)) | ||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `author_id` (String) The author of this channel. | ||
- `created_at` (String) The creation time of this channel. | ||
- `id` (String) The ID of this resource. | ||
- `organization_id` (String) The ID of the HCP organization where this channel is located in. | ||
- `project_id` (String) The ID of the HCP project where this channel is located in. | ||
- `updated_at` (String) The time this channel was last updated. | ||
|
||
<a id="nestedblock--iteration"></a> | ||
### Nested Schema for `iteration` | ||
|
||
Optional: | ||
|
||
- `fingerprint` (String) The fingerprint of the iteration assigned to the channel. | ||
- `id` (String) The ID of the iteration assigned to the channel. | ||
- `incremental_version` (Number) The incremental_version of the iteration assigned to the channel. | ||
|
||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `create` (String) | ||
- `default` (String) | ||
- `delete` (String) | ||
- `update` (String) | ||
|
||
## 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
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
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 { | ||
id = "iteration-id" | ||
} | ||
} | ||
|
||
# Update assigned iteration using an iteration fingerprint | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration { | ||
fingerprint = "fingerprint-associated-to-iteration" | ||
} | ||
} | ||
|
||
# Update assigned iteration using an iteration incremental version | ||
resource "hcp_packer_channel" "staging" { | ||
name = "staging" | ||
bucket_name = "alpine" | ||
iteration { | ||
// incremental_version is the version number assigned to a completed iteration. | ||
incremental_version = 1 | ||
} | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
examples/resources/hcp_packer_channel/resource_using_latest_channel.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,12 @@ | ||
data "hcp_packer_image_iteration" "latest" { | ||
bucket_name = "alpine" | ||
channel = "latest" | ||
} | ||
|
||
resource "hcp_packer_channel" "staging" { | ||
name = staging | ||
bucket_name = alpine | ||
iteration { | ||
id = data.hcp_packer_image_iteration.latest.id | ||
} | ||
} |
Oops, something went wrong.