Skip to content
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

Cannot create RDS instance in a separate AWS account #5

Open
sjbylo opened this issue Sep 12, 2019 · 1 comment
Open

Cannot create RDS instance in a separate AWS account #5

sjbylo opened this issue Sep 12, 2019 · 1 comment

Comments

@sjbylo
Copy link

sjbylo commented Sep 12, 2019

I'm running OCP in one AWS account and trying to create an RDS instance in a different AWS account.

This fails with:
message: |
CreateDBSubnetGroup: InvalidParameter: 1 validation error(s) found.
- missing required field, CreateDBSubnetGroupInput.SubnetIds.

In the code I see...
The getSubnets() function in rds_provider.go determines the VPC and Subnets that are being used by the OCP cluster and assumes they are the same at where the RDS instance should be created. This is a fair assumption, but it won't work in my case described.

It would be great if the VPC and subnets (or use auto subnet allocation provided by AWS) could be specified in the RDSdatabase CR?

Here's the log:

2019/09/12 07:30:52 Seems like we are running in a Kubernetes cluster!!
2019/09/12 07:30:52 Found node with ID: i-0b7f1f0e452a861dd in region ap-southeast-1
2019/09/12 07:30:52 trying to get subnets
2019/09/12 07:30:52 Taking subnets from node i-0b7f1f0e452a861dd
2019/09/12 07:30:52 trying to describe instance
2019/09/12 07:30:52 got instance response
2019/09/12 07:30:52 Found the follwing subnets:
2019/09/12 07:30:52 trying to get security groups
2019/09/12 07:30:52 Taking security groups from node i-0b7f1f0e452a861dd
2019/09/12 07:30:52 trying to describe instance
2019/09/12 07:30:52 got instance response
2019/09/12 07:30:52 Found the follwing security groups:
2019/09/12 07:30:52 Attempting to Create a DB
2019/09/12 07:30:52 Trying to find the correct subnets
2019/09/12 07:30:52 Error: unable to continue due to lack of subnets, perhaps we couldn't lookup the subnets
2019/09/12 07:30:52 Subnets: []
2019/09/12 07:30:52 database creation failed: CreateDBSubnetGroup: InvalidParameter: 1 validation error(s) found.

  • missing required field, CreateDBSubnetGroupInput.SubnetIds.
@sjbylo
Copy link
Author

sjbylo commented Sep 12, 2019

I see in the below there is no provision for the user to specify VPC or Subnets.

// RDSDatabaseSpec main structure describing the database instance
type RDSDatabaseSpec struct {
	Username              string         `json:"username"`
	Password              PasswordSecret `json:"password"`
	DBName                string         `json:"dbName"`
	Engine                string         `json:"engine"` // "postgres"
	Class                 string         `json:"class"`  // like "db.t2.micro"
	Size                  int64          `json:"size"`   // size in gb
	MultiAZ               bool           `json:"multiAZ,omitempty"`
	PubliclyAccessible    bool           `json:"publiclyAccessible,omitempty"`
	StorageEncrypted      bool           `json:"storageEncrypted,omitempty"`
	StorageType           string         `json:"storageType,omitempty"`
	Iops                  int64          `json:"iops,omitempty"`
	BackupRetentionPeriod int64          `json:"backupRetentionPeriod,omitempty"` // between 0 and 35, zero means disable
	DeleteProtection      bool           `json:"deleteProtection,omitempty"`
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant