-
Notifications
You must be signed in to change notification settings - Fork 96
add examples of byoc, private link and multi az #29
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
|
@@ -183,6 +183,68 @@ resource "ocm_cluster_wait" "rosa_cluster" { | |
} | ||
``` | ||
|
||
## Advanced Usages | ||
|
||
### Bring your own VPC | ||
|
||
To deploy ROSA to an existing VPC, the end user needs to provide subnet ids by editing aws_subnet_ids attribute. | ||
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. please fix the commit message (byoc-> byo VPC) |
||
|
||
``` | ||
resource "ocm_cluster_rosa_classic" "rosa_sts_cluster" { | ||
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. maybe we need to supply the tf files for creating a VPC? or adding prerequisites? |
||
name = var.cluster_name | ||
cloud_region = var.region | ||
aws_account_id = data.aws_caller_identity.current.account_id | ||
aws_subnet_ids = [var.subnet_ids] | ||
availability_zones = [var.zone] | ||
disable_waiting_in_destroy = false | ||
properties = { | ||
rosa_creator_arn = data.aws_caller_identity.current.arn | ||
} | ||
sts = local.sts_roles | ||
} | ||
``` | ||
|
||
### Private Link Cluster | ||
|
||
To deploy ROSA with private link, the end user needs to add multi_az = true | ||
|
||
**NOTES** It is users' responsibility to make sure the VPC has appropriate egress routes to fullil [rosa firewall prerequisites](https://docs.openshift.com/rosa/rosa_install_access_delete_clusters/rosa_getting_started_iam/rosa-aws-prereqs.html#osd-aws-privatelink-firewall-prerequisites_prerequisites) | ||
|
||
``` | ||
resource "ocm_cluster_rosa_classic" "rosa_sts_cluster" { | ||
name = var.cluster_name | ||
cloud_region = var.region | ||
aws_account_id = data.aws_caller_identity.current.account_id | ||
aws_subnet_ids = [var.subnet_ids] | ||
availability_zones = [var.zone] | ||
aws_private_link = true | ||
disable_waiting_in_destroy = false | ||
properties = { | ||
rosa_creator_arn = data.aws_caller_identity.current.arn | ||
} | ||
sts = local.sts_roles | ||
} | ||
``` | ||
|
||
### Multi AZ | ||
|
||
To Deploy ROSA into multiple availability zones, end user needs to add multi_az = true | ||
|
||
``` | ||
resource "ocm_cluster_rosa_classic" "rosa_sts_cluster" { | ||
name = var.cluster_name | ||
cloud_region = var.region | ||
aws_account_id = data.aws_caller_identity.current.account_id | ||
multi_az = true | ||
availability_zones = ["zone1", "zone2", "zone3"] | ||
disable_waiting_in_destroy = false | ||
properties = { | ||
rosa_creator_arn = data.aws_caller_identity.current.arn | ||
} | ||
sts = local.sts_roles | ||
} | ||
``` | ||
|
||
## Development Introduction | ||
Running `terraform plan` against a local build of OCM provider can be done by those steps: | ||
1. Run ```make install ```. After running ```make install``` you will find the ocm provider binary file in the directory: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,4 +166,66 @@ module operator_roles { | |
rh_oidc_provider_url = ocm_cluster_rosa_classic.rosa_sts_cluster.sts.oidc_endpoint_url | ||
operator_roles_properties = data.ocm_rosa_operator_roles.operator_roles.operator_iam_roles | ||
} | ||
``` | ||
|
||
## Advanced Usages | ||
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. Please do not edit the index.md manually - I tried to talk about it in the last sync meeting, after running make generate, the generate tool replaced that file with an auto-generated... |
||
|
||
### Bring your own VPC | ||
|
||
To deploy ROSA to an existing VPC, the end user needs to provide subnet ids by editing aws_subnet_ids attribute. | ||
|
||
``` | ||
resource "ocm_cluster_rosa_classic" "rosa_sts_cluster" { | ||
name = var.cluster_name | ||
cloud_region = var.region | ||
aws_account_id = data.aws_caller_identity.current.account_id | ||
aws_subnet_ids = [var.subnet_ids] | ||
availability_zones = [var.zone] | ||
disable_waiting_in_destroy = false | ||
properties = { | ||
rosa_creator_arn = data.aws_caller_identity.current.arn | ||
} | ||
sts = local.sts_roles | ||
} | ||
``` | ||
|
||
### Private Link Cluster | ||
|
||
To deploy ROSA with private link, the end user needs to add multi_az = true | ||
|
||
**NOTES** It is users' responsibility to make sure the VPC has appropriate egress routes to fullil [rosa firewall prerequisites](https://docs.openshift.com/rosa/rosa_install_access_delete_clusters/rosa_getting_started_iam/rosa-aws-prereqs.html#osd-aws-privatelink-firewall-prerequisites_prerequisites) | ||
|
||
``` | ||
resource "ocm_cluster_rosa_classic" "rosa_sts_cluster" { | ||
name = var.cluster_name | ||
cloud_region = var.region | ||
aws_account_id = data.aws_caller_identity.current.account_id | ||
aws_subnet_ids = [var.subnet_ids] | ||
availability_zones = [var.zone] | ||
aws_private_link = true | ||
disable_waiting_in_destroy = false | ||
properties = { | ||
rosa_creator_arn = data.aws_caller_identity.current.arn | ||
} | ||
sts = local.sts_roles | ||
} | ||
``` | ||
|
||
### Multi AZ | ||
|
||
To Deploy ROSA into multiple availability zones, end user needs to add multi_az = true | ||
|
||
``` | ||
resource "ocm_cluster_rosa_classic" "rosa_sts_cluster" { | ||
name = var.cluster_name | ||
cloud_region = var.region | ||
aws_account_id = data.aws_caller_identity.current.account_id | ||
multi_az = true | ||
availability_zones = ["zone1", "zone2", "zone3"] | ||
disable_waiting_in_destroy = false | ||
properties = { | ||
rosa_creator_arn = data.aws_caller_identity.current.arn | ||
} | ||
sts = local.sts_roles | ||
} | ||
``` |
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.
please remove the 
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.
@bardielle can you elaborate?
Uh oh!
There was an error while loading. Please reload this page.
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.
In your lase commit you added the line 181 and 183 with a sign that looks different: 
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.
hmm. I do not see that in either diff/file difference on github 🤔