Skip to content

Commit

Permalink
Support Security Groups IDs #36
Browse files Browse the repository at this point in the history
  • Loading branch information
GennadySpb committed Mar 10, 2022
1 parent 13e9d1d commit d5ea4d3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 1.1.0 (Unreleased)

* Provider image family data [GH-9]
* Support set of Security Group IDs on the instance [GH-36]

## 1.0.0 (June 14, 2021)

Expand Down
2 changes: 2 additions & 0 deletions builder/yandex/common_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ type NetworkConfig struct {
SubnetID string `mapstructure:"subnet_id" required:"false"`
// The name of the zone to launch the instance. This defaults to `ru-central1-a`.
Zone string `mapstructure:"zone" required:"false"`
// Security group ids for network interface of the instance.
SecurityGroupIds []string `mapstructure:"security_group_ids" required:"false"`

// If set to true, then launched instance will have external internet
// access.
Expand Down
2 changes: 2 additions & 0 deletions builder/yandex/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions builder/yandex/step_create_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func (s *StepCreateInstance) Run(ctx context.Context, state multistep.StateBag)
{
SubnetId: instanceSubnetID,
PrimaryV4AddressSpec: &compute.PrimaryAddressSpec{},
SecurityGroupIds: config.SecurityGroupIds,
},
},
}
Expand Down
2 changes: 2 additions & 0 deletions docs-partials/builder/yandex/NetworkConfig-not-required.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- `zone` (string) - The name of the zone to launch the instance. This defaults to `ru-central1-a`.

- `security_group_ids` ([]string) - Security group ids for network interface of the instance.

- `use_ipv4_nat` (bool) - If set to true, then launched instance will have external internet
access.

Expand Down
2 changes: 2 additions & 0 deletions post-processor/yandex-export/post-processor.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d5ea4d3

Please sign in to comment.