Skip to content

Commit

Permalink
data/aws: create bootstrap machine in first public subnet
Browse files Browse the repository at this point in the history
openshift@afa0b59 had moved the bootstrap node to private
subnet based on openshift#1121 (comment), but we need the bootstrap node in public subnet to be able to ssh.

The bootstrap node is accesible on ssh again.
```console
$ ush core@18.215.154.240
Warning: Permanently added '18.215.154.240' (ECDSA) to the list of known hosts.
Red Hat CoreOS 4.0 Beta
WARNING: Direct SSH access to machines is not recommended.
This node has been annotated with machineconfiguration.openshift.io/ssh=accessed

---
This is the bootstrap node; it will be destroyed when the master is fully up.

The primary service is "bootkube.service". To watch its status, run e.g.

  journalctl -b -f -u bootkube.service
[core@ip-10-0-8-165 ~]$
```
  • Loading branch information
abhinavdahiya committed Mar 1, 2019
1 parent 3a5193c commit ff22066
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/data/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module "bootstrap" {
instance_type = "${var.aws_bootstrap_instance_type}"
cluster_id = "${var.cluster_id}"
ignition = "${var.ignition_bootstrap}"
subnet_id = "${module.vpc.az_to_private_subnet_id[var.aws_master_availability_zones[0]]}"
subnet_id = "${module.vpc.az_to_public_subnet_id[var.aws_master_availability_zones[0]]}"
target_group_arns = "${module.vpc.aws_lb_target_group_arns}"
target_group_arns_length = "${module.vpc.aws_lb_target_group_arns_length}"
vpc_id = "${module.vpc.vpc_id}"
Expand Down
4 changes: 4 additions & 0 deletions data/data/aws/vpc/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ output "az_to_private_subnet_id" {
value = "${zipmap(local.new_subnet_azs, local.private_subnet_ids)}"
}

output "az_to_public_subnet_id" {
value = "${zipmap(local.new_subnet_azs, local.public_subnet_ids)}"
}

output "public_subnet_ids" {
value = "${local.public_subnet_ids}"
}
Expand Down

0 comments on commit ff22066

Please sign in to comment.