Skip to content

Commit

Permalink
docs: update placement configuration docs
Browse files Browse the repository at this point in the history
The placement configuration options were statically written as part of
the placement docs instead of included through the generated partials,
so this commit adds a section for those, and references that from where
they were initially injected.
  • Loading branch information
lbajolet-hashicorp committed Sep 16, 2024
1 parent e708ebc commit 08064f8
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 43 deletions.
25 changes: 18 additions & 7 deletions .web-docs/components/builder/ebs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -945,13 +945,7 @@ JSON example:
]
```

- `host_resource_group_arn` (string) - The ARN of the host resource
group in which to launch the instances. If you specify a host
resource group ARN, omit the Tenancy parameter or set it to `host`.
- `tenancy` (string) - The tenancy of the instance (if the instance is
running in a VPC). An instance with a tenancy of `dedicated` runs on
single-tenant hardware. The default is `default`, meaning shared
tenancy. Allowed values are `default`, `dedicated` and `host`.
Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.

Expand Down Expand Up @@ -1068,6 +1062,23 @@ JSON example:
<!-- End of code generated from the comments of the RunConfig struct in builder/common/run_config.go; -->


#### Placement Configuration

<!-- Code generated from the comments of the Placement struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->

- `host_resource_group_arn` (string) - The ARN of the host resource group in which to launch the instances.

- `host_id` (string) - The ID of the host used when Packer launches an EC2 instance.

- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware.

The default is "default", meaning shared tenancy. Allowed values are "default",
"dedicated" and "host".

<!-- End of code generated from the comments of the Placement struct in builder/common/run_config.go; -->


#### Metadata Settings

<!-- Code generated from the comments of the MetadataOptions struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->
Expand Down
25 changes: 18 additions & 7 deletions .web-docs/components/builder/ebssurrogate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -958,13 +958,7 @@ JSON example:
]
```

- `host_resource_group_arn` (string) - The ARN of the host resource
group in which to launch the instances. If you specify a host
resource group ARN, omit the Tenancy parameter or set it to `host`.
- `tenancy` (string) - The tenancy of the instance (if the instance is
running in a VPC). An instance with a tenancy of `dedicated` runs on
single-tenant hardware. The default is `default`, meaning shared
tenancy. Allowed values are `default`, `dedicated` and `host`.
Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.

Expand Down Expand Up @@ -1081,6 +1075,23 @@ JSON example:
<!-- End of code generated from the comments of the RunConfig struct in builder/common/run_config.go; -->


#### Placement Configuration

<!-- Code generated from the comments of the Placement struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->

- `host_resource_group_arn` (string) - The ARN of the host resource group in which to launch the instances.

- `host_id` (string) - The ID of the host used when Packer launches an EC2 instance.

- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware.

The default is "default", meaning shared tenancy. Allowed values are "default",
"dedicated" and "host".

<!-- End of code generated from the comments of the Placement struct in builder/common/run_config.go; -->


#### Metadata Settings

<!-- Code generated from the comments of the MetadataOptions struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->
Expand Down
25 changes: 18 additions & 7 deletions .web-docs/components/builder/ebsvolume/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -910,13 +910,7 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
]
```

- `host_resource_group_arn` (string) - The ARN of the host resource
group in which to launch the instances. If you specify a host
resource group ARN, omit the Tenancy parameter or set it to `host`.
- `tenancy` (string) - The tenancy of the instance (if the instance is
running in a VPC). An instance with a tenancy of `dedicated` runs on
single-tenant hardware. The default is `default`, meaning shared
tenancy. Allowed values are `default`, `dedicated` and `host`.
Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.

Expand Down Expand Up @@ -1033,6 +1027,23 @@ https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concept
<!-- End of code generated from the comments of the RunConfig struct in builder/common/run_config.go; -->


#### Placement Configuration

<!-- Code generated from the comments of the Placement struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->

- `host_resource_group_arn` (string) - The ARN of the host resource group in which to launch the instances.

- `host_id` (string) - The ID of the host used when Packer launches an EC2 instance.

- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware.

The default is "default", meaning shared tenancy. Allowed values are "default",
"dedicated" and "host".

<!-- End of code generated from the comments of the Placement struct in builder/common/run_config.go; -->


#### Metadata Settings

<!-- Code generated from the comments of the MetadataOptions struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->
Expand Down
25 changes: 18 additions & 7 deletions .web-docs/components/builder/instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -943,13 +943,7 @@ JSON example:
]
```

