Skip to content

Commit

Permalink
Add deprecation message to ec2.Instance securityGroups
Browse files Browse the repository at this point in the history
Fixes: #852
  • Loading branch information
stack72 committed Mar 20, 2020
1 parent 0c13188 commit 065bcbe
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/pulumi-resource-aws/schema.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cmd/pulumi-resource-aws/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/pulumi/pulumi-aws

require (
github.com/aws/aws-sdk-go v1.29.18 //indirect
github.com/aws/aws-sdk-go v1.29.18 //ct
github.com/hashicorp/aws-sdk-go-base v0.4.0
github.com/hashicorp/terraform-plugin-sdk v1.7.0
github.com/mitchellh/go-homedir v1.1.0
Expand Down
5 changes: 5 additions & 0 deletions resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,11 @@ func Provider() tfbridge.ProviderInfo {
"instance_state": {
CSharpName: "State",
},
"security_groups": {
DeprecationMessage: "Use of `securityGroups` is discouraged as it does not allow for changes and" +
" will force your instance to be replaced if changes are made. To avoid this," +
" use `vpcSecurityGroupIds` which allows for updates.",
},
},
},
"aws_internet_gateway": {Tok: awsResource(ec2Mod, "InternetGateway")},
Expand Down
2 changes: 2 additions & 0 deletions sdk/dotnet/Ec2/Instance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ public InputList<Inputs.InstanceNetworkInterfacesArgs> NetworkInterfaces
/// <summary>
/// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
/// </summary>
[Obsolete(@"Use of `securityGroups` is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use `vpcSecurityGroupIds` which allows for updates.")]
public InputList<string> SecurityGroups
{
get => _securityGroups ?? (_securityGroups = new InputList<string>());
Expand Down Expand Up @@ -827,6 +828,7 @@ public InputList<Inputs.InstanceNetworkInterfacesGetArgs> NetworkInterfaces
/// <summary>
/// A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
/// </summary>
[Obsolete(@"Use of `securityGroups` is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use `vpcSecurityGroupIds` which allows for updates.")]
public InputList<string> SecurityGroups
{
get => _securityGroups ?? (_securityGroups = new InputList<string>());
Expand Down
4 changes: 4 additions & 0 deletions sdk/nodejs/ec2/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ export interface InstanceState {
readonly rootBlockDevice?: pulumi.Input<inputs.ec2.InstanceRootBlockDevice>;
/**
* A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
*
* @deprecated Use of `securityGroups` is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use `vpcSecurityGroupIds` which allows for updates.
*/
readonly securityGroups?: pulumi.Input<pulumi.Input<string>[]>;
/**
Expand Down Expand Up @@ -667,6 +669,8 @@ export interface InstanceArgs {
readonly rootBlockDevice?: pulumi.Input<inputs.ec2.InstanceRootBlockDevice>;
/**
* A list of security group names (EC2-Classic) or IDs (default VPC) to associate with.
*
* @deprecated Use of `securityGroups` is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use `vpcSecurityGroupIds` which allows for updates.
*/
readonly securityGroups?: pulumi.Input<pulumi.Input<string>[]>;
/**
Expand Down

0 comments on commit 065bcbe

Please sign in to comment.