-
Notifications
You must be signed in to change notification settings - Fork 81
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
Fix several bugs regarding the module variables #171
Conversation
Thank you for raising the request! RAD Lab admins have been notified. |
Apache 2.0 License check successful! |
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.
Left a comment to clarify. Most of it is functionality so we can test it when its pushed to staging.
@@ -62,6 +62,13 @@ const MapField: React.FC<MapField> = ({ variable, validate }) => { | |||
{(FieldArrayProps) => { | |||
const { form } = FieldArrayProps | |||
const { values } = form | |||
if ( |
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.
Here we set variable value to empty dictionary in UI when the variable default value in terraform is undefined/null/""
- Correct me if I am wrong ?
What happens when the module is submitted will the terraform.tfvars file will have {}
as the value or the actual values like - undefined/null/""
? The reason why we need this is terraform variables are also case sensitive therefore {}
might not work in all cases.
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.
It's coming as {}
Example: See billing_budget_labels
below:
{
"zone": "asia-northeast1-a",
"organization_id": "348671237177",
"billing_account_id": "019CE6-3B2BED-9DA554",
"folder_id": "folders/411211453280",
"region": "us-central1",
"set_shielded_vm_policy": false,
"billing_budget_notification_email_addresses": [
"acolver@google.com"
],
"billing_budget_alert_spend_basis": "CURRENT_SPEND",
"billing_budget_credit_types_treatment": "INCLUDE_ALL_CREDITS",
"set_domain_restricted_sharing_policy": false,
"billing_budget_alert_spent_percents": [
0.5,
0.7,
1
],
"billing_budget_amount_currency_code": "USD",
"create_budget": true,
"set_external_ip_policy": false,
"billing_budget_amount": 500,
"billing_budget_services": [],
"billing_budget_labels": {},
"billing_budget_calendar_period": "MONTH",
"billing_budget_pubsub_topic": false,
"create_project": true,
"enable_services": true,
"owner_groups": [],
"owner_users": [],
"project_id_prefix": "radlab-billing-budget",
"trusted_groups": [],
"trusted_users": [
"acolver@sakunchala.altostrat.com"
],
"create_network": false,
"ip_cidr_range": "10.142.190.0/24",
"network_name": "radlab-network",
"subnet_name": "radlab-subnet",
"create_vm": false,
"deployment_id": "4ea5"
}
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.
billing_budget_labels
themselves have default value of {}
in terraform variables.tf so that is expected.
billing_budget_services
which is set to null
in variables.tf is correctly set to []
based on the field type
Also another variable called resource_creator_identity
which has default value of ""
I don't see that in above example.
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.
That said, Billing Budget module did deploy successfully
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.
Need some details on the the const variables.
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.
LGTM discussed offline. good to merge.
No description provided.