Skip to content

Commit

Permalink
common: doc fixes for kms regions
Browse files Browse the repository at this point in the history
As pointed out by a user on discuss, the region_kms_key_ids attribute
was not referenced correctly in the documentation for kms_key_id.

This commit fixes this mistake, along with a typo in the documentation
for `kms_key_id'.
  • Loading branch information
lbajolet-hashicorp committed Nov 27, 2023
1 parent b331758 commit 722a608
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .web-docs/components/builder/chroot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ builders.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for AMI encryption. This
only applies to the main `region` -- any regions the AMI gets copied to
copied will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in AMIRegionKMSKeyIDs.
will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in `region_kms_key_ids`.

Set this value if you select `encrypt_boot`, but don't want to use the
region's default KMS key.
Expand Down
4 changes: 2 additions & 2 deletions .web-docs/components/builder/ebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ necessary for this build to succeed and can be found further down the page.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for AMI encryption. This
only applies to the main `region` -- any regions the AMI gets copied to
copied will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in AMIRegionKMSKeyIDs.
will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in `region_kms_key_ids`.

Set this value if you select `encrypt_boot`, but don't want to use the
region's default KMS key.
Expand Down
4 changes: 2 additions & 2 deletions .web-docs/components/builder/ebssurrogate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ necessary for this build to succeed and can be found further down the page.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for AMI encryption. This
only applies to the main `region` -- any regions the AMI gets copied to
copied will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in AMIRegionKMSKeyIDs.
will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in `region_kms_key_ids`.

Set this value if you select `encrypt_boot`, but don't want to use the
region's default KMS key.
Expand Down
4 changes: 2 additions & 2 deletions .web-docs/components/builder/instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ necessary for this build to succeed and can be found further down the page.

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for AMI encryption. This
only applies to the main `region` -- any regions the AMI gets copied to
copied will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in AMIRegionKMSKeyIDs.
will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in `region_kms_key_ids`.

Set this value if you select `encrypt_boot`, but don't want to use the
region's default KMS key.
Expand Down
6 changes: 3 additions & 3 deletions builder/common/ami_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ type AMIConfig struct {
AMIEncryptBootVolume config.Trilean `mapstructure:"encrypt_boot" required:"false"`
// ID, alias or ARN of the KMS key to use for AMI encryption. This
// only applies to the main `region` -- any regions the AMI gets copied to
// copied will be encrypted by the default EBS KMS key for that region,
// unless you set region-specific keys in AMIRegionKMSKeyIDs.
// will be encrypted by the default EBS KMS key for that region,
// unless you set region-specific keys in `region_kms_key_ids`.
//
// Set this value if you select `encrypt_boot`, but don't want to use the
// region's default KMS key.
Expand Down Expand Up @@ -179,7 +179,7 @@ func (c *AMIConfig) Prepare(accessConfig *AccessConfig, ctx *interpolate.Context
}

// Make sure that if we have region_kms_key_ids defined,
// the regions in region_kms_key_ids are also in ami_regions
// the regions in region_kms_key_ids are also in ami_regions
if len(c.AMIRegionKMSKeyIDs) > 0 {
for kmsKeyRegion := range c.AMIRegionKMSKeyIDs {
if !stringInSlice(c.AMIRegions, kmsKeyRegion) {
Expand Down
4 changes: 2 additions & 2 deletions docs-partials/builder/common/AMIConfig-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@

- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for AMI encryption. This
only applies to the main `region` -- any regions the AMI gets copied to
copied will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in AMIRegionKMSKeyIDs.
will be encrypted by the default EBS KMS key for that region,
unless you set region-specific keys in `region_kms_key_ids`.

Set this value if you select `encrypt_boot`, but don't want to use the
region's default KMS key.
Expand Down

0 comments on commit 722a608

Please sign in to comment.