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

Conversion from BICEP to Terraform - Part 1 #508

Merged
merged 40 commits into from
Feb 27, 2024

Conversation

dayland
Copy link
Contributor

@dayland dayland commented Feb 23, 2024

In this PR, we have converted the existing infrastructure to terraform in place of BICEP.

As this is Part 1 of a series of PRs for Terraform, we only support the following scenarios at this time:

  • This only support deployment to a new environment, you cannot upgrade a previously deployed BICEP environment
  • This only supports Commercial installs at the moment
    • Both existing and auto deployed AOAI instances are working
  • This version support running under CI/CD pipelines

The following scenarios will be applied in subsequent PRs

  • US Gov deployments
  • Documentation and process for upgrade/migration from BICEP to TF environment

@asbanger
Copy link
Contributor

Thank you for publishing PR. Came across with following deployment error during deployment

│ Error: "resource_group_name" cannot be blank

│ with azurerm_resource_group_template_deployment.customer_attribution[0],
│ on main.tf line 438, in resource "azurerm_resource_group_template_deployment" "customer_attribution":
│ 438: resource_group_name = var.resourceGroupName

@dayland
Copy link
Contributor Author

dayland commented Feb 23, 2024

Thank you for publishing PR. Came across with following deployment error during deployment

│ Error: "resource_group_name" cannot be blank │ │ with azurerm_resource_group_template_deployment.customer_attribution[0], │ on main.tf line 438, in resource "azurerm_resource_group_template_deployment" "customer_attribution": │ 438: resource_group_name = var.resourceGroupName │

I have fixed this in the latest commit to this PR. Please retest.

@asbanger
Copy link
Contributor

Deployment has been blocked with following errors!

Error: Invalid count argument

│ on main.tf line 431, in module "openAiRoleMgmt":
│ 431: count = module.entraObjects.azure_ad_web_app_client_id == module.entraObjects.azure_ad_mgmt_app_client_id ? 0 : 1

│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply
│ only the resources that the count depends on.

make: *** [Makefile:25: infrastructure] Error 1

@dayland
Copy link
Contributor Author

dayland commented Feb 27, 2024

Deployment has been blocked with following errors!

Error: Invalid count argument │ │ on main.tf line 431, in module "openAiRoleMgmt": │ 431: count = module.entraObjects.azure_ad_web_app_client_id == module.entraObjects.azure_ad_mgmt_app_client_id ? 0 : 1 │ │ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform cannot predict how many instances will be created. To work around this, use the -target argument to first apply │ only the resources that the count depends on. ╵ make: *** [Makefile:25: infrastructure] Error 1

Fixed in latest commit

@dayland dayland closed this Feb 27, 2024
@dayland dayland reopened this Feb 27, 2024
Copy link
Contributor

@ryonsteele ryonsteele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested a good bit yesterday, saw same role assignment error as Ashvith.
That was all I saw.

@dayland dayland merged commit e4c80ab into v1.2-Infrastructure-Changes Feb 27, 2024
5 of 6 checks passed
@dayland dayland deleted the ryonsteele/terraform-conversion branch February 27, 2024 23:25
@dayland dayland restored the ryonsteele/terraform-conversion branch February 27, 2024 23:25
@dayland dayland deleted the ryonsteele/terraform-conversion branch February 27, 2024 23:25
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

Successfully merging this pull request may close these issues.

None yet

5 participants