#11667 AWS change subnet settings for vpc-0896aedab4753e76f
Closed: Fixed a year ago by mvadkert. Opened a year ago by mvadkert.

Hi,

Seems the subnet subnet-05832fde7f7f9cca0 is useless to us, we cannot use it for EKS:

│ Error: creating EKS Cluster (testing-farm-staging): UnsupportedAvailabilityZoneException: Cannot create cluster 'testing-farm-staging' because us-east-1a, the targeted availability zone, does not currently have sufficient capacity to support the cluster. Retry and choose from these availability zones: us-east-1b, us-east-1c, us-east-1d, us-east-1e, us-east-1f
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "b7688631-85aa-45ba-b18e-f1c230949198"
│   },
│   ClusterName: "testing-farm-staging",
│   Message_: "Cannot create cluster 'testing-farm-staging' because us-east-1a, the targeted availability zone, does not currently have sufficient capacity to support the cluster. Retry and choose from these availability zones: us-east-1b, us-east-1c, us-east-1d, us-east-1e, us-east-1f",
│   ValidZones: [
│     "us-east-1b",
│     "us-east-1c",
│     "us-east-1d",
│     "us-east-1e",
│     "us-east-1f"
│   ]
│ }
│ 
│   with module.eks.aws_eks_cluster.this[0],
│   on .terraform/modules/eks/main.tf line 25, in resource "aws_eks_cluster" "this":
│   25: resource "aws_eks_cluster" "this" {

Would it be possible to remove this subnet and create another one in us-east-1e or us-east-1f zone please?


Metadata Update from @phsmoura:
- Issue priority set to: Waiting on Assignee (was: Needs Review)
- Issue tagged with: aws, medium-gain, medium-trouble, ops

a year ago

Should we delete it? or just make a new one in one of those?

This is just blocking a staging deployment right?

@kevin it is blocking development :(

@kevin I did not check, but if another subnet can be added (VPC range is sufficient), feel free just to add another one (or even 2 ...), more subnets we have the better.

We are in the process of refactoring, and this is a PITA a bit.

Metadata Update from @kevin:
- Issue assigned to kevin

a year ago

I created subnet-0f1ff10d17ff540d7 can you see if that works for you?

@kevin thanks, can you also set Enable auto-assign public IPv4 in the subnet settings? Others have this and I believe it is needed.

You have successfully changed subnet settings:

Enable auto-assign public IPv4 address

Looks it is working, thank you for quick turnaround!

Closing as resolved

Metadata Update from @mvadkert:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

a year ago

Sorry, it failed after some time seems on tagging?

{code}
│ Error: creating EC2 resource (subnet-0f1ff10d17ff540d7) tag (kubernetes.io/cluster/testing-farm-staging): tagging resource (subnet-0f1ff10d17ff540d7): tagging resource (subnet-0f1ff10d17ff540d7): UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::125523088429:user/fedora-ci-testing-farm is not authorized to perform: ec2:CreateTags on resource: arn:aws:ec2:us-east-1:125523088429:subnet/subnet-0f1ff10d17ff540d7 because no identity-based policy allows the ec2:CreateTags action. Encoded authorization failure message: LZrE9BWv9fL2B34Xg-tE8nTbWwjH1kClw1PJYR4LEwDeJwRsgG-n9xLUg2I-AoEX6XHjEjjo010XDoI5R9swA8qAQ96LwErxP5h_rpmymn9A8xtjoVwQ_Siz6tamUD7p7_V2ipeg4lEkVRtWKCeLRcfatWhDexioJaoKokWrZR6rl-jq9o0WAaL3zGpLmSYXtBXXDZICBwwYErsNZz5lAD0khysheUCRK8o13raMiXv6rfHnBiv3eRtUim4zjP4smAJpNOHBmOmXqWVismMLEU6bLRQKbk0yvmkzco4rM2bHdNKGu690vGf27UTkCKDsqgqMzwS9Zkozr58d3oNXgZZnsHssHuHdFWpqJz1OoBTk2_6R6uLepkBReahFfJ7OGtJCZqUPuiRd4RcU-e8l3n3DVC4WD9wH15tiUcuQc00i7THNEYwIreQj-KXcXqlPGlhBlwW1rROwxQ7dYxxE4EK3XSlDDB1yJDY7fSmMdCLmr6_H8ier8r3JSVVOHoF0up39gnMGMtF55IvzHAY7nCEssdoDxxk8GtMSFoXdzuL0_HgK0gn6IH-WvKvuKqT91suJTswOnvauPWzJyUyCvW_UlC13bNrnLhnMu5e_M-JfMPcCG_b6_A-z4qBbMFbm7m2JNz0lTxRue9QDgCceqbRBQRwNzrKgPEyfGj7DINhZXtNKFw
│ status code: 403, request id: b2949172-8bf1-4267-970c-aacdb666b8f7

│ with aws_ec2_tag.subnet_tag[1],
│ on main.tf line 151, in resource "aws_ec2_tag" "subnet_tag":
│ 151: resource "aws_ec2_tag" "subnet_tag" {


ERRO[0839] Terraform invocation failed in /var/home/mvadkert/git/gitlab.com/testing-farm/infrastructure/terragrunt/environments/staging/eks/.terragrunt-cache/-xNELQhIOW4oW5Xwa5nOSdHCpOw/wVSGLr7UvmjExjcVh2QG2ibu7uA/eks prefix=[terragrunt/environments/staging/eks]
ERRO[0839] 1 error occurred:
* [/var/home/mvadkert/git/gitlab.com/testing-farm/infrastructure/terragrunt/environments/staging/eks/.terragrunt-cache/-xNELQhIOW4oW5Xwa5nOSdHCpOw/wVSGLr7UvmjExjcVh2QG2ibu7uA/eks] exit status 1

make: *** [Makefile:108: staging/apply] Error 1
{code}

Metadata Update from @mvadkert:
- Issue status updated to: Open (was: Closed)

a year ago

@kevin not sure what is different, could we maybe get that permission?

I think I had the tag wrong on that subnet. I had 'fedora-ci' but it was expecting 'ci'

try again now?

Ah, that will be it! I was blind :)

Metadata Update from @mvadkert:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

a year ago

Log in to comment on this ticket.

Metadata
Boards 1
ops Status: Backlog