Assured Workloads Creation in Free Account

Hi, Guru,

Wonder if you have tried to create Assured Workloads with Free Account.

https://github.com/GoogleCloudPlatform/assured-workloads-terraform

Before anything, one has to own an organization and billing account (in my case all free at this moment). I am able to create Assured Workloads from Cloud Console without any issue.

But when I used terraform, I ran into this issue below, no matter what compliance regime used:

tried free regime: “FEDRAMP_MODERATE”, “REGIONAL_CONTROLS”, “US_REGIONAL_ACCESS”

google_assured_workloads_workload.primary: Creating…

│ Error: Error creating Workload: operation received error: error code “13”, message: Failed to create workload., details: [map[@type:type.googleapis.com/google.rpc.ErrorInfo domain:assuredworkloads.googleapis.com reason:ERROR_CODE_CREATE_WORKLOAD_FAILURE]]
│ details: map

│ with google_assured_workloads_workload.primary,
│ on main.tf line 34, in resource “google_assured_workloads_workload” “primary”:
│ 34: resource “google_assured_workloads_workload” “primary” {

It is easy to test. Have you tried ? What do I miss ?

Thanks.

|

Hi ai4me,



Welcome to Google Cloud Community!



Based on the error that you provided, it is most likely a misconfiguration in the terraform config file. Here some troubleshooting steps:

- Check the following required permissions:



- Enable the following APIs:

- Cloud Billing API
- Service Usage API
- Cloud Resource Manager API
- Assure Workloads API


- Check Compliance Regime Compatibility


- Perform terraform Debugging
TF_LOG=DEBUG ``terraform apply


Alternatively, is to create a new terraform configuration file without using input variables. Sharing my test assured workload that was created successfully using the below configuration and image for logs.

- For main.tf


json<br>resource "google_assured_workloads_workload" "primary" {<br> compliance_regime = "FEDRAMP_MODERATE"<br> display_name = "Wednesday-demo"<br> location = "us-west1"<br> organization = "XXXXXXXXX"<br> billing_account = "billingAccounts/xxxxx-xxxxxx-xxxxx"<br> }<br>

- For provider.tf


json<br>terraform {<br> required_providers {<br> google = {<br> source = "hashicorp/google"<br> version = "6.14.0"<br> }<br> }<br>}<br>



Created Assured workload and Logs



















Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

|
| - |