- `host_resource_group_arn` (string) - The ARN of the host resource
group in which to launch the instances. If you specify a host
resource group ARN, omit the Tenancy parameter or set it to `host`.
- `tenancy` (string) - The tenancy of the instance (if the instance is
running in a VPC). An instance with a tenancy of `dedicated` runs on
single-tenant hardware. The default is `default`, meaning shared
tenancy. Allowed values are `default`, `dedicated` and `host`.
Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.

Expand Down Expand Up @@ -1179,6 +1173,23 @@ In case this is not possible you might see a `Bad exit status` message in the lo
The absence of this permission won't prevent you from building the AMI, and the error only means that packer is not able to close the tunnel gracefully.


#### Placement Configuration

<!-- Code generated from the comments of the Placement struct in builder/common/run_config.go; DO NOT EDIT MANUALLY -->

- `host_resource_group_arn` (string) - The ARN of the host resource group in which to launch the instances.

- `host_id` (string) - The ID of the host used when Packer launches an EC2 instance.

- `tenancy` (string) - [Tenancy](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) used
when Packer launches the EC2 instance, allowing it to be launched on dedicated hardware.

The default is "default", meaning shared tenancy. Allowed values are "default",
"dedicated" and "host".

<!-- End of code generated from the comments of the Placement struct in builder/common/run_config.go; -->


### Block Devices Configuration

Block devices can be nested in the
Expand Down
9 changes: 1 addition & 8 deletions builder/common/run_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,7 @@ type RunConfig struct {
// ]
// ```
//
// - `host_resource_group_arn` (string) - The ARN of the host resource
// group in which to launch the instances. If you specify a host
// resource group ARN, omit the Tenancy parameter or set it to `host`.
// - `tenancy` (string) - The tenancy of the instance (if the instance is
// running in a VPC). An instance with a tenancy of `dedicated` runs on
// single-tenant hardware. The default is `default`, meaning shared
// tenancy. Allowed values are `default`, `dedicated` and `host`.
//
// Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.
Placement Placement `mapstructure:"placement" required:"false"`
// Deprecated: Use Placement Tenancy instead.
Tenancy string `mapstructure:"tenancy" required:"false"`
Expand Down
8 changes: 1 addition & 7 deletions docs-partials/builder/common/RunConfig-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,7 @@
]
```

- `host_resource_group_arn` (string) - The ARN of the host resource
group in which to launch the instances. If you specify a host
resource group ARN, omit the Tenancy parameter or set it to `host`.
- `tenancy` (string) - The tenancy of the instance (if the instance is
running in a VPC). An instance with a tenancy of `dedicated` runs on
single-tenant hardware. The default is `default`, meaning shared
tenancy. Allowed values are `default`, `dedicated` and `host`.
Refer to the [Placement docs](#placement-configuration) for more information on the supported attributes for placement configuration.

- `tenancy` (string) - Deprecated: Use Placement Tenancy instead.

Expand Down
4 changes: 4 additions & 0 deletions docs/builders/ebs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ necessary for this build to succeed and can be found further down the page.

@include 'builder/common/RunConfig-not-required.mdx'

#### Placement Configuration

@include 'builder/common/Placement-not-required.mdx'

#### Metadata Settings

@include 'builder/common/MetadataOptions.mdx'
Expand Down
4 changes: 4 additions & 0 deletions docs/builders/ebssurrogate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ necessary for this build to succeed and can be found further down the page.

@include 'builder/common/RunConfig-not-required.mdx'

#### Placement Configuration

@include 'builder/common/Placement-not-required.mdx'

#### Metadata Settings

@include 'builder/common/MetadataOptions.mdx'
Expand Down
4 changes: 4 additions & 0 deletions docs/builders/ebsvolume.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ Block devices can be nested in the

@include 'builder/common/RunConfig-not-required.mdx'

#### Placement Configuration

@include 'builder/common/Placement-not-required.mdx'

#### Metadata Settings

@include 'builder/common/MetadataOptions.mdx'
Expand Down
4 changes: 4 additions & 0 deletions docs/builders/instance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ necessary for this build to succeed and can be found further down the page.

@include 'builders/aws-session-manager.mdx'

#### Placement Configuration

@include 'builder/common/Placement-not-required.mdx'

### Block Devices Configuration

Block devices can be nested in the
Expand Down

0 comments on commit 08064f8

Please sign in to comment.