-
Notifications
You must be signed in to change notification settings - Fork 18
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
Added mini variant #21
base: main
Are you sure you want to change the base?
Conversation
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.
This is the manual change I mentioned in the PR description. Setting the source here to aws-mini
will take the HCL from that directory and not from the original one (which has all the cluster / VPC / subnet / ... creation bits).
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.
Reviewing.
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.
I receive this error under terraform plan:
Error: Unsupported attribute
on modules/deploy/aws-mini/main.tf line 50, in data "aws_subnet" "selected_subnet":
50: id = var.options.cfg.aws.subnet_id
├────────────────
│ var.options.cfg.aws is object with 11 attributes
This object does not have an attribute named "subnet_id".
Error: Unsupported attribute
on modules/deploy/aws-mini/main.tf line 54, in data "aws_security_group" "selected_security_group":
54: id = var.options.cfg.aws.sg_id
├────────────────
│ var.options.cfg.aws is object with 11 attributes
This object does not have an attribute named "sg_id".
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.
you need to put those values into your config.yml
:
aws:
region: us-east-1
bucket: your-bucket-here
flavor: c5.2xlarge
profile: your-profile-here
enable_ebs_encryption: false
subnet_id: "subnet-1234567890"
sg_id: "sg-1234567890"
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.
Perhaps you mean the config-aws-mini.yml (config.yml in the aws-mini variant doesn't have subnet_id nor sg_id defined)? Yes, I've done that.
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.
The config-aws-mini.yml
configuration example is not used by default, it just serves as an example what to put into the actual configuration... You have two options:
- copy the content of
config-aws-mini.yml
intoconfig.yml
-or- - define the
export TF_VAR_cfg_file="config-aws-mini.yml"
environment variable that specifies which configuration file to use.
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.
But re-reading your comment makes me think that you did add the attributes to the aws
object in your config.yml
. Not sure in this case. We might need to get on a call to look into this together. Otherwise this is going to be difficult.
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.
I cloned the latest DEV branch, including your edits from last night, made the appropriate updates as per the AWS Mini instructions, and all is working now. Looks like for at least @BobbyGR and I, this is a good variant.
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.
@BobbyGR, May I know if you got it working or are you still stuck?
it looks like it wants to delete the security group defined first?
|
hard to say what's going on here without additional context. |
|
@BobbyGR there's something wrong with your configuration. The |
This adds a AWS-mini variant. It's not nicely integrated with the existing code and requires a manual change in the deploy module to activate it. The current branch has it activated, though. But that will be removed eventually.
What it does:
Configuration
I've added a minimized
config-aws-mini.yml
which has just the minimum required attributes in theaws
andcommon
block.Elastic IP
If no EIP is needed/wanted, then
public_ip
toprivate_ip
inoutput.tf
In this case, the machine that runs Terraform / the provisioning must be able to reach the private IP address and the security group must permit HTTPS to the controller.