-
Notifications
You must be signed in to change notification settings - Fork 440
chore: retrofit --allow-vpc-ingress flag to manifest
#3763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
7d2b039
3d6ddf9
c1de9b7
9a849ce
08f973d
b04fe34
d7b9a50
654d8cf
86e9b66
079d866
2df8330
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -318,9 +318,11 @@ func (cfg *environmentHTTPConfig) loadLBConfig(env *config.CustomizeEnv) { | |
| if env.IsEmpty() { | ||
| return | ||
| } | ||
|
|
||
| if env.ImportVPC != nil && len(env.ImportVPC.PublicSubnetIDs) == 0 { | ||
| cfg.Private.InternalALBSubnets = env.InternalALBSubnets | ||
| cfg.Private.Certificates = env.ImportCertARNs | ||
| cfg.Private.SecurityGroupsConfig.Ingress.VPCIngress = aws.Bool(env.EnableInternalALBVPCIngress) | ||
| return | ||
| } | ||
| cfg.Public.Certificates = env.ImportCertARNs | ||
|
|
@@ -336,11 +338,28 @@ func (cfg publicHTTPConfig) IsEmpty() bool { | |
| } | ||
|
|
||
| type privateHTTPConfig struct { | ||
| InternalALBSubnets []string `yaml:"subnets,omitempty"` | ||
| Certificates []string `yaml:"certificates,omitempty"` | ||
| InternalALBSubnets []string `yaml:"subnets,omitempty"` | ||
| Certificates []string `yaml:"certificates,omitempty"` | ||
| SecurityGroupsConfig securityGroupsConfig `yaml:"security_groups,omitempty"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just wanted to bring to your notice that my PR to add security_group to env manifest also have similar secuirty_group field in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is going to read Whereas yours iirc would be so I guess we're probably fine!!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes you are correct. I was just making sure that 2 almost similar parameters shouldn't be confusing to the customers. But as you said they read differently in different sections should be okay.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is related to https://github.com/aws/copilot-cli/pull/3737/files#diff-4c63a9ce04347fa71ffd19988ac84f3eca7aacf36c414bb9e8f95c011b0f622dR327 . it is just http:
public:
security_groups:
ingress:
from_cdn: true |
||
| } | ||
|
|
||
| // IsEmpty returns true if there is no customization to the internal ALB. | ||
| func (cfg privateHTTPConfig) IsEmpty() bool { | ||
| return len(cfg.InternalALBSubnets) == 0 && len(cfg.Certificates) == 0 | ||
| return len(cfg.InternalALBSubnets) == 0 && len(cfg.Certificates) == 0 && cfg.SecurityGroupsConfig.isEmpty() | ||
| } | ||
|
|
||
| type securityGroupsConfig struct { | ||
| Ingress ingress `yaml:"ingress"` | ||
| } | ||
|
|
||
| func (cfg securityGroupsConfig) isEmpty() bool { | ||
| return cfg.Ingress.isEmpty() | ||
| } | ||
|
|
||
| type ingress struct { | ||
| VPCIngress *bool `yaml:"from_vpc"` | ||
| } | ||
|
|
||
| func (i ingress) isEmpty() bool { | ||
| return i.VPCIngress == nil | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to remove
AllowVPCIngressfrome.in?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't because we need to feed from
e.into manifest forenv show --manifest