Skip to content

Commit

Permalink
updated region config
Browse files Browse the repository at this point in the history
  • Loading branch information
ruokun-niu committed Jan 17, 2025
1 parent 6d6b125 commit 2cdea8d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ pub fn apply_identity(spec: &mut KubernetesSpec, identity: &ServiceIdentity) {
ServiceIdentity::AwsIamAccessKey {
access_key_id,
secret_access_key,
aws_region,
} => {
env_vars.insert("AWS_ACCESS_KEY_ID".to_string(), access_key_id.clone());
env_vars.insert(
"AWS_SECRET_ACCESS_KEY".to_string(),
secret_access_key.clone(),
);
env_vars.insert("AWS_REGION".to_string(), aws_region.clone());

id_type = "AwsIamAccessKey";
}
Expand Down
4 changes: 4 additions & 0 deletions control-planes/mgmt_api/src/api/v1/mappings/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ impl From<ServiceIdentityDto> for ServiceIdentity {
ServiceIdentityDto::AwsIamAccessKey {
access_key_id,
secret_access_key,
aws_region,
} => ServiceIdentity::AwsIamAccessKey {
access_key_id: access_key_id.into(),
secret_access_key: secret_access_key.into(),
aws_region: aws_region.into(),
},
}
}
Expand Down Expand Up @@ -138,9 +140,11 @@ impl From<ServiceIdentity> for ServiceIdentityDto {
ServiceIdentity::AwsIamAccessKey {
access_key_id,
secret_access_key,
aws_region,
} => ServiceIdentityDto::AwsIamAccessKey {
access_key_id: access_key_id.into(),
secret_access_key: secret_access_key.into(),
aws_region: aws_region.into(),
},
}
}
Expand Down
2 changes: 2 additions & 0 deletions control-planes/mgmt_api/src/api/v1/models/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ pub enum ServiceIdentityDto {
access_key_id: ConfigValueDto,
#[serde(rename = "secretAccessKey")]
secret_access_key: ConfigValueDto,
#[serde(rename = "region")]
aws_region: ConfigValueDto,
},
}

Expand Down
2 changes: 2 additions & 0 deletions control-planes/mgmt_api/src/domain/mappings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,11 @@ impl From<ServiceIdentity> for resource_provider_api::models::ServiceIdentity {
ServiceIdentity::AwsIamAccessKey {
access_key_id,
secret_access_key,
aws_region,
} => resource_provider_api::models::ServiceIdentity::AwsIamAccessKey {
access_key_id: access_key_id.into(),
secret_access_key: secret_access_key.into(),
aws_region: aws_region.into(),
},
}
}
Expand Down
2 changes: 2 additions & 0 deletions control-planes/mgmt_api/src/domain/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ pub enum ServiceIdentity {
access_key_id: ConfigValue,
#[serde(rename = "secretAccessKey")]
secret_access_key: ConfigValue,
#[serde(rename = "region")]
aws_region: ConfigValue,
},
}

Expand Down
2 changes: 2 additions & 0 deletions control-planes/resource_provider_api/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ pub enum ServiceIdentity {
access_key_id: ConfigValue,
#[serde(rename = "secretAccessKey")]
secret_access_key: ConfigValue,
#[serde(rename = "region")]
aws_region: ConfigValue,
}
}

Expand Down

0 comments on commit 2cdea8d

Please sign in to comment.