Open molivo123 opened 2 months ago
Thank you for opening the issue. Unless the blueprint is enabled in your account/region you would need
resource "awscc_datazone_environment_blueprint_configuration" "this" {
domain_identifier = awscc_datazone_domain.this.id
enabled_regions=["us-east-1"]
environment_blueprint_identifier = "DefaultDataLake"
}
The project_identifier is not the name and the environment_blueprint_identifier can be pulled from the awscc_datazone_environment_blueprint_configuration
.
resource "awscc_datazone_environment_profile" "example_profile" {
aws_account_id = data.aws_caller_identity.current.account_id
aws_account_region = "us-east-1"
domain_identifier = awscc_datazone_domain.this.domain_id
environment_blueprint_identifier = awscc_datazone_environment_blueprint_configuration.this.environment_blueprint_id
name = "dev"
project_identifier = awscc_datazone_project.engineering_project.project_id
}
resource "awscc_datazone_environment_blueprint_configuration" "this" {
domain_identifier = awscc_datazone_domain.this.domain_id
enabled_regions = ["us-east-1"]
environment_blueprint_identifier = "DefaultDataLake"
manage_access_role_arn=awscc_iam_role.awscc_datazone_role.arn
provisioning_role_arn=awscc_iam_role.awscc_datazone_role.arn
}
@quixoticmonk Thank you for your response! I followed your advice and was able to get past that error however I have another which I was hoping you could help me with after I changed my code to match what you recommended. It seems like now my apply is stuck on creating the environment:
awscc_datazone_environment.example_environment: Creating...
awscc_datazone_environment.example_environment: Still creating... [10s elapsed]
awscc_datazone_environment.example_environment: Still creating... [20s elapsed]
awscc_datazone_environment.example_environment: Still creating... [30s elapsed]
awscc_datazone_environment.example_environment: Still creating... [40s elapsed]
awscc_datazone_environment.example_environment: Still creating... [50s elapsed]
awscc_datazone_environment.example_environment: Still creating... [1m0s elapsed]
awscc_datazone_environment.example_environment: Still creating... [1m10s elapsed]
awscc_datazone_environment.example_environment: Still creating... [1m20s elapsed]
awscc_datazone_environment.example_environment: Still creating... [1m30s elapsed]
awscc_datazone_environment.example_environment: Still creating... [1m40s elapsed]
awscc_datazone_environment.example_environment: Still creating... [1m50s elapsed]
awscc_datazone_environment.example_environment: Still creating... [2m0s elapsed]
awscc_datazone_environment.example_environment: Still creating... [2m10s elapsed]
β·
β Error: AWS SDK Go Service Operation Incomplete
β
β with awscc_datazone_environment.example_environment,
β on environment.tf line 1, in resource "awscc_datazone_environment" "example_environment":
β 1: resource "awscc_datazone_environment" "example_environment" {
β
β Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: Environment company_env with
β id cdz57ne9221lzk and domain id dzd_56vhbgooce2is0 failed to stabilize due to internal failure, last deployment status Deployment(DeploymentId=b6twvkfp1c3zps,
β DeploymentStatus=FAILED, DeploymentType=CREATE, FailureReason=EnvironmentError(Code=400, Message=Environment blueprint configuration needs to enable atleast one
β region), IsDeploymentComplete=true). ErrorCode: NotStabilized
@molivo123 Will try to reproduce this on my end. Looks similar to the CC api's response as in https://github.com/hashicorp/terraform-provider-awscc/issues/1562
@wellsiau-aws Do you prefer this issue being closed for the original environment profile one since this is for the environment resource and tracked under a different one?
thanks for reporting this issue, I would prefer we keep this issue open for further investigation.
@quixoticmonk I will spin up another issue for this in the meantime, since this new issue seems to be different than the original I mentioned in the beginning of this issue
β Error: AWS SDK Go Service Operation Incomplete
β
β with awscc_datazone_environment.this,
β on main.tf line 80, in resource "awscc_datazone_environment" "this":
β 80: resource "awscc_datazone_environment" "this" {
β
β Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: Environment dev
β with id dt39addcsoru7b and domain id dzd_5t84u6i8txa947 failed to stabilize due to internal failure, last deployment status
β Deployment(DeploymentId=5qo8jxeu7g2unb, DeploymentStatus=FAILED, DeploymentType=CREATE, FailureReason=EnvironmentError(Code=400, Message=Environment
β blueprint configuration needs to enable atleast one region), IsDeploymentComplete=true). ErrorCode: NotStabilized
There is an error on the project
Environment Status: Create Failed
Environment blueprint configuration needs to enable atleast one region
@molivo123 The blueprint configuration requires additional regional parameters for the environment to be provisioned. Sample update below. I was able to provision the environment within the datazone project.
resource "awscc_datazone_environment_blueprint_configuration" "this" {
domain_identifier = awscc_datazone_domain.this.domain_id
enabled_regions = ["us-east-1"]
environment_blueprint_identifier = "DefaultDataLake"
manage_access_role_arn = awscc_iam_role.awscc_datazone_role.arn
provisioning_role_arn = awscc_iam_role.awscc_datazone_role.arn
regional_parameters = [ {
parameters = {
"S3Location": "s3:/<bucket_name>"
}
region = "us-east-1"
} ]
}
Keep in mind that the service role would require access to Athena Workgroups and Lakeformation for the environment to be provisioned.
Community Note
Terraform CLI and Terraform AWS Cloud Control Provider Version
Terraform v1.0.7 on linux_amd64
Affected Resource(s)
AWSCC and Amazon Datazone
env_profile.tf
project.tf
iam.tf
Debugging Output
Expected Behavior
environment profile should be able to be created
Actual Beavior
terraform apply erroring out on environment profile creation
Steps to Reproduce