Terraform - Update to latest commit (#5982)
This commit is contained in:
parent
c4a3644902
commit
3a430780f7
@ -39,6 +39,7 @@ class CertificateAuthority(BaseModel):
|
|||||||
self.created_at = unix_time()
|
self.created_at = unix_time()
|
||||||
self.updated_at: Optional[float] = None
|
self.updated_at: Optional[float] = None
|
||||||
self.status = "PENDING_CERTIFICATE"
|
self.status = "PENDING_CERTIFICATE"
|
||||||
|
self.usage_mode = "SHORT_LIVED_CERTIFICATE"
|
||||||
|
|
||||||
common_name = self.certificate_authority_configuration.get("Subject", {}).get(
|
common_name = self.certificate_authority_configuration.get("Subject", {}).get(
|
||||||
"CommonName", "Moto.org"
|
"CommonName", "Moto.org"
|
||||||
@ -168,6 +169,7 @@ class CertificateAuthority(BaseModel):
|
|||||||
"RevocationConfiguration": self.revocation_configuration,
|
"RevocationConfiguration": self.revocation_configuration,
|
||||||
"CreatedAt": self.created_at,
|
"CreatedAt": self.created_at,
|
||||||
"Status": self.status,
|
"Status": self.status,
|
||||||
|
"UsageMode": self.usage_mode,
|
||||||
}
|
}
|
||||||
if self.updated_at:
|
if self.updated_at:
|
||||||
dct["LastStateChangeAt"] = self.updated_at
|
dct["LastStateChangeAt"] = self.updated_at
|
||||||
|
@ -3,8 +3,21 @@
|
|||||||
from .exceptions import CostCategoryNotFound
|
from .exceptions import CostCategoryNotFound
|
||||||
from moto.core import BaseBackend, BackendDict, BaseModel
|
from moto.core import BaseBackend, BackendDict, BaseModel
|
||||||
from moto.utilities.tagging_service import TaggingService
|
from moto.utilities.tagging_service import TaggingService
|
||||||
|
from moto.core.utils import iso_8601_datetime_without_milliseconds
|
||||||
from moto.moto_api._internal import mock_random
|
from moto.moto_api._internal import mock_random
|
||||||
from typing import Any, Dict, List, Tuple
|
from datetime import datetime
|
||||||
|
from typing import Any, Dict, List, Tuple, Optional
|
||||||
|
|
||||||
|
|
||||||
|
def first_day() -> str:
|
||||||
|
as_date = (
|
||||||
|
datetime.today()
|
||||||
|
.replace(day=1)
|
||||||
|
.replace(hour=0)
|
||||||
|
.replace(minute=0)
|
||||||
|
.replace(second=0)
|
||||||
|
)
|
||||||
|
return iso_8601_datetime_without_milliseconds(as_date) # type: ignore[return-value]
|
||||||
|
|
||||||
|
|
||||||
class CostCategoryDefinition(BaseModel):
|
class CostCategoryDefinition(BaseModel):
|
||||||
@ -12,6 +25,7 @@ class CostCategoryDefinition(BaseModel):
|
|||||||
self,
|
self,
|
||||||
account_id: str,
|
account_id: str,
|
||||||
name: str,
|
name: str,
|
||||||
|
effective_start: Optional[str],
|
||||||
rule_version: str,
|
rule_version: str,
|
||||||
rules: List[Dict[str, Any]],
|
rules: List[Dict[str, Any]],
|
||||||
default_value: str,
|
default_value: str,
|
||||||
@ -23,10 +37,12 @@ class CostCategoryDefinition(BaseModel):
|
|||||||
self.default_value = default_value
|
self.default_value = default_value
|
||||||
self.split_charge_rules = split_charge_rules
|
self.split_charge_rules = split_charge_rules
|
||||||
self.arn = f"arn:aws:ce::{account_id}:costcategory/{str(mock_random.uuid4())}"
|
self.arn = f"arn:aws:ce::{account_id}:costcategory/{str(mock_random.uuid4())}"
|
||||||
|
self.effective_start: str = effective_start or first_day()
|
||||||
|
|
||||||
def update(
|
def update(
|
||||||
self,
|
self,
|
||||||
rule_version: str,
|
rule_version: str,
|
||||||
|
effective_start: Optional[str],
|
||||||
rules: List[Dict[str, Any]],
|
rules: List[Dict[str, Any]],
|
||||||
default_value: str,
|
default_value: str,
|
||||||
split_charge_rules: List[Dict[str, Any]],
|
split_charge_rules: List[Dict[str, Any]],
|
||||||
@ -35,11 +51,13 @@ class CostCategoryDefinition(BaseModel):
|
|||||||
self.rules = rules
|
self.rules = rules
|
||||||
self.default_value = default_value
|
self.default_value = default_value
|
||||||
self.split_charge_rules = split_charge_rules
|
self.split_charge_rules = split_charge_rules
|
||||||
|
self.effective_start = effective_start or first_day()
|
||||||
|
|
||||||
def to_json(self) -> Dict[str, Any]:
|
def to_json(self) -> Dict[str, Any]:
|
||||||
return {
|
return {
|
||||||
"CostCategoryArn": self.arn,
|
"CostCategoryArn": self.arn,
|
||||||
"Name": self.name,
|
"Name": self.name,
|
||||||
|
"EffectiveStart": self.effective_start,
|
||||||
"RuleVersion": self.rule_version,
|
"RuleVersion": self.rule_version,
|
||||||
"Rules": self.rules,
|
"Rules": self.rules,
|
||||||
"DefaultValue": self.default_value,
|
"DefaultValue": self.default_value,
|
||||||
@ -58,6 +76,7 @@ class CostExplorerBackend(BaseBackend):
|
|||||||
def create_cost_category_definition(
|
def create_cost_category_definition(
|
||||||
self,
|
self,
|
||||||
name: str,
|
name: str,
|
||||||
|
effective_start: Optional[str],
|
||||||
rule_version: str,
|
rule_version: str,
|
||||||
rules: List[Dict[str, Any]],
|
rules: List[Dict[str, Any]],
|
||||||
default_value: str,
|
default_value: str,
|
||||||
@ -70,6 +89,7 @@ class CostExplorerBackend(BaseBackend):
|
|||||||
ccd = CostCategoryDefinition(
|
ccd = CostCategoryDefinition(
|
||||||
self.account_id,
|
self.account_id,
|
||||||
name,
|
name,
|
||||||
|
effective_start,
|
||||||
rule_version,
|
rule_version,
|
||||||
rules,
|
rules,
|
||||||
default_value,
|
default_value,
|
||||||
@ -77,7 +97,7 @@ class CostExplorerBackend(BaseBackend):
|
|||||||
)
|
)
|
||||||
self.cost_categories[ccd.arn] = ccd
|
self.cost_categories[ccd.arn] = ccd
|
||||||
self.tag_resource(ccd.arn, tags)
|
self.tag_resource(ccd.arn, tags)
|
||||||
return ccd.arn, ""
|
return ccd.arn, ccd.effective_start
|
||||||
|
|
||||||
def describe_cost_category_definition(
|
def describe_cost_category_definition(
|
||||||
self, cost_category_arn: str
|
self, cost_category_arn: str
|
||||||
@ -102,6 +122,7 @@ class CostExplorerBackend(BaseBackend):
|
|||||||
def update_cost_category_definition(
|
def update_cost_category_definition(
|
||||||
self,
|
self,
|
||||||
cost_category_arn: str,
|
cost_category_arn: str,
|
||||||
|
effective_start: Optional[str],
|
||||||
rule_version: str,
|
rule_version: str,
|
||||||
rules: List[Dict[str, Any]],
|
rules: List[Dict[str, Any]],
|
||||||
default_value: str,
|
default_value: str,
|
||||||
@ -111,9 +132,15 @@ class CostExplorerBackend(BaseBackend):
|
|||||||
The EffectiveOn-parameter is not yet implemented
|
The EffectiveOn-parameter is not yet implemented
|
||||||
"""
|
"""
|
||||||
cost_category = self.describe_cost_category_definition(cost_category_arn)
|
cost_category = self.describe_cost_category_definition(cost_category_arn)
|
||||||
cost_category.update(rule_version, rules, default_value, split_charge_rules)
|
cost_category.update(
|
||||||
|
rule_version=rule_version,
|
||||||
|
rules=rules,
|
||||||
|
default_value=default_value,
|
||||||
|
split_charge_rules=split_charge_rules,
|
||||||
|
effective_start=effective_start,
|
||||||
|
)
|
||||||
|
|
||||||
return cost_category_arn, ""
|
return cost_category_arn, cost_category.effective_start
|
||||||
|
|
||||||
def list_tags_for_resource(self, resource_arn: str) -> List[Dict[str, str]]:
|
def list_tags_for_resource(self, resource_arn: str) -> List[Dict[str, str]]:
|
||||||
return self.tagger.list_tags_for_resource(arn=resource_arn)["Tags"]
|
return self.tagger.list_tags_for_resource(arn=resource_arn)["Tags"]
|
||||||
|
@ -20,12 +20,14 @@ class CostExplorerResponse(BaseResponse):
|
|||||||
rules = params.get("Rules")
|
rules = params.get("Rules")
|
||||||
default_value = params.get("DefaultValue")
|
default_value = params.get("DefaultValue")
|
||||||
split_charge_rules = params.get("SplitChargeRules")
|
split_charge_rules = params.get("SplitChargeRules")
|
||||||
|
effective_start = params.get("EffectiveStart")
|
||||||
tags = params.get("ResourceTags")
|
tags = params.get("ResourceTags")
|
||||||
(
|
(
|
||||||
cost_category_arn,
|
cost_category_arn,
|
||||||
effective_start,
|
effective_start,
|
||||||
) = self.ce_backend.create_cost_category_definition(
|
) = self.ce_backend.create_cost_category_definition(
|
||||||
name=name,
|
name=name,
|
||||||
|
effective_start=effective_start,
|
||||||
rule_version=rule_version,
|
rule_version=rule_version,
|
||||||
rules=rules,
|
rules=rules,
|
||||||
default_value=default_value,
|
default_value=default_value,
|
||||||
@ -60,6 +62,7 @@ class CostExplorerResponse(BaseResponse):
|
|||||||
def update_cost_category_definition(self) -> str:
|
def update_cost_category_definition(self) -> str:
|
||||||
params = json.loads(self.body)
|
params = json.loads(self.body)
|
||||||
cost_category_arn = params.get("CostCategoryArn")
|
cost_category_arn = params.get("CostCategoryArn")
|
||||||
|
effective_start = params.get("EffectiveStart")
|
||||||
rule_version = params.get("RuleVersion")
|
rule_version = params.get("RuleVersion")
|
||||||
rules = params.get("Rules")
|
rules = params.get("Rules")
|
||||||
default_value = params.get("DefaultValue")
|
default_value = params.get("DefaultValue")
|
||||||
@ -69,6 +72,7 @@ class CostExplorerResponse(BaseResponse):
|
|||||||
effective_start,
|
effective_start,
|
||||||
) = self.ce_backend.update_cost_category_definition(
|
) = self.ce_backend.update_cost_category_definition(
|
||||||
cost_category_arn=cost_category_arn,
|
cost_category_arn=cost_category_arn,
|
||||||
|
effective_start=effective_start,
|
||||||
rule_version=rule_version,
|
rule_version=rule_version,
|
||||||
rules=rules,
|
rules=rules,
|
||||||
default_value=default_value,
|
default_value=default_value,
|
||||||
|
@ -65,6 +65,7 @@ class Cluster(BaseObject, CloudFormationModel):
|
|||||||
capacity_providers: Optional[List[str]] = None,
|
capacity_providers: Optional[List[str]] = None,
|
||||||
default_capacity_provider_strategy: Optional[List[Dict[str, Any]]] = None,
|
default_capacity_provider_strategy: Optional[List[Dict[str, Any]]] = None,
|
||||||
tags: Optional[List[Dict[str, str]]] = None,
|
tags: Optional[List[Dict[str, str]]] = None,
|
||||||
|
service_connect_defaults: Optional[Dict[str, str]] = None,
|
||||||
):
|
):
|
||||||
self.active_services_count = 0
|
self.active_services_count = 0
|
||||||
self.arn = f"arn:aws:ecs:{region_name}:{account_id}:cluster/{cluster_name}"
|
self.arn = f"arn:aws:ecs:{region_name}:{account_id}:cluster/{cluster_name}"
|
||||||
@ -74,11 +75,14 @@ class Cluster(BaseObject, CloudFormationModel):
|
|||||||
self.running_tasks_count = 0
|
self.running_tasks_count = 0
|
||||||
self.status = "ACTIVE"
|
self.status = "ACTIVE"
|
||||||
self.region_name = region_name
|
self.region_name = region_name
|
||||||
self.settings = cluster_settings
|
self.settings = cluster_settings or [
|
||||||
|
{"name": "containerInsights", "value": "disabled"}
|
||||||
|
]
|
||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
self.capacity_providers = capacity_providers
|
self.capacity_providers = capacity_providers
|
||||||
self.default_capacity_provider_strategy = default_capacity_provider_strategy
|
self.default_capacity_provider_strategy = default_capacity_provider_strategy
|
||||||
self.tags = tags
|
self.tags = tags
|
||||||
|
self.service_connect_defaults = service_connect_defaults
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def physical_resource_id(self) -> str:
|
def physical_resource_id(self) -> str:
|
||||||
@ -962,6 +966,7 @@ class EC2ContainerServiceBackend(BaseBackend):
|
|||||||
configuration: Optional[Dict[str, Any]] = None,
|
configuration: Optional[Dict[str, Any]] = None,
|
||||||
capacity_providers: Optional[List[str]] = None,
|
capacity_providers: Optional[List[str]] = None,
|
||||||
default_capacity_provider_strategy: Optional[List[Dict[str, Any]]] = None,
|
default_capacity_provider_strategy: Optional[List[Dict[str, Any]]] = None,
|
||||||
|
service_connect_defaults: Optional[Dict[str, str]] = None,
|
||||||
) -> Cluster:
|
) -> Cluster:
|
||||||
cluster = Cluster(
|
cluster = Cluster(
|
||||||
cluster_name,
|
cluster_name,
|
||||||
@ -972,6 +977,7 @@ class EC2ContainerServiceBackend(BaseBackend):
|
|||||||
capacity_providers,
|
capacity_providers,
|
||||||
default_capacity_provider_strategy,
|
default_capacity_provider_strategy,
|
||||||
tags,
|
tags,
|
||||||
|
service_connect_defaults=service_connect_defaults,
|
||||||
)
|
)
|
||||||
self.clusters[cluster_name] = cluster
|
self.clusters[cluster_name] = cluster
|
||||||
return cluster
|
return cluster
|
||||||
@ -981,15 +987,18 @@ class EC2ContainerServiceBackend(BaseBackend):
|
|||||||
cluster_name: str,
|
cluster_name: str,
|
||||||
cluster_settings: Optional[List[Dict[str, str]]],
|
cluster_settings: Optional[List[Dict[str, str]]],
|
||||||
configuration: Optional[Dict[str, Any]],
|
configuration: Optional[Dict[str, Any]],
|
||||||
|
service_connect_defaults: Optional[Dict[str, str]],
|
||||||
) -> Cluster:
|
) -> Cluster:
|
||||||
"""
|
"""
|
||||||
The serviceConnectDefaults-parameter is not yet implemented
|
The serviceConnectDefaults-parameter is not yet implemented
|
||||||
"""
|
"""
|
||||||
cluster = self._get_cluster(cluster_name)
|
cluster = self._get_cluster(cluster_name)
|
||||||
if cluster_settings:
|
if cluster_settings is not None:
|
||||||
cluster.settings = cluster_settings
|
cluster.settings = cluster_settings
|
||||||
if configuration:
|
if configuration is not None:
|
||||||
cluster.configuration = configuration
|
cluster.configuration = configuration
|
||||||
|
if service_connect_defaults is not None:
|
||||||
|
cluster.service_connect_defaults = service_connect_defaults
|
||||||
return cluster
|
return cluster
|
||||||
|
|
||||||
def put_cluster_capacity_providers(
|
def put_cluster_capacity_providers(
|
||||||
|
@ -29,6 +29,7 @@ class EC2ContainerServiceResponse(BaseResponse):
|
|||||||
default_capacity_provider_strategy = self._get_param(
|
default_capacity_provider_strategy = self._get_param(
|
||||||
"defaultCapacityProviderStrategy"
|
"defaultCapacityProviderStrategy"
|
||||||
)
|
)
|
||||||
|
service_connect_defaults = self._get_param("serviceConnectDefaults")
|
||||||
if cluster_name is None:
|
if cluster_name is None:
|
||||||
cluster_name = "default"
|
cluster_name = "default"
|
||||||
cluster = self.ecs_backend.create_cluster(
|
cluster = self.ecs_backend.create_cluster(
|
||||||
@ -38,6 +39,7 @@ class EC2ContainerServiceResponse(BaseResponse):
|
|||||||
configuration,
|
configuration,
|
||||||
capacity_providers,
|
capacity_providers,
|
||||||
default_capacity_provider_strategy,
|
default_capacity_provider_strategy,
|
||||||
|
service_connect_defaults=service_connect_defaults,
|
||||||
)
|
)
|
||||||
return json.dumps({"cluster": cluster.response_object})
|
return json.dumps({"cluster": cluster.response_object})
|
||||||
|
|
||||||
@ -49,7 +51,13 @@ class EC2ContainerServiceResponse(BaseResponse):
|
|||||||
cluster_name = self._get_param("cluster")
|
cluster_name = self._get_param("cluster")
|
||||||
settings = self._get_param("settings")
|
settings = self._get_param("settings")
|
||||||
configuration = self._get_param("configuration")
|
configuration = self._get_param("configuration")
|
||||||
cluster = self.ecs_backend.update_cluster(cluster_name, settings, configuration)
|
service_connect_defaults = self._get_param("serviceConnectDefaults")
|
||||||
|
cluster = self.ecs_backend.update_cluster(
|
||||||
|
cluster_name=cluster_name,
|
||||||
|
cluster_settings=settings,
|
||||||
|
configuration=configuration,
|
||||||
|
service_connect_defaults=service_connect_defaults,
|
||||||
|
)
|
||||||
return json.dumps({"cluster": cluster.response_object})
|
return json.dumps({"cluster": cluster.response_object})
|
||||||
|
|
||||||
def put_cluster_capacity_providers(self) -> str:
|
def put_cluster_capacity_providers(self) -> str:
|
||||||
|
@ -30,7 +30,7 @@ class FileSystemNotFound(EFSError):
|
|||||||
def __init__(self, file_system_id: str):
|
def __init__(self, file_system_id: str):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
"FileSystemNotFound",
|
"FileSystemNotFound",
|
||||||
f"File system {file_system_id} does not exist.",
|
f"File system '{file_system_id}' does not exist.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1127,9 +1127,9 @@ class Group(BaseModel):
|
|||||||
def arn(self):
|
def arn(self):
|
||||||
if self.path == "/":
|
if self.path == "/":
|
||||||
return f"arn:aws:iam::{self.account_id}:group/{self.name}"
|
return f"arn:aws:iam::{self.account_id}:group/{self.name}"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return f"arn:aws:iam::{self.account_id}:group/{self.path}/{self.name}"
|
# The path must by definition end and start with a forward slash. So we don't have to add more slashes to the ARN
|
||||||
|
return f"arn:aws:iam::{self.account_id}:group{self.path}{self.name}"
|
||||||
|
|
||||||
def get_policy(self, policy_name):
|
def get_policy(self, policy_name):
|
||||||
try:
|
try:
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
|
From 7b63ad24b4e5a9c874c0430431bf90cd12d9162b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bert Blommers <info@bertblommers.nl>
|
||||||
|
Date: Thu, 23 Feb 2023 20:04:15 -0100
|
||||||
|
Subject: [PATCH] Patch: Hardcode endpoints
|
||||||
|
|
||||||
|
---
|
||||||
|
internal/conns/config.go | 16 ++++++++++++++++
|
||||||
|
internal/provider/provider.go | 4 ++--
|
||||||
|
2 files changed, 18 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/internal/conns/config.go b/internal/conns/config.go
|
diff --git a/internal/conns/config.go b/internal/conns/config.go
|
||||||
index 13b7d153a7..1d981e9097 100644
|
index 89ce54fc36..72d17bda71 100644
|
||||||
--- a/internal/conns/config.go
|
--- a/internal/conns/config.go
|
||||||
+++ b/internal/conns/config.go
|
+++ b/internal/conns/config.go
|
||||||
@@ -86,8 +86,23 @@ type Config struct {
|
@@ -77,8 +77,24 @@ type Config struct {
|
||||||
UseFIPSEndpoint bool
|
UseFIPSEndpoint bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15,6 +25,7 @@ index 13b7d153a7..1d981e9097 100644
|
|||||||
+ }
|
+ }
|
||||||
+ return localEndpoints
|
+ return localEndpoints
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
+
|
+
|
||||||
// ConfigureProvider configures the provided provider Meta (instance data).
|
// ConfigureProvider configures the provided provider Meta (instance data).
|
||||||
func (c *Config) ConfigureProvider(ctx context.Context, client *AWSClient) (*AWSClient, diag.Diagnostics) {
|
func (c *Config) ConfigureProvider(ctx context.Context, client *AWSClient) (*AWSClient, diag.Diagnostics) {
|
||||||
@ -27,10 +38,10 @@ index 13b7d153a7..1d981e9097 100644
|
|||||||
AccessKey: c.AccessKey,
|
AccessKey: c.AccessKey,
|
||||||
APNInfo: StdUserAgentProducts(c.TerraformVersion),
|
APNInfo: StdUserAgentProducts(c.TerraformVersion),
|
||||||
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
|
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
|
||||||
index c49bd366d3..2db930e61d 100644
|
index 1c2fcaada9..636902d879 100644
|
||||||
--- a/internal/provider/provider.go
|
--- a/internal/provider/provider.go
|
||||||
+++ b/internal/provider/provider.go
|
+++ b/internal/provider/provider.go
|
||||||
@@ -2196,13 +2196,13 @@ func configure(ctx context.Context, provider *schema.Provider, d *schema.Resourc
|
@@ -2295,13 +2295,13 @@ func configure(ctx context.Context, provider *schema.Provider, d *schema.Resourc
|
||||||
CustomCABundle: d.Get("custom_ca_bundle").(string),
|
CustomCABundle: d.Get("custom_ca_bundle").(string),
|
||||||
EC2MetadataServiceEndpoint: d.Get("ec2_metadata_service_endpoint").(string),
|
EC2MetadataServiceEndpoint: d.Get("ec2_metadata_service_endpoint").(string),
|
||||||
EC2MetadataServiceEndpointMode: d.Get("ec2_metadata_service_endpoint_mode").(string),
|
EC2MetadataServiceEndpointMode: d.Get("ec2_metadata_service_endpoint_mode").(string),
|
||||||
@ -46,3 +57,6 @@ index c49bd366d3..2db930e61d 100644
|
|||||||
SecretKey: d.Get("secret_key").(string),
|
SecretKey: d.Get("secret_key").(string),
|
||||||
SkipCredsValidation: d.Get("skip_credentials_validation").(bool),
|
SkipCredsValidation: d.Get("skip_credentials_validation").(bool),
|
||||||
SkipGetEC2Platforms: d.Get("skip_get_ec2_platforms").(bool),
|
SkipGetEC2Platforms: d.Get("skip_get_ec2_platforms").(bool),
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f9a6db6e3c3f3299701747972fd6c37ba4af36f4
|
Subproject commit a8163ccac8494c5beaa108369a0c8531f3800e18
|
@ -49,3 +49,13 @@ TestAccSsmParameterDataSource
|
|||||||
TestAccDataSourceLambdaLayerVersion
|
TestAccDataSourceLambdaLayerVersion
|
||||||
TestAccDataSourceLambdaInvocation
|
TestAccDataSourceLambdaInvocation
|
||||||
TestAccDataSourceNetworkInterface_
|
TestAccDataSourceNetworkInterface_
|
||||||
|
|
||||||
|
TestAccELBListenerPolicy_update
|
||||||
|
TestAccServiceDiscoveryService_private
|
||||||
|
TestAccIAMGroup_path
|
||||||
|
TestAccLambdaFunctionURL_Cors
|
||||||
|
TestAccVPCNATGateway_privateIP
|
||||||
|
TestAccVPCSecurityGroupRule_multiDescription
|
||||||
|
|
||||||
|
# TF expects a wrong error message, which is not in-line with what AWS returns
|
||||||
|
TestAccEFSFileSystemDataSource_nonExistent_fileSystemID
|
||||||
|
@ -135,9 +135,27 @@ ec2:
|
|||||||
- TestAccEC2VPNGatewayAttachment_
|
- TestAccEC2VPNGatewayAttachment_
|
||||||
- TestAccVPCEgressOnlyInternetGateway_
|
- TestAccVPCEgressOnlyInternetGateway_
|
||||||
- TestAccVPCInternetGateway
|
- TestAccVPCInternetGateway
|
||||||
- TestAccVPCNATGateway_
|
- TestAccVPCNATGateway_basic
|
||||||
|
- TestAccVPCNATGateway_disappears
|
||||||
|
- TestAccVPCNATGateway_ConnectivityType_private
|
||||||
|
- TestAccVPCNATGateway_tags
|
||||||
- TestAccVPCSecurityGroupDataSource_basic
|
- TestAccVPCSecurityGroupDataSource_basic
|
||||||
- TestAccVPCSecurityGroupRule_
|
- TestAccVPCSecurityGroupRule_Ingress
|
||||||
|
- TestAccVPCSecurityGroupRule_egress
|
||||||
|
- TestAccVPCSecurityGroupRule_selfReference
|
||||||
|
- TestAccVPCSecurityGroupRule_expectInvalid
|
||||||
|
- TestAccVPCSecurityGroupRule_PartialMatching
|
||||||
|
- TestAccVPCSecurityGroupRule_issue5310
|
||||||
|
- TestAccVPCSecurityGroupRule_race
|
||||||
|
- TestAccVPCSecurityGroupRule_selfSource
|
||||||
|
- TestAccVPCSecurityGroupRule_prefixList
|
||||||
|
- TestAccVPCSecurityGroupRule_ingressDescription
|
||||||
|
- TestAccVPCSecurityGroupRule_egressDescription
|
||||||
|
- TestAccVPCSecurityGroupRule_IngressDescription_updates
|
||||||
|
- TestAccVPCSecurityGroupRule_EgressDescription_updates
|
||||||
|
- TestAccVPCSecurityGroupRule_Description
|
||||||
|
- TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash
|
||||||
|
- TestAccVPCSecurityGroupRule_protocolChange
|
||||||
- TestAccVPCSecurityGroup_allowAll
|
- TestAccVPCSecurityGroup_allowAll
|
||||||
- TestAccVPCSecurityGroup_basic
|
- TestAccVPCSecurityGroup_basic
|
||||||
- TestAccVPCSecurityGroup_change
|
- TestAccVPCSecurityGroup_change
|
||||||
@ -220,7 +238,10 @@ ecs:
|
|||||||
efs:
|
efs:
|
||||||
- TestAccEFSAccessPoint_
|
- TestAccEFSAccessPoint_
|
||||||
- TestAccEFSAccessPointDataSource
|
- TestAccEFSAccessPointDataSource
|
||||||
- TestAccEFSFileSystemDataSource
|
- TestAccEFSFileSystemDataSource_availabilityZone
|
||||||
|
- TestAccEFSFileSystemDataSource_id
|
||||||
|
- TestAccEFSFileSystemDataSource_name
|
||||||
|
- TestAccEFSFileSystemDataSource_tags
|
||||||
elasticbeanstalk:
|
elasticbeanstalk:
|
||||||
- TestAccElasticBeanstalkHostedZoneDataSource
|
- TestAccElasticBeanstalkHostedZoneDataSource
|
||||||
- TestAccElasticBeanstalkSolutionStackDataSource
|
- TestAccElasticBeanstalkSolutionStackDataSource
|
||||||
@ -228,7 +249,8 @@ elb:
|
|||||||
- TestAccELBAttachment
|
- TestAccELBAttachment
|
||||||
- TestAccELBBackendServerPolicy
|
- TestAccELBBackendServerPolicy
|
||||||
- TestAccELBHostedZoneIDDataSource
|
- TestAccELBHostedZoneIDDataSource
|
||||||
- TestAccELBListenerPolicy
|
- TestAccELBListenerPolicy_basic
|
||||||
|
- TestAccELBListenerPolicy_disappears
|
||||||
- TestAccELBServiceAccountDataSource
|
- TestAccELBServiceAccountDataSource
|
||||||
- TestAccELBSSLNegotiationPolicy
|
- TestAccELBSSLNegotiationPolicy
|
||||||
elbv2:
|
elbv2:
|
||||||
@ -251,7 +273,9 @@ guardduty:
|
|||||||
iam:
|
iam:
|
||||||
- TestAccIAMAccessKey_
|
- TestAccIAMAccessKey_
|
||||||
- TestAccIAMAccountAlias_
|
- TestAccIAMAccountAlias_
|
||||||
- TestAccIAMGroup_
|
- TestAccIAMGroup_basic
|
||||||
|
- TestAccIAMGroup_disappears
|
||||||
|
- TestAccIAMGroup_nameChange
|
||||||
- TestAccIAMInstanceProfileDataSource_
|
- TestAccIAMInstanceProfileDataSource_
|
||||||
- TestAccIAMGroupPolicy_
|
- TestAccIAMGroupPolicy_
|
||||||
- TestAccIAMOpenIDConnectProvider_
|
- TestAccIAMOpenIDConnectProvider_
|
||||||
@ -298,7 +322,9 @@ lambda:
|
|||||||
- TestAccLambdaLayerVersion_licenseInfo
|
- TestAccLambdaLayerVersion_licenseInfo
|
||||||
- TestAccLambdaLayerVersion_s3
|
- TestAccLambdaLayerVersion_s3
|
||||||
- TestAccLambdaLayerVersion_update
|
- TestAccLambdaLayerVersion_update
|
||||||
- TestAccLambdaFunctionURL
|
- TestAccLambdaFunctionURL_Alias
|
||||||
|
- TestAccLambdaFunctionURL_basic
|
||||||
|
- TestAccLambdaFunctionURL_TwoURLs
|
||||||
meta:
|
meta:
|
||||||
- TestAccMetaBillingServiceAccountDataSource
|
- TestAccMetaBillingServiceAccountDataSource
|
||||||
mq:
|
mq:
|
||||||
@ -405,7 +431,11 @@ servicediscovery:
|
|||||||
- TestAccServiceDiscoveryHTTPNamespace
|
- TestAccServiceDiscoveryHTTPNamespace
|
||||||
- TestAccServiceDiscoveryPrivateDNSNamespace
|
- TestAccServiceDiscoveryPrivateDNSNamespace
|
||||||
- TestAccServiceDiscoveryPublicDNSNamespace
|
- TestAccServiceDiscoveryPublicDNSNamespace
|
||||||
- TestAccServiceDiscoveryService
|
- TestAccServiceDiscoveryService_disappears
|
||||||
|
- TestAccServiceDiscoveryService_http
|
||||||
|
- TestAccServiceDiscoveryService_tags
|
||||||
|
- TestAccServiceDiscoveryService_private_http
|
||||||
|
- TestAccServiceDiscoveryService_public
|
||||||
signer:
|
signer:
|
||||||
- TestAccSignerSigningProfileDataSource_basic
|
- TestAccSignerSigningProfileDataSource_basic
|
||||||
- TestAccSignerSigningProfile_basic
|
- TestAccSignerSigningProfile_basic
|
||||||
|
@ -24,6 +24,24 @@ def test_create_cost_category_definition():
|
|||||||
resp.should.have.key("CostCategoryArn").match(
|
resp.should.have.key("CostCategoryArn").match(
|
||||||
f"arn:aws:ce::{ACCOUNT_ID}:costcategory/"
|
f"arn:aws:ce::{ACCOUNT_ID}:costcategory/"
|
||||||
)
|
)
|
||||||
|
resp.should.have.key("EffectiveStart")
|
||||||
|
|
||||||
|
|
||||||
|
@mock_ce
|
||||||
|
def test_create_cost_category_definition_with_effective_start():
|
||||||
|
client = boto3.client("ce", region_name="ap-southeast-1")
|
||||||
|
resp = client.create_cost_category_definition(
|
||||||
|
Name="ccd",
|
||||||
|
RuleVersion="CostCategoryExpression.v1",
|
||||||
|
Rules=[
|
||||||
|
{"Value": "v", "Rule": {"CostCategories": {"Key": "k", "Values": ["v"]}}}
|
||||||
|
],
|
||||||
|
EffectiveStart="2022-11-01T00:00:00Z",
|
||||||
|
)
|
||||||
|
resp.should.have.key("CostCategoryArn").match(
|
||||||
|
f"arn:aws:ce::{ACCOUNT_ID}:costcategory/"
|
||||||
|
)
|
||||||
|
resp.should.have.key("EffectiveStart").equals("2022-11-01T00:00:00Z")
|
||||||
|
|
||||||
|
|
||||||
@mock_ce
|
@mock_ce
|
||||||
|
@ -45,12 +45,14 @@ def test_create_cluster_with_setting():
|
|||||||
cluster = client.create_cluster(
|
cluster = client.create_cluster(
|
||||||
clusterName="test_ecs_cluster",
|
clusterName="test_ecs_cluster",
|
||||||
settings=[{"name": "containerInsights", "value": "disabled"}],
|
settings=[{"name": "containerInsights", "value": "disabled"}],
|
||||||
|
serviceConnectDefaults={"namespace": "ns"},
|
||||||
)["cluster"]
|
)["cluster"]
|
||||||
cluster["clusterName"].should.equal("test_ecs_cluster")
|
cluster["clusterName"].should.equal("test_ecs_cluster")
|
||||||
cluster["status"].should.equal("ACTIVE")
|
cluster["status"].should.equal("ACTIVE")
|
||||||
cluster.should.have.key("settings").equals(
|
cluster.should.have.key("settings").equals(
|
||||||
[{"name": "containerInsights", "value": "disabled"}]
|
[{"name": "containerInsights", "value": "disabled"}]
|
||||||
)
|
)
|
||||||
|
cluster.should.have.key("serviceConnectDefaults").equals({"namespace": "ns"})
|
||||||
|
|
||||||
|
|
||||||
@mock_ecs
|
@mock_ecs
|
||||||
|
@ -181,6 +181,8 @@ def test_describe_file_systems_using_unknown_identifier(efs):
|
|||||||
efs.describe_file_systems(FileSystemId="unknown")
|
efs.describe_file_systems(FileSystemId="unknown")
|
||||||
err = exc.value.response["Error"]
|
err = exc.value.response["Error"]
|
||||||
err["Code"].should.equal("FileSystemNotFound")
|
err["Code"].should.equal("FileSystemNotFound")
|
||||||
|
# Verified against AWS
|
||||||
|
err["Message"].should.equal("File system 'unknown' does not exist.")
|
||||||
|
|
||||||
|
|
||||||
def test_describe_file_systems_minimal_case(efs):
|
def test_describe_file_systems_minimal_case(efs):
|
||||||
|
@ -9,7 +9,7 @@ def test_describe_filesystem_config__unknown(efs):
|
|||||||
efs.describe_lifecycle_configuration(FileSystemId="unknown")
|
efs.describe_lifecycle_configuration(FileSystemId="unknown")
|
||||||
err = exc_info.value.response["Error"]
|
err = exc_info.value.response["Error"]
|
||||||
err["Code"].should.equal("FileSystemNotFound")
|
err["Code"].should.equal("FileSystemNotFound")
|
||||||
err["Message"].should.equal("File system unknown does not exist.")
|
err["Message"].should.equal("File system 'unknown' does not exist.")
|
||||||
|
|
||||||
|
|
||||||
def test_describe_filesystem_config__initial(efs):
|
def test_describe_filesystem_config__initial(efs):
|
||||||
|
@ -67,8 +67,8 @@ def test_get_group_current():
|
|||||||
assert not result["Users"]
|
assert not result["Users"]
|
||||||
|
|
||||||
# Make a group with a different path:
|
# Make a group with a different path:
|
||||||
other_group = conn.create_group(GroupName="my-other-group", Path="some/location")
|
other_group = conn.create_group(GroupName="my-other-group", Path="/some/location/")
|
||||||
assert other_group["Group"]["Path"] == "some/location"
|
assert other_group["Group"]["Path"] == "/some/location/"
|
||||||
assert (
|
assert (
|
||||||
other_group["Group"]["Arn"]
|
other_group["Group"]["Arn"]
|
||||||
== f"arn:aws:iam::{ACCOUNT_ID}:group/some/location/my-other-group"
|
== f"arn:aws:iam::{ACCOUNT_ID}:group/some/location/my-other-group"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user